Hello David,
Thank you for your answer, but I notice that after reset I must wait for HSE core execute WFI before execute a program or an erase FLASh operation, otherwise it does not works and return the protection error MCRS[PEP].
After the reset and before programming or deleting the FLASH I had to enter the following wait:
while ((IP_MC_ME->PRTN0_CORE2_STAT&MC_ME_PRTN0_CORE2_STAT_WFI_MASK)==0){};/* Waiting for hse core execute WFI */
There is currently no firmware programmed into the HSE and the HSE firmware usage feature flag is disabled.
I did not find any warning about this in either the "S32K3xx Reference Manual" or the "RM00286 HSE_B Firmware Reference Manual".
Can you confirm what I found?
Best regards
E.