AnsweredAssumed Answered


Question asked by PICguy on Oct 28, 2014
Latest reply on Nov 1, 2014 by Osto

For practice I wish to use cube to generate FS USB (device) and 4 analog inputs with FREERTOS.  For now my target is the STM32F4 Discovery board.  Perhaps adding FREERTOS to the project was a mistake.

I am okay with waiting for a command from the host then reading the 4 ADC inputs and outputting all 4 halfwords to the host.  Even better would be to read the ADC values every millisecond and output the last read values to the host.

I have read STM32F4xxx analog ports before.  Indeed, I used my own simple RTOS to implement a 4-port DTMF decode on STM32F405 parts.  

I see 3 places in main.c where I can (likely must) perform some kind of action.  
==> What kinds of things go into each section?
==> How do I wait for the USB host to send a request?
==>And while I’m asking, how does a task wait for the ADC’s DMA ISR?  

The FREERTOS docs I have been able to find say very little. To make things worse the docs seem to assume that I understand much about FREERTOS.