Good morning, Miss, Mister.
My name is Florent Mosnier, and I am (still) working on a project where I need to log the measures of 9 accelerometers on an SD card in real time.
I firstly made progress, but a glitch of the board has stopped my project for 10 months already :
when putting too many devices on the same SPI bus, the transactions are dropped (the CS line goes back to high before the transaction's end) (see the chronograms below : yellow is Sck, purple is MOSI, blue is MISO and green is a CS line)
My system is centered around a teensy4.0, that I picked for it's two SPI ports (one for the sensors and the other for the SD card).
Every sensor is an LSM6DSOX module made by adafruit : https://www.adafruit.com/product/4438
They are all connected on the secondary SPI bus (SCK on pin 27, MOSI on pin 26, and MISO on pin 1)
I made a dedicated pcb to hold every component in place, and made extra care to decrease noise sources on the spi bus :
ground planes, spi lines sandwiched between ground tracks, CS tracks sandwiched between ground tracks,
for the simplicty of making the pcb on a CNC, it's single faced and ground plane part connected to the others every 3cm (or even more often) with gage 30 wire (I used some wire wrapping wire)
lastly, the power delivered to the sensors by another pcb that connects to the main one with pin headers.
The issues appear systematically when more than two sensors are connected on the bus, it's not a matter of where the sensors are placed, everything place works beautifully when there is only one sensor on the bus, every one of my sensors works reliably when it is alone on the bus or in pairs, but when they are 3 or more, every SPI transaction is dropped by the MCU, with the same program running in the two cases, and strangely, the teensy4.0 heats up the more sensors there is on the bus
I use the code below to test if every place for a sensor responds and gives a proper response when reading the WHO_AM_I register,
I tried increasing the bus frequency to 10 MHz, no results, lowering it to 1 MHz, always the same issue, modifying the sensor boards to remove all the level-shifting components (I power them with 3.3V from the teensy anyway), no improovements
If anyone has some ideas to improve the situation, it would be greatly appreciated
My name is Florent Mosnier, and I am (still) working on a project where I need to log the measures of 9 accelerometers on an SD card in real time.
I firstly made progress, but a glitch of the board has stopped my project for 10 months already :
when putting too many devices on the same SPI bus, the transactions are dropped (the CS line goes back to high before the transaction's end) (see the chronograms below : yellow is Sck, purple is MOSI, blue is MISO and green is a CS line)
My system is centered around a teensy4.0, that I picked for it's two SPI ports (one for the sensors and the other for the SD card).
Every sensor is an LSM6DSOX module made by adafruit : https://www.adafruit.com/product/4438
They are all connected on the secondary SPI bus (SCK on pin 27, MOSI on pin 26, and MISO on pin 1)
I made a dedicated pcb to hold every component in place, and made extra care to decrease noise sources on the spi bus :
ground planes, spi lines sandwiched between ground tracks, CS tracks sandwiched between ground tracks,
for the simplicty of making the pcb on a CNC, it's single faced and ground plane part connected to the others every 3cm (or even more often) with gage 30 wire (I used some wire wrapping wire)
lastly, the power delivered to the sensors by another pcb that connects to the main one with pin headers.
The issues appear systematically when more than two sensors are connected on the bus, it's not a matter of where the sensors are placed, everything place works beautifully when there is only one sensor on the bus, every one of my sensors works reliably when it is alone on the bus or in pairs, but when they are 3 or more, every SPI transaction is dropped by the MCU, with the same program running in the two cases, and strangely, the teensy4.0 heats up the more sensors there is on the bus
I use the code below to test if every place for a sensor responds and gives a proper response when reading the WHO_AM_I register,
I tried increasing the bus frequency to 10 MHz, no results, lowering it to 1 MHz, always the same issue, modifying the sensor boards to remove all the level-shifting components (I power them with 3.3V from the teensy anyway), no improovements
If anyone has some ideas to improve the situation, it would be greatly appreciated