ECSPI transfer gets stuck after 3 bytes

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

ECSPI transfer gets stuck after 3 bytes

跳至解决方案
1,635 次查看
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

标签 (1)
0 项奖励
回复
1 解答
1,602 次查看
MBaer
Contributor II

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,624 次查看
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 项奖励
回复
1,612 次查看
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 项奖励
回复
1,603 次查看
MBaer
Contributor II

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

0 项奖励
回复