In function USB_EP0_OutStart is: if (dma == 1U) { USBx_OUTEP(0U)->DOEPDMA = (uint32_t)psetup; /* EP enable */ USBx_OUTEP(0U)->DOEPCTL |= USB_OTG_DOEPCTL_EPENA | USB_OTG_DOEPCTL_USBAEP; }In my opinion enabling endpoint should be out of DMA condi...
In function USB_DevInit (row 320) is some inconsistency: USBx->GOTGCTL &= ~USB_OTG_GCCFG_NOVBUSSENS;should be: USBx->GOCCFG &= ~USB_OTG_GCCFG_NOVBUSSENS; ?STM32CubeF4 version 1.24.1
@Dave Nadler Here we have whole function (original code):/**
* @brief Prepare the EP0 to start the first control setup
* @param USBx Selected device
* @param dma USB dma enabled or disabled
* This parameter can be one of these v...
Agree with Dave Nadler. it's a pity they don't use bit fields. the code would be much more readable. By the way, I'm playing with USB programming in Ada. Of course, I often use records with representation clauses. And this feature of Ada allowed me t...