Question
STM32 Flush USB Buffer
Posted on October 12, 2016 at 08:46
Hello all,
I'm using the ST Library for USB Communication via VCP and as CDC Device.Now I'm trying to flush the buffer, when the µC recieves a ''p'' from the PC. I already tried to set APP_Rx_ptr_in and APP_Rx_ptr_outto 0, but this has no effect.How can I flush the buffer properly? Thanks for any advice! Mark Edit: I tried something different, should this do the job?USB_OTG_CORE_HANDLE USB_OTG_dev;
void FlushFifo(void)
{
USB_OTG_FlushTxFifo(&USB_OTG_dev, 0x10); /* all Tx FIFOs */
USB_OTG_FlushRxFifo(&USB_OTG_dev);
}