MKE14F512 FLASH_erase return 103

cancel
Showing results for 
Search instead for 
Did you mean: 

MKE14F512 FLASH_erase return 103

89 Views
Molbuy
Contributor I

After FLASH_Init which return status 0 and some FLASH_GetProperty which also returns correct values I try execute below which return status 103 :

regPrimask = DisableGlobalIRQ();

statusF = FLASH_Erase(&configF, 0x42000, 4096, key);

EnableGlobalIRQ(regPrimask);

a FLASH registers is as follow : registers.png

after callFtfxRunCommand((FTFx_REG8_ACCESS_TYPE)(&FTFx->FSTAT)); the FTFE-FSTAT became 0xa0 (10100000) which correspond to status 103

Command execution looks like from right place (RAM) :

ame : config->runCmdFuncAddr.commadAddr

Details:536872649

Default:536872649

Decimal:536872649

Hex:0x200006c9

Binary:100000000000000000011011001001

Octal:04000003311

 

Change  in erase address to  40000 or 41000 gives same result

What is wrong?

 

 

0 Kudos
4 Replies

80 Views
Molbuy
Contributor I

I found this post :

https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-Erase-Flash-memory/m-p/823401#M49...

all looks exactly as on Mike screenshots except ram address value (because I have different device)  and that all it doesn't  work

0 Kudos

32 Views
nxf54944
NXP TechSupport
NXP TechSupport

Hello Molbuy

 

This error indicates that the instruction code is invalid or the address is out of bound.
Which value are you writing in the variable "key"?
Do you have this same problem with the parameters of the SDK example?


I will be waiting for your reply, if you have more questions do not hesitate to ask me.
Best regards,
Omar

0 Kudos

26 Views
Molbuy
Contributor I

Hello Omar.

The key is :

uint32_t key = FOUR_CHAR_CODE('k', 'f', 'e', 'k');

and it taken from fsl_ftfx_controller.h, moreover, if execution of code reached the "callFtfxRunCommand" then key  passed before successfully.

Also, as you can see the address of "callFtfxRunCommand" is 0x200006c9 which in range of upper sram region for that device.

Where can I see appropriate sdk example?

0 Kudos

18 Views
nxf54944
NXP TechSupport
NXP TechSupport

Hello

Thank you for your reply, the key is correct and the command is in SRAM.
I suggest you test your device with the SDK example to check if this problem still persists. You can import the example in the MCUXpresso in the option "Import SDK examples(s)"

nxf54944_1-1614105868326.png

 

nxf54944_0-1614107277453.png

 

Please let me know the results, if you have more questions do not hesitate to ask me.
Best regards,
Omar

0 Kudos