IMX RT1060: interfacing with multiple SPI slaves on LPSPI1

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMX RT1060: interfacing with multiple SPI slaves on LPSPI1

973 次查看
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!! 

标签 (1)
0 项奖励
1 回复

797 次查看
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 项奖励