Can't erase a flash sector on FRDM- K64F board

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

Can't erase a flash sector on FRDM- K64F board

Jump to solution
1,302 Views
diegocolombo
Contributor IV

Hi

please can i have your help?

 

I have an FRDM- K64F board,in a baremetal project using KDS with ProcessorExpert instead of SDK libraries.

The CPU runs at 100MHz,bus at 50 MHz,Flash at 25 MHz

I need to erase a sector,starting at 0xFF000.I tried with the IntFlash component,and the EraseSector function,but it does not works,the sector remains unaltered.

I used a second clock configuration,thinking that the problem was because of the core excessive clock frequency compared to Flash ,so i slowed everything at half speed,except Flash clock..

The problem is that i'm not shure about what happens at startup..the code stucks in a timer interrupt routine,unless i move through it step by step..

In some way(that i would be glad to understand)the code walks outside it and runs "normally",but once more it can't erase the sector starting at 0xFF000,does not matter  if a .Cpu_SetClockConfiguration(1) function is called to slower the clock.

Furthermore What i don't understand is because before calling this function the CPU behaves differently, it should be still running in clock_configuration 0,that was the same that i used previously.

If i check the clock configuration during PE_low_level_init is confirmed that is=0;

Started with wrong foot or both feet?

 

Thanks for any help

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
921 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Diego,

- Could you please send your project to me ,

or it hardly know your meaning .

And also tell me which version of KDS do you used ?

- There is erase / program demo on the FLASH_LDD component , you can refer to :

pastedImage_0.png

pastedImage_1.png

Hope it helps

Alice

View solution in original post

6 Replies
921 Views
diegocolombo
Contributor IV

Some new things about it.

It looks that the memory is erased,but is the KDS memory view that does not update,why?

I mean that if i copy a portion of the sactor in RAM it results altered as expected.

0 Kudos
Reply
922 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Diego,

- Could you please send your project to me ,

or it hardly know your meaning .

And also tell me which version of KDS do you used ?

- There is erase / program demo on the FLASH_LDD component , you can refer to :

pastedImage_0.png

pastedImage_1.png

Hope it helps

Alice

921 Views
diegocolombo
Contributor IV

Hi Alice

thank you very much for showing the above example

I don't know how to send you a simplified project version that i did.I can't find any option or attach symbol.

It has the same behaviour of the project i'm working on.

Notice that the .ld file was modified to place values at an absolute address.

I just wrote few rows in main.c  to check the difference between memory browsers and the values copied from flash to ram.

I hope to send it as soon as possible;

Many thanks

Diego Colombo

0 Kudos
Reply
921 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi , Diego,

Please attach it as this :

Click the "Actions" button , the click "Edit"

pastedImage_1.png

then click the "Attach" at the right corner :

pastedImage_0.png

BR

Alice

0 Kudos
Reply
921 Views
diegocolombo
Contributor IV

Alice thanks

it works

using the low level component in the way showed by the example that you copied works perfectly,no matter the clock frequency.

I dont' know the reason why the High level component fails,shurely i don't use it in the right way.

Still i can't attach any file,the action button says "No action available".

Does it need some kind of further registering once Freescale merged with NXP?

Thanks for helping me

Diego Colombo

0 Kudos
Reply
921 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Diego,

- Could you please take a screenshot about the component you used ?

   Please select the "Application to project" , then select the components it shows :

pastedImage_0.png

- No, you do not need register it again, you can change one explorer to have a try .

Hope it helps

Alice

0 Kudos
Reply