Changes in function ‘FLEXSPI_CheckAndClearError’ of from SDK2.9 to SDK2.16 for NXPRT1170

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Changes in function ‘FLEXSPI_CheckAndClearError’ of from SDK2.9 to SDK2.16 for NXPRT1170

跳至解决方案
516 次查看
mega32
Contributor II

As the title says, in the SDK2.16 version of the MCU NXPRT1170 chip, compared with the SDK2.9 version, the Reset fifo processing has been deleted in the FLEXSPI_CheckAndClearError function of the fsl_flexspi.c file, but the reason for the deletion is unknown.

Deleted Reset fifo processing code:
base->IPTXFCR |= FLEXSPI_IPTXFCR_CLRIPTXF_MASK;
base->IPRXFCR |= FLEXSPI_IPRXFCR_CLRIPRXF_MASK;

The FLEXSPI_CheckAndClearError function will check whether there is an error in the FLEXSPI_WriteBlocking, FLEXSPI_ReadBlocking and other functions.

If an error is found, FLEXSPI_ClearInterruptStatusFlags(base, status); will be executed.
I just don't know why the Reset fifo processing was deleted in SDK2.16?

キャプチャ.PNG

0 项奖励
回复
1 解答
474 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @mega32 ,

After confirming with experts that It is unnecessary to have FIFO cleaning in check and clean error, as Transfer(Non)Blocking clear the FIFOs prior each transfer. But for sure, clearing the FIFOs in case of an error removes any data (succesfully) received so far. It is being reset at the beginning. I do not say it is wrong, but it may be risky (error prone) to manipulate it in the middle of loops.

We can see that before call this FLEXSPI_CheckAndClearError inside write or read blocking function, at the beginning of the FLEXSPI_TransferBlocking, it will reset the FIFO, so no need to reset it during the transfer process.

Gavin_Jia_0-1745896401944.png

 

Best regards,
Gavin

在原帖中查看解决方案

2 回复数
488 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @mega32 ,

Thanks for your interest in NXP MIMXRT series!

I need to internally confirm the reason for this modification, so please give some time. Thank you again for reporting this issue!

 

Best regards,
Gavin

0 项奖励
回复
475 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @mega32 ,

After confirming with experts that It is unnecessary to have FIFO cleaning in check and clean error, as Transfer(Non)Blocking clear the FIFOs prior each transfer. But for sure, clearing the FIFOs in case of an error removes any data (succesfully) received so far. It is being reset at the beginning. I do not say it is wrong, but it may be risky (error prone) to manipulate it in the middle of loops.

We can see that before call this FLEXSPI_CheckAndClearError inside write or read blocking function, at the beginning of the FLEXSPI_TransferBlocking, it will reset the FIFO, so no need to reset it during the transfer process.

Gavin_Jia_0-1745896401944.png

 

Best regards,
Gavin