Hi
I am having some issues with the flash functions of processor expert. I am using TWR-K60F120M tower board.
Some addresses are not getting updated while some others are working properly.
Flash protection bits I have verified, they are all 0xFF meaning the whole flash area is unprotected.
I tried functions like IFsh1_SetLongFlash, IFsh1_SetBlockFlash. For some address they work properly(ie., updates the flash as intended).
But for some addresses like (0x0000A000) they are hanging, and some other lcoations they return success but locations remain as erased state(0xFF).
Configuration of flash module:
Write method : Tried with both destructive write and safe write
Command complete interrupt : enabled with med priority
Read collison interrupt : enabled with med priority
Wait in RAM : no
Events enabled in init : yes
Wait enabled in init : yes (hope this ensures that the code waits until a write or erase is complete)
NB: I have verified that the addresses I am writing are not occupied by my application.
Is there any clues on how to proceed on this ?
Thanks,
Renjith
It would be nice to see a follow-up with a resolution description. I'm seeing the exact same behavior on K70FN1M0VMJ12 MCU. IFsh1_SetBlockFlash( <anything>, 0x000A0000, 0x8000) fails with a ERR_VALUE, after writing the previous 0x00030000 bytes.
From examining the source code generated by Processor Expert, it appears that the maximum "block" that the IFsh1_SetBlockFlash() ->IFsh1_SetFlash() functions can destructively write is a single sector, i.e. 4KB. The call to IntFlashLdd1_Erase() receives a size of IntFlashLdd1_ERASABLE_UNIT_SIZE which is defined as 0x1000LU. Upon successful return from IntFlashLdd1_Erase() and IntFlashLdd1_Main(), IFsh1_SetFlash() returns, not erasing any subsequent sectors.
Hi Renjith,
could you please upload your project here for further investigating?
Hi Yong,
Thanks for the response.
Uploaded to the service request page.
thanks,
Renjith
No replies so far :smileysad: :smileysad:
One related doubt I have...
Is there any restriction like in the call to IFsh1_SetBlockFlash, the destination flash address need to be aligned on 8 bytes and number of bytes to be written also aligned to 8 bytes?
Is this restriction there even if we use PE component driver?