Hi
I'm using spi to connect two devices (one sensor and the spi flash) to DA14580. The CS_pin connected to the two devices are different. The work flow is that the read data from the sensor and store the data to the flash every minute. The problem is that both of the two devices are connected by spi. The current solution is that read the sensor first and when the data needs to be writen to the flash, release the spi connection to the sensor and init the spi connection to flash and after writing to flash, init the connection to sensor and start to read the data from sensor. So is that possible to make them working simultaneously?
Thank you very much for your help!
Keywords:
Device:
Hi ericzhao,
Since both of the flash share common lines (MISO/MOSI/CLK) you can't have them working simultaneously, only one device can access the bus. And also can't place the 2 spi devices on different pins, the 580 has only one SPI module so you will have to use that SPI module in order to interface with your devices, so you wont be able to operate those devices simultaneously.
Thanks MT_dialog
Thanks a lot for your reply.
这意味着it's not possible to connect two spi devices to da14580 by using two sets of MISO/MOSI/CLK/CS pins. The only way is to share MISO/MOSI/CLK pins and use CS pin to select the active device. Is that right?
Hi ericzhao,
Yes, only on the same bus you can connect additional devices with different chip selects, you can assign the SPI MISO/MOSI/CLK only to one set of pins each time, for example there is no PID_SPI2_DI functionallity since there isn't a second SPI module.
Thanks MT_dialog