Hi,
How can I connect multiple SPI slave devices to PAN1740 with different chip selects?
如何配置和读取数据code?
Thank you
Bharath
Device:
Hi,
How can I connect multiple SPI slave devices to PAN1740 with different chip selects?
如何配置和读取数据code?
Thank you
Bharath
Hi Bharath,
This question is not BLE, 58x or 68x related, connecting different spi devices over one SPI bus is something that you can find over the web. Nevertheless the idea is to connect the MISO/MOSI/CLK lines of each module on the same pins and connect the CS on different pins. Everytime that you would like to talk to an SPI device just pull the CS of the specific device to low so that you will enable it and then start outputing data and clock.
Thanks MT_dialog
Hi MT_dialog,
thanks for your suggestion.
Should I use spi_init for every CS or only GPIO_ConfigurePin as SPI_EN is enough?
Thanks
Bharath
Hi Bharath,
You will have to configure a different SPI_EN pin every time you would like to communicate with a different device and initialize the 580's spi module depending on the configuration the spi device has, the frequency that the module listens to, the polarity etc and since the driver includes the setting up of the proper CS pin you will have to set that as well.
Thanks MT_dialog