cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC BAREMETAL

Pkush.1
Associate

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,

2 REPLIES 2
TDK
Guru

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".

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