spi_transceive stuck in lpspi_wait_tx_fifo_empty #86637
-
Hey folks, I'm trying to write a driver for a new SPI device. I'm using the NXP FRDM_MCXN947 board and specifically, I'm using the Mikrobus header to communicate with an SPI device. My code is all here. In particular, the DTS overlay is here and where the SPI read hangs is here. I've tried a bunch of things but even the most basic SPI read is hanging so I'm not sure what else can be done. Attaching a debugger shows that when the board is hanging, the backtrace looks like this:
Is there something obvious I'm doing completely wrong or is the LPSPI driver on the MCXN947 just broken? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I tried the same code on the lpcxpresso55s69 and it worked just fine so seems likely that it's an issue with the MCXN947 specifically. |
Beta Was this translation helpful? Give feedback.
-
@bobobo1618 , @decsny is working on the LPSPI driver, and your issue seems related. @decsny, can you share if this is related to your on-going work? |
Beta Was this translation helpful? Give feedback.
Actually, I think I might have a guess of what is the issue, because I just noticed that flexcomm6 (which is used in user sample) does not have code to attach its clock in the frdm_mcxn947 board.c file, so maybe the issue is there is no clock to the LPSPI module.