Hi. I have been trying to get the driver_example / LSPI_Interrupt example. It just keeps hanging at,:
/******************Wait for master and slave transfer completed.******************/
while ((!isSlaveTransferCompleted) || (!isMasterTransferCompleted))
{
}
Not sure where to go from here on this one. I tried several things but no luck.
regards
Mike
已解决! 转到解答。
[RESOVLED] Have jumper the locations on the bottom of the board to pins 10, 11, 12, 13. Don't know why this wasn't done by default.
To make me able to accurately study the case, please provide some more information.
Can you see any activity on the LPSPI signals? What exactly interconnections have you made on the board? Can you trace the code and define the exact point the code execution sticks up at? Please specify.
Also, i.MX RT1050 doesn't have any intmux module, all interrupts from peripherals directly go to NVIC. So, to be served, corresponding interrupt should be enabled in both peripheral module and NVIC.
Have a great day,
Artur
Added a bunch of additional debugs statements and it gets stuck in the following loop:
while ((!isSlaveTransferCompleted) || (!isMasterTransferCompleted))
I do see the master irq firing by adding a few debug statements, but never see the slave. i.e.:
ENTERED LSPI_MASTER_IRQHandler
EXIT LSPI_MASTER_IRQHandler
ENTERED LSPI_MASTER_IRQHandler
EXIT LSPI_MASTER_IRQHandler
ENTERED LSPI_MASTER_IRQHandler
EXIT LSPI_MASTER_IRQHandler
Adding a couple of extra debug statements in the while statement I see that master is completed but slave transfer never completes:
isMasterTransferCompleted: 1
isSlaveTransferCompleted: 0
isMasterTransferCompleted: 1
isSlaveTransferCompleted: 0
As for connections I used what was specified in the readme:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J24-4 (D11) SIN J24-2 (D9)
SIN J24-5 (D12) SOUT J24-9 (D14)
SCK J24-6 (D13) SCK J24-10 (D15)
PCS0 J24-3 (D10) PCS0 J24-1 (D8)
I did re-do the wiring a couple of times but had same results.
Hope this is enough.
Thanks for the help
Mike
Did some more debugging and it appears that the interrupts may not be firing. Not getting to the callbacks - I did see a note about using intmux but I can not seem to find anything on that in the spec or in the examples. Theres is also no intmux.h file in the examples to use as a guide either.