You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "jlaitine (via GitHub)" <gi...@apache.org> on 2025/11/19 10:42:54 UTC
[PR] Imx9 enable lpspi pcs manual control [nuttx]
jlaitine opened a new pull request, #17347:
URL: https://github.com/apache/nuttx/pull/17347
## Summary
This PR adds a function imx9_lpspi_select_cs to assert CS at the start of an SPI transfer and keep it asserted until called again to de-assert it. This can be called by board-provided imx9_lpspi_select, in case the CS needs to be controlled via the LPSPI block and not GPIO.
The TCR register CONT (continue) bit is asserted to prevent CS toggling during the transfer, and the PCS bits are set to mark the correct CS
## Impact
Impacts only imx9 designs using LPSPI. Doesn't impact existing designs, adds a new feature, enabling to use the internal CS signal of the SPI block.
## Testing
Tested on a custom IMX9 board, with icm42605 IMU sensor connected to LPSPI. Previously, had the CS signal muxed to GPIO1_IO11 (IOMUXC_PAD_SAI1_TXFS_GPIO1_IO11), and moved that to internal PCS signal (IOMUXC_PAD_SAI1_TXFS_LPSPI1_PCS0).
Tested in PX4 environment, showing that all (log):
> listener sensor_gyro -i 2
TOPIC: sensor_gyro instance 2 #1
sensor_gyro
timestamp: 13508265 (0.001096 seconds ago)
timestamp_sample: 13508135 (130 us before timestamp)
device_id: 2686986 (Type: 0x29, SPI:1 (0x00))
x: -0.00207
y: 0.00133
z: -0.00756
temperature: 50.4
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Imx9 enable lpspi pcs manual control [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #17347:
URL: https://github.com/apache/nuttx/pull/17347
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org