problem with IAP-based internal flash programming.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

problem with IAP-based internal flash programming.

381件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by edsut on Wed Jun 26 12:50:58 MST 2013

I'm working with "SimpleCortex" board, and have been stumbling on an issue with flash programming using the IAP functions.  Basic implementation of flash write/erase is very straight forward; however, there are times when I need to just clear (write) one bit (changing it from a '1' to a '0') while leaving all other bits within a 256-byte range unchanged.  I assume I am allowed to do this, as long as I read in the 256-byte block to ram, make the single-bit change, and then write that block back to the flash.  Is this a valid assumption?


If it is, then more information on how I reproduce this problem is found here:


<a href="http://www.brc-electronics.nl/component/kunena/5-Programming-and-software/565-flash-programming-prob...">http://www.brc-electronics.nl/component/kunena/5-Programming-and-software/565-flash-programming-prob...</a>


Sure would be nice if someone could tell me what I'm doing wrong.  This problem appears to be VERY data dependent; hence the reason for my use of what appears to be a random block of data (its not actually random, but its what I was using when I noticed the problem).


Thanks for any ideas!

ラベル(1)
0 件の賞賛
3 返答(返信)

365件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by edsut on Thu Jun 27 06:29:03 MST 2013

Ok, I think I have the explanation.  NXP tech support pointed me to this appnote which explains the problem:


http://www.lpcware.com/content/nxpfile/an11008-flash-based-non-volatile-storage-software


Bottom line: you can't treat this flash like typical NOR flash.  It has some limitations.

0 件の賞賛

365件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by edsut on Thu Jun 27 03:56:44 MST 2013

I do erase the flash initially.  The difference between what I'm trying to do and what I see is typically done in the examlpes I've seen is that I want to be able to clear a bit within a block of flash that I've previously written.  This is a very typical operation with normal flash devices.  With normal NOR flash, it is legal to write a bit from 1 to 0 regardless of the state of the surrounding bits.  The limitation is that if I want to change the bit from 0 to 1, then I need to erase the entire sector to do that.  


In my case, I simply want to be able to do what normal flash allows me to do.  Is there any data sheet that describes the capability of the internal flash for these devices?  Typically, all I see is the IAP command interface.  I'd like to be able to read exactly what this internal flash is capable of.


Thanks for your help,


Ed

0 件の賞賛

365件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Jun 26 17:27:07 MST 2013

Hi edsut,


You need to erase sector before programming it. I am not sure if you are doing it. Please go through following link to better understand it.


<a href="http://lpcware.com/content/nxpfile/an10866-lpc1700-secondary-usb-bootloader">http://lpcware.com/content/nxpfile/an10866-lpc1700-secondary-usb-bootloader</a>


 


Thanks,


NXP Support

0 件の賞賛