Skip to main content
Pkush.1
Associate
December 8, 2023
Question

USB CDC BAREMETAL

  • December 8, 2023
  • 2 replies
  • 1179 views

Hello everyone,

 

Here i'm trying to implement USB CDC FS on STM32F107VCT6 using Standard Library(without HAL Library), but when i am trying to initialize clock for USB (RCC_APB1ENR_USBEN) its showing error that this register is not available for Connectivity line devices.

 

can anyone guide me how can i implement it.

 

Thanks in Advance,

This topic has been closed for replies.

2 replies

TDK
December 8, 2023

Interesting, it does seem to be missing in the CMSIS header, along with I2C2.

https://github.com/STMicroelectronics/cmsis_device_f1/blob/de5b35db7fd13143ddb362d4626b7fca847fafee/Include/stm32f107xc.h

You can define it yourself:

#define RCC_APB1ENR_USBEN_Pos (23U) 
#define RCC_APB1ENR_USBEN_Msk (0x1UL << RCC_APB1ENR_USBEN_Pos) /*!< 0x00200000 */
#define RCC_APB1ENR_USBEN RCC_APB1ENR_USBEN_Msk /*!< USB clock enable */

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
Piranha
Principal III
December 10, 2023

Looking at the order chaos of the bit fields in that file, it is pretty clear why it is missing values...