2023-09-13 03:11 PM - edited 2023-09-13 03:21 PM
Hello, I am creating a sensor using the STM32F401RCT6 and eight SPI ADCs. Because the MCU doesn't have that many SPI ports, I am planning on adding a 3 to 8 decoder in order to handle the Hardware Slave Select (NSS) of the ADCs and daisy chaining the rest into SPI1. Once data is collected, it is sent to a computer via USB. I also want to be able to program the MCU using a USB connection via DFU. I have attached my current schematic, would there be any issues with this solution or would there be a better solution to this problem without selecting a different ADC, or ideally, a different MCU?
2023-09-13 03:19 PM
Hello @gapple12
I think you can use a 8 software CS ( 8 GPIO pin's configured as digital output) and use just SPI1 to all the slaves with a SW CS to each slave.
Best regards.
II
2023-09-13 03:33 PM
The SPI_NSS pin doesn't behave as expected. Would recommend controlling it with a GPIO pin instead.
In which case, having 8 CS pins on a single SPI seems more straightforward.
Otherwise, project seems fine. Might want to check that you can get the bandwidth you want, both out of SPI and USB. USB is going to top out around 5 Mbps with good firmware.
2023-09-13 03:34 PM
All of your power pins are grounded. You likely want to connect them to 3.3V instead.
2023-09-13 03:49 PM
Is this sufficient? I am basing this off a reference schematic that did it this way.
2023-09-13 03:59 PM
Yes, looks good.
In case you haven't seen it, you may want to look at the hardware design guide: