Page 2 of 2

Re: Added missing USB (and CRC) related code for STM32C0xx port

Posted: Sun Aug 24, 2025 3:06 pm
by Engemil
Hmm, alright! I'm gonna have to get some progress working on my project. However, I will mark this as something I can investigate in September.


To be noted, I compared quickly TIM2 for the STM32C0xx and STM32G0x1 reference manuals, and saw that in os/common/ext/ST/STM32C0xx/stm32c071xx.h, these things were missing for STM32C071xx

- All of IS_TIM_OCCS_INSTANCE

Code: Select all

/****************** TIM Instances : supporting bitfield OCCS in SMCR register *******************/
#define IS_TIM_OCCS_INSTANCE(INSTANCE)                (((INSTANCE) == TIM1)  || \
                                                       ((INSTANCE) == TIM2)  || \
                                                       ((INSTANCE) == TIM3))


- TIM2 for IS_TIM_TISEL_INSTANCE

Code: Select all

/******************* TIM Instances : Timer input selection ********************/
#define IS_TIM_TISEL_INSTANCE(INSTANCE) (((INSTANCE) == TIM14)  || \
                                         ((INSTANCE) == TIM2)   || \
                                         ((INSTANCE) == TIM16)  || \
                                         ((INSTANCE) == TIM17))


not sure if these things have a big impact on system timer functionality, and might be worth noting.

Re: Added missing USB (and CRC) related code for STM32C0xx port

Posted: Sun Mar 01, 2026 2:19 am
by geoffrey.brown
Any updates on getting tim2 working?

(update -- I see a fix was announced in a different thread)

Re: Added missing USB (and CRC) related code for STM32C0xx port

Posted: Sun Mar 01, 2026 4:53 am
by Giovanni
Hi,

It has been added to trunk code, will be back-ported to 21.x in next release.

Giovanni