Hi @Alberto_C,
It must be partitioned from SRAM.
This code must be in SRAM:
FTFC->FSTAT = FTFC_FSTAT_CCIF_MASK; // launch command
while((FTFC->FSTAT & FTFC_FSTAT_CCIF_MASK) == 0); // wait until complete
Place the code into a function and the function place in SRAM:
__attribute__ ((section(".code_ram"))) // place the function below into .code_ram
uint8_t partition(void);
If you use the FTFC interrupt, the core must not read any data or execute any code from the Flash.
Regards,
Daniel