2025-06-10 6:23 AM
STM32WB55 NUCLEO
I have 2 ADXL362s on SPI1.
They both have their own separate chip select GPIO pins.
They are both configured the same.
They are both in the same orientation (on the same breadboard).
The output of both is processed using the same logic.
One of them gives expected results, the other is consistent but wrong!
Just as a sanity check, I am OK to run two sensors on the same SPI bus as long as I'm clear which chip is selected?
2025-06-16 4:35 AM
What SPI clock frequency you run ?
4 MHz
Have you verified that none of the CS pins, especially PA9, is connected to onboard peripherals ?
PA9 does have a number alt functions but I have it configured as a GPIO output. When I scope it its acting as expected, PA9 in the lower trace & is going low & high as expected (see image in last post to Andrew)
2025-06-16 4:38 AM
The question was whether the Nucleo board has anything connected on PA9 ...
2025-06-16 4:44 AM
Ahhh right, the user manual says its function is TIM17_CH1. I'm confused here as the scope trace shows it acting as implemented as a GPIO output.
2025-06-16 6:24 AM
You really need to look at the schematics to see if anything else is connected.
2025-06-16 7:33 AM
From the schematic I cant see that PA9 is connected to any other peripherals or devices on the board
2025-06-16 10:56 PM
> Ahhh right, the user manual says its function is TIM17_CH1. I'm confused here as the scope trace shows it acting as implemented as a GPIO output.
I suppose the user manual refers to the demo firmware the board came with. This is most probably not true for your own firmware. Only one "alternate function" of a GPIO can be active at any given time.
You can always check the effective settings in the debugger, stopping the application after initialisation, reading out the respective peripheral registers, and compare it with the reference manual.
Have you tried to capture a complete "false" transmission with a logic analyser, including MISO, MOSI, SCLK, and boths /CS signals ?
2025-06-23 8:05 AM
Well I just cant find the problem so have switched to I2C sensors which all work fine.