running the example "flash_partitioning_s32k144" from RAM is OK,but Flash is Err!

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

running the example "flash_partitioning_s32k144" from RAM is OK,but Flash is Err!

1,409 Views
wangchao5128
Contributor II

官方例程Flash操作_Ram调试可以运行_Flash下载运行重启.png

官方例程Flash位置.png

  run Flash always restart。

       run Ram is OK。

 

Tags (1)
0 Kudos
1 Reply

1,396 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

 

When I run your code the FTFC Read Collision Error Flag FSTAT[RDCOLERR] is set.

In the RM rev 12.1 can be seen this description:

"The RDCOLERR error bit indicates that the MCU attempted a read from an FTFC resource that was
being manipulated by an FTFC command (CCIF=0). Any simultaneous access is detected as a collision
error by the block arbitration logic. The read data in this case cannot be guaranteed."

"Do not attempt to read a flash block while the FTFC is running a command (CCIF = 0)
on that same block. The FTFC may return invalid data to the MCU with the collision
error flag (FSTAT[RDCOLERR]) set."

It seems that something interrupted the FTFC command. When I disable global interrupts "INT_SYS_DisableIRQGlobal();" before the FTFC command ("FLASH_DRV_DEFlashPartition") the code is running without an error.

However, it is up to you to find out what attempted to read a flash block while the FTFC is running a command (CCIF = 0)

I suggest checking the flags in the FSTAT register always when you have some issue related to the FTFC commands.

I hope it helps.

Best regards,

Diana

0 Kudos