NXP FlexComm LPSPI Problems - FRDM-MCXN947 #80871
Unanswered
ECleverito
asked this question in
Q&A
Replies: 1 comment
-
Tagging for visibility: @mmahadevan108 I noticed you added the definition of flexcomm1_lpspi1 to the FRDM-MCXN947's base overlay. Were you able to utilize the LPSPI successfully? @danieldegrasse I sent you an email earlier and you suggested moving this discussion to GitHub @DerekSnell I have seen you commenting on related threads where you mentioned that work has been underway on the spi_mcux_plspi driver |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am looking to use the LPSPI modules available on the MCXN947's FlexComms, but I am unable to see any activity from the controllers when I attempt to write to them. I initially desired to use the LPSPI on FC6 in order to use a Mikroe Clickboard on the MikroBus slot. I added entries for this FlexComm module to my existing overlay:
I mainly followed the example in the frdm_mcxn947_mcxn947_cpu0.dtsi overlay, as support for LPSPI was added for this board earlier in this commit. The resulting zephyr.dts shows flexomm6_lpspi as "okay" and I am able to retrieve a node ID with the DEVICE_DT_GET() macro and a spi_dt_spec using SPI_DT_SPEC_GET(). To test writing to this device with the zephyr APIs, I have tried manually creating the spi_dt_spec with the node_id:
This however, results in the following runtime error:
This error is returned at the end of spi_mcux_transfer_next_packet() in the spi_mcux_lpspi.c driver file:
I find it strange that the ...NonBlocking() API is called since I do not have CONFIG_SPI_ASYNC set. Overall, I would like to know if there is anything glaring missing from my overlay device definitions. I have played with the "spi-max-frequency" property by lowering it as well as the spi_config frequency, as I have seen that this caused some troubles in other threads discussing LPSPI. Even at 100 kHz, I am still not seeing successful writes or any activity on the bus. I have tried this with LPSPI1 on FC1 as well, the default lpspi in the overlay, to no avail.
Additionally, here are the contents of my application-specific configuration file:
I would like to add that I did learn that clock gating is performed in the board.c, which I have already modified to send the clock to FlexComm6:
What would be the proper way to send this clock without modifying the zephyr source?
Beta Was this translation helpful? Give feedback.
All reactions