IMX RT1060: interfacing with multiple SPI slaves on LPSPI1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX RT1060: interfacing with multiple SPI slaves on LPSPI1

964 Views
farid_mabrouk
Contributor II

I need to get data from three spi slaves connected on the same SPI1 bus. Each slave have different polarity, different chip select, and different baud rate. Do I need to set these parameters every time I need to communicate with a different slave, and then call the InitSpi()? This seems to me a very inefficient way of doing it. Any idea how this can be done in IMX RT1062. 

Thank you in advance!! 

Labels (1)
0 Kudos
1 Reply

788 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Andre marcus ,

   If your slaves have different polarity and different baud rate, then when you use the different slaves, you need to reconfigure the SPI1 module, and use the specific CS pin for the related slave.

   In factor, RT1062 contains 4 LPSPI modules, if you don't want to change the code in one SPI module for the different slave, you can use the different LPSPI module, but your hardware should connect more SPI pins.

pastedImage_1.png

pastedImage_2.png

Wish it helps you!

If you still have questions about it, please kindly let me know.

Have a great day,
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.
-------------------------------------------------------------------------------

0 Kudos