This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why LDREX instruction trigger Hard Fault in Cortex-M7

in my SOC system,there are 2 R8 clusters(4 Cortex-R8 Core per cluster) and 2 Cortex-M7 Cores(independent of each other) when poweron, Cluster0 Core0 R8 first boot up and then wakeup all other cores. but now we meet a problem,  all the cores will apply for some public resources, so all the cores will get spinlock first before alloc resources,

but when the 2 Cortex-M7 Cores call  the funtion HalCpu_SpinLock(just show in the figure below), when M7 execute the LDREX instruction , they will trigger Hard Fault occasionally, and the CFSR indicate this is Bus Fault.

but to our suprise,  when this Fault happended, this is not the first time for this M7 to get the same spinlock(that is to say, in this proc the M7 will get the same spinlock several times, but the Fault was trigger not in the 1st time, maybe in the 2nd, or the 3rd, or the 4th time.......).

So Why M7 triggered Fault ?

PS: the memory attr of the addr indicated with r0 register is Device, and we tried to config to Strong Order, it also trigger the same Fault.

Parents Reply Children
No data