2020-10-09 12:35 PM
Using STM32F769, HAL and CubeMX I developed a project where it is necessary to send an average of 764 bytes every 100 microseconds. For this I use the USB DMA and other peripherals.
In version 1.15.0 the code works very well.
After a while, I had to add new features and updated the STM32CubeIDE from version 1.2.0 to 1.4.2.
In version 1.4.2 it is mandatory to use firmware version 1.6.0.
This version broke the code.
To reproduce the problem is very simple:
const uint32_t BUFFER_SIZE = 764;
uint8_t buffer [BUFFER_SIZE];
memset (buffer, 0, BUFFER_SIZE); // ins't necessary
while (1)
{
CDC_Transmit_HS (buffer, BUFFER_SIZE);
HAL_Delay (1); // 1 millisecond already generates an overrun. 100 microseconds becomes impossible
}
In version 1.16.0 the TxState flag is always set to 1.
Analyzing USB communication, a lot of error 0xc0000011 is generated on the host.
The problem has been reproduced in STM32F769-DISC1 and custom board.
Is this a bug or in the new version is it necessary to do something different?