Page 1 of 1

stm32c071 support for spi2

Posted: Sun Mar 22, 2026 9:55 pm
by geoffrey.brown
As far as I can tell, the various support files for this part only list spi1. For example

ChibiOS/tools/ftl/processors/conf/mcuconf_stm32c071xx

and [edit the registry file is ok]

ChibiOS/os/hal/ports/STM32/STM32C0xx/stm32_registry.h

It looks like there are several family members with 2 spi devices and even some with 4 uarts.

table with stm32c0 devices

This is a pretty new part, so I'm guessing it's just a matter of being early to the party.

I can probably patch things to work in my local repo, but I don't feel confident enough in the overall code structure to suggest a patch for the main repo.

Geoffrey

Geoffrey

Re: stm32c071 support for spi2

Posted: Fri Mar 27, 2026 10:38 pm
by geoffrey.brown
Here are the things I had to define to get spi2 working (low-level, not hal driver)


/**
* @brief Disables the SPI2 peripheral clock.
*
* @api
*/

#define rccEnableSPI2(lp) rccEnableAPBR1(RCC_APBENR1_SPI2EN, lp)

/**
* @brief Disables the SPI2 peripheral clock.
*
* @api
*/
#define rccDisableSPI2() rccDisableAPBR1(RCC_APBENR1_SPI2EN)

/**
* @brief Resets the SPI2 peripheral.
*
* @api
*/
#define rccResetSPI2() rccResetAPBR1(RCC_APBRSTR1_SPI2RST)

Re: stm32c071 support for spi2

Posted: Sun Jun 07, 2026 7:19 am
by Giovanni

Re: stm32c071 support for spi2

Posted: Tue Jun 09, 2026 6:17 am
by Giovanni
Hi, change merged.

Giovanni