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

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

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

Jump to solution
508 Views
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 Kudos
Reply
1 Solution
466 Views
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

View solution in original post

2 Replies
480 Views
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 Kudos
Reply
467 Views
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