ECSPI transfer gets stuck after 3 bytes

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

ECSPI transfer gets stuck after 3 bytes

Jump to solution
699 Views
MBaer
Contributor II

Hello.

We are using the ECSPI2 in the i.mx8 m mini from the M4 core.

ECSPI2 is disabled in the device tree so that the M4 has full control.

The SPI is configured to transfer 5 bytes with the ECSPI_MasterTransferNonBlocking and then generate the RXFIFO Data Request Interrupt.

This works fine for some time but at some point the SPI Transfer hangs after sending 3 byte.

What could cause ECSPI to only transfer 3 byte?  

Cheers Marcel

Labels (1)
0 Kudos
1 Solution
666 Views
MBaer
Contributor II

I added the NvicInit() and now it works on both spis.

View solution in original post

0 Kudos
3 Replies
688 Views
jimmychan
NXP TechSupport
NXP TechSupport

Which SDK are you using? Which board are you using?

Have you try other examples in the SDK and still have the issue?

0 Kudos
676 Views
MBaer
Contributor II

Hi Jimmy

We are using SDK 2.11.0 with a custom board using the i.MX8M Mini.

I could fix the original issue by using the CMSIS implementation of the ECSPI.

But there i face an other issue, that i cannot use ecspi2 and ecspi3 simultaneously. 

I used the cmsis_ecspi_int_loopback_transfer as starting point and implemented ecspi 3 accordingly. I can use the ecspi3 alone but not both together.

Either the ECSPI2_DriverIRQHandler or the ECSPI3_DriverIRQHandler is not triggered.

0 Kudos
667 Views
MBaer
Contributor II

I added the NvicInit() and now it works on both spis.

0 Kudos