stm32c071 support for spi2 Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
geoffrey.brown
Posts: 122
Joined: Thu May 07, 2015 9:47 pm
Has thanked: 3 times
Been thanked: 18 times

stm32c071 support for spi2

Post 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
geoffrey.brown
Posts: 122
Joined: Thu May 07, 2015 9:47 pm
Has thanked: 3 times
Been thanked: 18 times

Re: stm32c071 support for spi2

Post 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)
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32c071 support for spi2

Post by Giovanni »

User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32c071 support for spi2

Post by Giovanni »

Hi, change merged.

Giovanni
Post Reply