2019-03-30 08:52 PM
Hope someone that has implemented FreeRTOS with USB can provide advice on what specifically needs to be changed in the USB Host code to allow the USB to operate in the RTOS environment. I have USB functioning on the target board, without FreeRTOS. When I bring in FreeRTOS (using CubeMX), it breaks and does not operate. I have any user code protected in the delimited sections. I also tried in tick/tickless modes.
Why would CubeMX add in FreeRTOS and break the perfectly good USB interface? I guess CubeMX will give you one or the other, not both.
Any suggestions or references would be appreciated, thanks!
2019-03-31 11:25 AM
Working.
2019-03-31 12:06 PM
I just use a buffer where I copy data received from USB and afterwards process it in an RTOS task, that's all. Reply can be done from task without any problem.
2019-03-31 01:17 PM
It just was not working, period. I had to do a few things - set the VBUS pin (PA9), set interrupt priorities, and finally, create the interrupt handler. I did not want Cube to do the USB setup after 3 unsuccessful attempts. Just created it manually and it now functions flawlessly.
Thanks, I understand your answer, but I do not use USB "live" in my application, all my processing starts before the scheduler starts (off-loading PRAM memory) .