Hello, I'm working on NXP LPC54628 development board (ARM Cortex M4) and trying to configure MPU in a way that execute never (XN) flag is enabled on internal SRAM. I configured MPU and trying to call function from SRAM, e.g.
__RAMFUNC(SRAM_UPPER) static void function_to_be_executed(void)
{
/* do some nasty things here */
}
At this point everything works like a charm - MemFault is generated. But trying to call this function via pointer, e.g.
typedef void(*func)(void);
func f = function_to_be_executed;
f();
seems not to generate any exception. Is it normal? Am I missing something? From my POV in this case exception should also be generated,