FTFA fails erasing flash, frdm kl43

cancel
Showing results for 
Search instead for 
Did you mean: 

FTFA fails erasing flash, frdm kl43

Jump to solution
417 Views
Contributor IV

HI!

I am trying to save some data to Flash. For practice I am using frdm kl43 board but the final product will be on kv10. So the decision not to use FlexNVM functionality but ordinary flash module functionality. I am trying to follow example but with PE. My main and PE is here:

116749_116749.jpgmain.jpg

(main also attached)

Debugging the code i get to

Reset_Handler:

    cpsid   i               /* Mask interrupts

 

Best regards,

Alexey

Original Attachment has been moved to: main.c.zip

Tags (3)
0 Kudos
1 Solution
41 Views
NXP Employee
NXP Employee

Hello Alexey Usoltsev:

I guess this is caused by SysTick interrupt firing. The interrupt handler is in the same flash block and it leads to a "Read-while-write error".

- Try setting the OSA timer to None as discussed in the next thread:

Guidance on fsl_flash Processor Expert component usage

- Or enable the ESFC bit as explained in the next discussion:

Writing flash memory with KL27Z256

Let me know it the problem is not solved.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

4 Replies
42 Views
NXP Employee
NXP Employee

Hello Alexey Usoltsev:

I guess this is caused by SysTick interrupt firing. The interrupt handler is in the same flash block and it leads to a "Read-while-write error".

- Try setting the OSA timer to None as discussed in the next thread:

Guidance on fsl_flash Processor Expert component usage

- Or enable the ESFC bit as explained in the next discussion:

Writing flash memory with KL27Z256

Let me know it the problem is not solved.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

41 Views
Contributor IV

Hello again Jorge Gonzalez,

I am a bit confused a bit MCM_PLACAR ESFC bit.

I am setting ESFC bit by MCM_PLACR_ESFC(1); but if one let global interrupts be enabled it still fails. If interrupts are desabled erase-write goes "ok".

Regards,

Alexey.

0 Kudos
41 Views
Contributor IV

Hello Jorge Gonzalez,

It worked out!!! Many thanks. And the info about arbitration using is very helpful too!

0 Kudos
41 Views
Contributor IV

  I've launched example successfully. But in my programm when pressing F3 on erase function one can see error:

error.jpg

may be I have to compile C90TFS lib elsewhere?

0 Kudos