This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Spurious exception

Greetings,

I'm developing an application for nRF52 on nRF52-DK (PCA10040). I'm using the nRF Connect SDK (NCS) and the IDE SEGGER Embedded Studio for ARM.

It seems to run normally for a period between 50 to 70 minutes, and then some exception happen, the debugger falls in the "z_arm_exc_spurious" handler.

It seems there is two cases. The first case, the last function called before the exception is a function called "remove_timeout" which I think it belongs to Zephyr.

Fault_1

The second case the call stack traces back to a function that belongs to the application called "buf_pool_append" (see below). In short that function appends an item to a linked list. This function is called by the I2S peripheral ISR or in the main flow always inside a critical section (using the "irq_lock" macro).

Fault 2

Checking the call stack, apparently It falls "inside" the [ if (list->head) ] (see below) which should happen when the "list->head" is non NULL (or different than zero), but strangely when the debugger retrieves "list->head" value it is read as NULL, but maybe this couldn't be trusted since something already went wrong.

void buf_pool_append(volatile psPackList list, volatile psPackBuf item) {
	if (list->head) {
		list->tail->next = item;
		item->prev = list->tail;
		list->tail = item;
	} else {
		list->head = list->tail = item;
	}

	++list->count;
}

Did someone experienced something like this?

Thanks in advance.

Christofer.

PS: Sorry for my bad english

Parents Reply Children
No Data
Related