cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f407- Discovery, USB CDC

leonsk
Associate II

Hello all,

i am using STM32f407-Discovery. I am working with USB CDC in FS mode. Code for that was generate with CubeMX and HAL libraries. 

My question is if anyone has already done the USB CDC communication with SPL libraries or registers?

I want this because my other program is written with SPL libraries and i want to merge together.

Sorry for my bad english

2 REPLIES 2

https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32-standard-peripheral-library-expansion/stsw-stm32046.html is SPL based. Whether this fulfills your requirements, it's up to you to judge.

But the USB itself has quite a little hardware dependencies - you need to set some clocks, a couple of pins, one interrupt, and that's basically it - so if you think the CubeMX-generated code is OK for you, it shouldn't be too complicated to stitch it to any other code.

JW

leonsk
Associate II

CubeMX generate code with HAL libraries, but i won't that. I need code with SPL libraries and i don't know, how convert code with HAL to SPL.

https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32-standard-peripheral-library-expansion/stsw-stm32046.html in this code are two interrupt, one on USART and one on USB OTG.