2015-08-14 01:23 PM
I have been writing my own USB driver. While debugging an issue with the receive buffer/receive fifo I came across this issue.
I am using an STM32F205VCT processor with an external HS Phy (USB3300). The function HAL_PCD_Init calls the function USB_CoreInit and it will initialize the required registers. I am using DMA. So this code will be executed:if(cfg.dma_enable == ENABLE) { USBx->GAHBCFG |= (USB_OTG_GAHBCFG_HBSTLEN_2 | USB_OTG_GAHBCFG_HBSTLEN_1); USBx->GAHBCFG |= USB_OTG_GAHBCFG_DMAEN; }with&sharpdefine USB_OTG_GAHBCFG_HBSTLEN_1 ((uint32_t)0x00000004) /*!<Bit 1 */&sharpdefine USB_OTG_GAHBCFG_HBSTLEN_2 ((uint32_t)0x00000008) /*!<Bit 2 */Unfortunately, this will be evaluated to be ''0b1100'' and will be or'd onto the register. Resulting in a value of ''0b0110'' for the HBSTLEN value. Unfortunately, this is an invalid value, but no error is thrown!Can someone verify this? The Code was initially generated with the latest version of cubemx!If you would like to get more information on my USB Driver, just let me know. #usb #hal #!bug2015-08-17 04:25 AM
Hi,
I will check this problem with our development team & come back to you.Sorry for the inconvenience may bring.-Syrine-2015-12-23 05:30 AM
Hi Robert,
Your reported issue is confirmed by our team and will be fixed in coming release of the STM32cubeF2 package.Thank you very much for your contribution to the enhancement of our STM32 related solutions.-Syrine-