Hi everyone,
when I try to program flash in MK64FN1M0VLQ12 chip using a PEMICRO probe on MCUXPRESSO IDE as the figure:
I got a message and my chip get blocked and I am not able to program it anymore. I noticed this happen just when I use a code that uses SDHC module. Is that something related to MPU protection?
There is a line of code which I think disables MPU and prevents this happening: SYSMPU_Enable(SYSMPU, false);
Does anyone know if is that right?
Thanks in advance!
Hi Diogo,
I was trying to reproduce this but I'm still unable to do it, can you let me know which example are you using?
Also, as you mention this function (SYSMPU_Enable(SYSMPU, false);) disable the memory protection unit so I think this is not the reason for it. One thing I could recommend is to check if you change the flash configuration, this can be find in the startup code in the following section:
__attribute__ ((used,section(".FlashConfig"))) const struct {
unsigned int word1;
unsigned int word2;
unsigned int word3;
unsigned int word4;
} Flash_Config = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE}; Best Regards,
Alexis Andalon
Thanks for your reply, Alexis!
The flash configuration is ok, as you can see:
I built my own code , which is recording some data from a IMU sensor in a sdcard. To record data in the sdcard I based my code in the fatfs_examples - fatfs_sdcard for frdmK64f.
Best regards,
Diogo.