i have two projects (secure and non secure) with trustzone, now I was trying to write on the internal flash from the secure code, as soon as the call to flash_init is made, the debugger jumps to the hardfault handler with the IBUSERR(0) Instruction bus error.
i checked this ticket:
https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Using-Flash-driver-in-TrustZone/m-p/10121...
i did these changes:
1- changed clock to be 96_MHZ
2- switched the entire Boot ROM memory region (0x13000000 - 0x1301FFFF) from NS-User to S-Priv
3- set the ANACTLR, FLASH, GPIO, INPUTMUX and PRINCE slaves to security level S-Priv
still getting same hardfault handler with the IBUSERR(0) Instruction bus error.