questions about the usage of C90FL SDD on MPC5644A (addr 0x80000/0xC0000)

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

questions about the usage of C90FL SDD on MPC5644A (addr 0x80000/0xC0000)

Jump to solution
796 Views
ZhouYiChuan
Contributor III

Dear experts:

I'm porting a boot-loader works well on MPC5642A to MPC5644A (based on C90FL SDD)
The document UM_C90FL_MM_JDP_SSD.pdf is my reference.
Now, my question is the flashing failed at block address 0x80000.
The difference is: this block is defined as High-address block0 (H0) in 5642A, but it is defined as Low-address Block 0 (L0)Flash B in 5644A. same difference for block address 0xC0000


My question is about how to set correct pramater value for C90FL SDD API functions
1)In page17, function GetLock(), parameter blkLockIndicator, LOCK_LOW_PRIMARY/LOCK_LOW_SECONDARY PRIMARY means Flash A? and SECONDARY means Flash B?
2)For page 11, function FlashErase(), how to set parameter lowEnabledBlocks value for block addess 0x80000 (L0 of flash B)? because there is also a L0 in Flash A.
3)Also, how to set parameter midEnabledBlocks: value for block address 0xC0000 (M0 of Flash A)?
4)Page 7 and 8, could you please confirm the block index should follow logical address mapping? 

5) For 5642A , there is same block numbering principle for physical and logical address? As those in Table11-1 of 5642 UM?

Another question is: Is there a register telling me the MCU is 5642A or 5644A?

logicAndPhysical-address.PNG

Following is my debug snapshot while writing flash 

5644FlashingProblem.PNG

I'm very sorry the source code is forbidden to be uploaded to the public forum according to Company policy.. 

If necessary, it can be sent to your email box. 

thanks and BR

YiChuan

0 Kudos
1 Solution
777 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi YiChuan,

first of all, I will mention (maybe for others) that there are two versions of the driver:

for MPC5642A:

https://www.nxp.com/webapp/Download?colCode=C90FL_SM_JDP_FLASH_SSD_DEVD

for MPC5644A:

https://www.nxp.com/webapp/Download?colCode=MPC5644A_C90FL_SSD_DEVD

The drivers are not compatible, it is a must to use the correct one.

In case of MPC5644A, it's necessary to use logical address mappping. Do not consider that there are flash block A and flash block B. When using the driver, this is not important anymore, consider the flash as one flash block.

That also means Table 12-1 in the reference manual is not valid here. The relation between physical mapping and logical mapping is like this:

lukaszadrapa_0-1642669781702.png

Example: 256KB block at 0x8_0000 is not low block now, it's first middle block. When you are going to unlock this block or select this block for erase, you should use bit 0 for middle blocks.

I believe the picture above should solve all your troubles.

To check which MCU you have, read SIU_MIDR register.

Regards,

Lukas

View solution in original post

0 Kudos
2 Replies
778 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi YiChuan,

first of all, I will mention (maybe for others) that there are two versions of the driver:

for MPC5642A:

https://www.nxp.com/webapp/Download?colCode=C90FL_SM_JDP_FLASH_SSD_DEVD

for MPC5644A:

https://www.nxp.com/webapp/Download?colCode=MPC5644A_C90FL_SSD_DEVD

The drivers are not compatible, it is a must to use the correct one.

In case of MPC5644A, it's necessary to use logical address mappping. Do not consider that there are flash block A and flash block B. When using the driver, this is not important anymore, consider the flash as one flash block.

That also means Table 12-1 in the reference manual is not valid here. The relation between physical mapping and logical mapping is like this:

lukaszadrapa_0-1642669781702.png

Example: 256KB block at 0x8_0000 is not low block now, it's first middle block. When you are going to unlock this block or select this block for erase, you should use bit 0 for middle blocks.

I believe the picture above should solve all your troubles.

To check which MCU you have, read SIU_MIDR register.

Regards,

Lukas

0 Kudos
767 Views
ZhouYiChuan
Contributor III

Hello Lukas:

thanks a lot for your professional answer. 

The flashing driver works correctly now. 

BR

Zhou Yi

0 Kudos