Problem with flash update functions of PE

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

Problem with flash update functions of PE

877 Views
renjithvamanan
Contributor III

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

Labels (1)
5 Replies

576 Views
theobarker
Contributor III

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.

0 Kudos

576 Views
theobarker
Contributor III

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.

0 Kudos

576 Views
Rick_Li
NXP Employee
NXP Employee

Hi Renjith,

could you please upload your project here for further investigating?

0 Kudos

576 Views
renjithvamanan
Contributor III

Hi Yong,

Thanks for the response.

Uploaded to the service request page.

thanks,

Renjith

0 Kudos

576 Views
renjithvamanan
Contributor III

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?

0 Kudos