cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f4 usb cdc problem

askari.nima
Associate II
Posted on December 30, 2015 at 09:45

I use last stm32cube.

I use stm32f4-discovery and enable usb cdc and freertos. when connect usb cable , my pc do not detect usb device. when i don't select freertos my pc detect usb device but caution in device manger on COM port.

that example work property on stm32f1. with freertos and without freertos. 

#stm32f4-discover
7 REPLIES 7
askari.nima
Associate II
Posted on December 30, 2015 at 14:52

I post my stm32cube project here.

please see that .

that project work in stm32f103 by default configuration

i change heap size and stack site to 0x8000 and 0x4000 . but it dos't work.

________________

Attachments :

buck_discovery.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtqX&d=%2Fa%2F0X0000000aXm%2FgfPDglEieD5e4cA113vjGt03VYO8zpJhqZnTlUw5CeM&asPdf=false
askari.nima
Associate II
Posted on December 31, 2015 at 06:40

Please Help me.

askari.nima
Associate II
Posted on December 31, 2015 at 07:57

Ohh . I found it. There is a problem in stm32cube library .

code generator do not create HAL_IncTick() function in sys_tick handler

i change this function and work.

void SysTick_Handler(void)

{

  /* USER CODE BEGIN SysTick_IRQn 0 */

HAL_IncTick(); // <<<<<<< add manualy

  /* USER CODE END SysTick_IRQn 0 */

  osSystickHandler();

  /* USER CODE BEGIN SysTick_IRQn 1 */

  /* USER CODE END SysTick_IRQn 1 */

}

carmine
Associate II
Posted on January 21, 2016 at 18:15

I confirm the bug.

stm32cube-t
Senior III
Posted on February 05, 2016 at 17:50

Hello,

this will be fixed in 4.13 release. On top, there will be the possibility to change the HAL timebase source from the default systick time base. This is strongly recommended when using an RTOS.
taraben
Senior
Posted on February 06, 2016 at 23:17

when HAL depends so strongly on Tick for timeouts should then the Systick ISR be an unique ISR priority higher than all other modules (i.e. USB) ?

Currently all priorities are by default 0.

I do change them by myself.

Regards, Adib.

--