2025-07-22 2:38 AM
Good afternoon Team,
I am working on a project where I need to interface two SPI peripherals with an ST microcontroller (STM32G070RBT6).
One peripheral (ADS124S06) operates in SPI Mode 1 (CPOL=0, CPHA=1), and the other (64128L FC BW-RGB Display) in SPI Mode 0 (CPOL=0, CPHA=0).
Both peripherals must operate concurrently to ensure real-time data visualization.
Is it possible to use a single SPI interface for both peripherals, even though they require different modes?
Are there any potential timing or synchronization issues to consider?
Thank you in advance for your support!
Solved! Go to Solution.
2025-07-22 12:21 PM - edited 2025-07-22 12:22 PM
1) Yes.
2) Yes. Depending on your comfort level, either reconfigure directly in registers or tear the whole thing down with HAL_SPI_DeInit and set back up in HAL_SPI_Init. Ensure CS pins remain high while other pins are reconfigured.
3) In general, no. If CS pins are handled appropriately, the device will ignore the other SPI line activity while CS pins are low. Double check datasheets to ensure this is the case. Ensure CLK line is activated prior to setting CS low. A logic analyzer will help out here.
2025-07-22 12:21 PM - edited 2025-07-22 12:22 PM
1) Yes.
2) Yes. Depending on your comfort level, either reconfigure directly in registers or tear the whole thing down with HAL_SPI_DeInit and set back up in HAL_SPI_Init. Ensure CS pins remain high while other pins are reconfigured.
3) In general, no. If CS pins are handled appropriately, the device will ignore the other SPI line activity while CS pins are low. Double check datasheets to ensure this is the case. Ensure CLK line is activated prior to setting CS low. A logic analyzer will help out here.