2019-04-03 03:10 AM
If you compile stm32f4xx_hal_pcd.c with -Wall, you will get signed/unsigned comparison warnings.
Most of them seem minor, however, in line 1299 they do the following:
int32_t len;
..
if(len <= 0U)
{
fifoemptymsk = 0x1U << epnum;
USBx_DEVICE->DIEPEMPMSK &= ~fifoemptymsk;
}
Here, len gets automatically promoted to uint32_t so that it can never be smaller than 0.
Should the comparison be against signed 0, instead of unsigned 0?
2019-04-05 05:07 AM
In latest version V1.24 of F4 HAL library there is not such code in line 1299.
Try download latest version.