STM32G0B1 board SPI1 boot loop

tried on github. Not welcome there…

SPI1 bug

If I connect a ADXL345 to the SPI1 connector (PA5,6,7 + PB15) the firmware will not boot. No serial device pops up in the Linux host system.
When booting up the MCU there is a burst on SCK with a very short double pulse on MOSI - for this burst I don’t find the source. If an ADXL345 connected to this port, SCK continues toggling (~250kHz) and the ADXL sends data to MISO. In this case, the STM32G0B1 is looping and don’t boot. No USB serial connection pops up in the Linux host.
PB15 (used later for CS) is low at startup so the ADXL is in SPI mode.

controller board used: BTT Manta M8P equipped with a CB1 Linux compute module replacement.

If I plug in the ADXL board later - a few seconds after power-on - it works like expected and ACCELEROMETER_QUERY returns values.

Is here a condition that prevent the firmware from boot?
Is a bootloader within the first 8KiB doing some SPI stuff at start.

As a guess, there may be a bootloader on the stm32g0 board that is trying to communicate to an sdcard over spi1 and the bootloader is getting confused by the results. You should verify no other devices (like an sdcard) is on spi1 and you may need to verify the bootloader and possibly replace it.

-Kevin

I guess that’s the problem. “Firmware Restart” seems to work. So I guess the (preinstalled) bootloader of the BTT Manta M8P causes the problem. I will investigate that. I’m not sure why PB15 is pulled low by default (there is a 4.7K pullup on the ADXL354 board).