Problem when programmig flash in MK64FN1M0VLQ12

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem when programmig flash in MK64FN1M0VLQ12

1,272 Views
dbuenom
Contributor II

Hi everyone,

when I try to program flash in MK64FN1M0VLQ12 chip using a  PEMICRO probe on MCUXPRESSO IDE as the figure:    2019-10-28.png

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!

Labels (1)
5 Replies

1,176 Views
Alexis_A
NXP TechSupport
NXP TechSupport

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

1,176 Views
dbuenom
Contributor II

Thanks for your reply, Alexis!

The flash configuration is ok, as you can see:

WhatsApp Image 2019-10-31 at 08.46.57.jpeg

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.

0 Kudos
Reply

1,176 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Diogo,

 

Are you using a development board or is your custom board? Or do yuo have a FRDM where you could test this?

Best Regards,

Alexis Andalon

0 Kudos
Reply

1,176 Views
dbuenom
Contributor II

Hi Alexis,

this problem happened in my own custom board, but I have a FRDM- K64 development board.

Best regards,

Diogo.

0 Kudos
Reply

1,176 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Diogo,

In the FRDM using other debugger firmwares like the DAPLink or the J-link this also happens? 

Regards,

Alexis Andalon

0 Kudos
Reply