2025-08-25 8:18 PM
Hello. I'm trying to configure the STM32C011J4M6 to output SPI in Transmit Only Master mode. However, as soon as I turn on SPI in STM32CubeIDE and program it, the uC stops behaving properly. I can't transmit any data and the clock pin stays high with periodic spikes down to ground. My best guess is that this has something to do with the clock pin being assigned to the reset pin.
I'm able to program it to toggle GPIO separately, but as soon as I try to change the reset pin to a GPIO, all the GPIO stop toggling and the reset pin does the high with spikes thing. That seems to point to this being a "reassign the reset pin" issue than a SPI issue.
Is CubeMX just not disabling the reset pin properly? I don't have anything connected to the uC except the programming SWD clock and data lines, as well as the reset line connected to the programmer.
I've never tried to repurpose the reset pin before, but I can't imagine ST would add an unusable SPI peripheral.
The only changes I've made to main.c are according to the ST Tutorial. The only changes I made in CubeMX were to turn on SPI in Transmit Only Master mode, and to turn on Serial Wire in DEBUG.
Any advice on how to fix this? I've attached the whole workspace folder in case it's useful.