AnsweredAssumed Answered

Hard Fault getting triggered from ISR routine when compiled binary size is more than P flash

Question asked by Ashish Dargad on Jan 22, 2020
Latest reply on Feb 11, 2020 by Ashish Dargad

Chip used : KW36

IDE Used : MCUExpresso


We have partitioned D-flash as NVM of size 32K and remaining we are using as Code Flash, Hence we are using P Flash and D flash as Code Flash(around 470K)


We are observing Hard Fault in below operation.

1. When we reset the controller


2. When we try pair/connect the device


We tried to follow all the post on NXP community to see from which location fault is getting generated and it is observed that it is coming from different ISR routine such as UART ISR or Timer ISR or RESET ISR


Also verified that Stack allocated for Tasks is not getting overflowed.


We have also observed that hard fault is getting triggered when the complied binary size is larger than 256K and it uses P-flash as well as D-flash.


Please let us know what can be done in above case to identify the root cause of the HardFault ?


I am attaching .map files for release and debug compilation.