cortex m23 execute function in ram result in hardfault

Hello everyone:

I'm trying to leverage the __attribute__((section(.ramfunc))) to execute function in RAM. However, a handfault error happened when it execute the instruction in the ram address.

My board is SAML11 Xplained Pro,Cortex-M23 core and the excution is  in secure world.

The code runs in Thumb mode and the bx address is odd.

Has anyone met the same problem?

More questions in this forum