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

A bus fault has occurred on an instruction prefetch (CFSR.IBUSERR, BFAR).

Hi. 

I am developing using nRF52820 example source using SDK 17.0.2.

USB and LESC were added using S112.

However, during operation, the following HardFault error occurs in the IAR compiler.

The processor has escalated a configurable-priority exception to HardFault.
A bus fault has occurred on an instruction prefetch (CFSR.IBUSERR, BFAR).
Exception occured at PC = 0x2002f9ce, LR = 0x1d515
See the call stack for more information.

Even if I change the optimizations from High(size) to Normal, no fault error occurs, but I have to use High(size).

Parents
  • Hi,

    The bus fault is caused by the fact that the program is trying to execute code outside the valid memory range on the nRF52820 (0x2002f9ce), but we have to try trace back to what made the program jump to this address in the first place to determine a root cause. Could you post a screenshot of the call stack when the bus fault has occurred? It may show the last function call the program was executing prior to the exception. 

Reply
  • Hi,

    The bus fault is caused by the fact that the program is trying to execute code outside the valid memory range on the nRF52820 (0x2002f9ce), but we have to try trace back to what made the program jump to this address in the first place to determine a root cause. Could you post a screenshot of the call stack when the bus fault has occurred? It may show the last function call the program was executing prior to the exception. 

Children
Related