Hi,
I am working on sensor interface which have two SPI interfaces. For accessing data, I have to use different cs pin. So please let me know how will i configure spi as 3 wire interface and gpio for cs, as I don’t have proper details about registers both spi and gpio. I am using K60P144M150SF3 microcontroller. I am using spi 0 for spi interface.
Please let me know anybody having any details about it.
Please share the application or user guide of this K60P144M150SF3 microcontroller.
Thanks & Regards
Vijith G
Hi vijith G ,
Do you want to use just one SPI module, and use two CS pin as the different sensor SPI select pin?
If yes, I suggest you define two GPIO directly.
Then the SPI interface just configure 3 pins: SPI_CLK, SPI_MOSI, SPI_MISO
Then two GPIO as the different SPI_CS, before you send the data, set the CS pin as high.
When you want to send the SPI data to the sensor, then set the CS GPIO pin as low.
You even don't need to configure the SPI related CS register, just control the GPIO register, and the SPI send receive and control register.
Wish it helps you!
If you still have questions about it, please kindly let me know.
Best Regards,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------