pxCurrentTCB gets NULL and trigger hard fault

pierrechevalier wrote on Friday, May 16, 2014:

Do you have any idea about the gcc version that is used for the port ? I am using Sourcery G++ Lite 2010q1-188

rtel wrote on Friday, May 16, 2014:

I have never had a problem with any GCC compiler on a Cortex-M, unlike on the ARM 7 where there were multiple issues in various different versions. Provided the compiler complies with the EABI, which I believe that one does, there should not be a problem.

Occasionally they change the syntax required by the assembler, that is all, and problems like that show up at compile time, not run time.

Regards.

pierrechevalier wrote on Friday, May 16, 2014:

Ok, I just tried with the last version and it still happen. I tested as you first said to put all irq to lowest priority (0xF) and I didn’t noticed a crash… so it must be an interrupt setting issue.
From the debugger I see in NVIC controller that priority are correctly set : 128 which means 8 for the interrupts that uses FreeRTOS functions, systick at 15, so configKERNEL_INTERRUPT_PRIORITY is correctly set, and configMAX_SYSCALL_INTERRUPT_PRIORITY is set to 3 (0x30 as the value in register), i checked in a critical section and basepri is set to 0x30 as well.
In traces I see that the systick critical section is not effective, an interrupt that calls xsemaphoregivefromisr is nested…

I will stop boring you with this, I’ll continue to work with priority set to lowest as it seems to be good this way… until I found what I did wrong.

Thanks for your help.

Best regards

grvgrv wrote on Wednesday, January 20, 2016:

Hi. Have you solved your issue ? It seems I have the same symptom, after few minutes running I get NULL in pxCurrentTCB and then BUS FAULT.

Anyone solved this issue?. Can anyone tell whats the root cause for this?

Thanks.

This thread is seven years old. Please create a new thread describing the problem you are facing.