Skip to main content
ayaka
Associate II
February 27, 2015
Question

USB VCP on STM32F3 discovery with FreeRTOS

  • February 27, 2015
  • 1 reply
  • 919 views
Posted on February 27, 2015 at 03:04

Hi there,

I have the STM32F3 discovery board and running a FreeRTOS.

I also have the USB virtual Com port (VCP) code from here: http://www.pezzino.ch/stm32f3-discovery-usb-virtual-com-port/ 

I have tested the USB VCP library code by itself and it's working.

FreeRTOS is running fine as well (I can run a timer task and a task).

My problem is when I put them together, the USB is never recognised on the PC side. I think the problem is around the interrupt because I don't seem to get any interrupts when I run with FreeRTOS. I confirmed this by adding a counter in the ISR and debugged it.

I've made sure that NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); is called.

I'm running ideas of what could be the cause.

Has anyone come across this issue? This is my first time using FreeRTOS so maybe I am missing something obvious? Would be appreciated if you could give me a suggestions!

Thanks,

Aelex

    This topic has been closed for replies.

    1 reply

    chadowryudan
    Visitor II
    March 16, 2015
    Posted on March 16, 2015 at 10:59

    Hi Ohira,

    I already worked on a project running both FreeRTOS and VCP libraries.

    I think your problem is due to tasks priority set, try to assign highest priority to VCP task.

    you may find attached the project I told you about which could be a help for you ;)

    ________________

    Attachments :

    VCP_FreeRTOS_Keil.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0az&d=%2Fa%2F0X0000000bau%2FsUiiFki39JyHsyupmXXEkeIiV2MGiC_7ecLoMG9AGt4&asPdf=false