PaxInstruments / labwiz-board

A development board based on the STM32 series processors specifically targeting the STM32F103RxT series.
4 stars 2 forks source link

Module interface (SPI and USART) #122

Closed robojay closed 7 years ago

robojay commented 7 years ago

How is the SPI chip select being handled? How will two SPI modules avoid conflicts?

Is the intent to use one of the GPIO lines as the SPI chip select? Will that need to be configured on each module? Or will SPI always use the same GPIO?

Similarly, how is the sharing of the USART2 channel being handled? Multi-drop? Chip select?

charlespax commented 7 years ago

There are four modules (1-4). Modules 1 and 3 each have one hardware SPI_NSS line and one GPIO. Modules 2 and 4 each have two GPIO lines. Modules 1 and 2 share a SPI port while modules 3 and 4 share another SPI port.

I believe there will not be a conflict with module 1 using the hardware SPI_NSS while module 2 uses a GPIO as the chip select. If there is a conflict, we can set the module 1 SPI_NSS pin to be in regular GPIO mode and be treated the same as module 2.

Sharing of USART2 would have to be done using the GPIO pins on the modules. The firmware would have to use a module GPIO line as a clear to send (CTS) signal to the module.