Skip to main content
leonsk
Associate
February 27, 2019
Question

STM32f407- Discovery, USB CDC

  • February 27, 2019
  • 2 replies
  • 757 views

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

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
February 27, 2019

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
leonskAuthor
Associate
March 1, 2019

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.