cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong code in stm32f4xx_ll_usb.c line 2004

cs
Associate II

Hello,

In this file, the line:

USBx_HC((uint32_t)ch_num)->HCSPLT |= USB_OTG_HCSPLT_XACTPOS_Pos;

wrongly alters bits 1 to 3 of register HCSPLT

That can be fixed simply by removing this line, since middle payload is encoded by bits 00 in the XACTPOS field.

 

1 REPLY 1
Pavel A.
Super User

Link to the source:

https://github.com/STMicroelectronics/stm32f4xx-hal-driver/blob/61d71646b8e8d7ff76404fbbc95f03d38bcaa938/Src/stm32f4xx_ll_usb.c#L2004

Do you mean that these bits should not be touched after assignment to HCSPLT in line 1972 ?

 

Exactly same code for STM32H7 , here,   here

Exactly same code for STM32H5,  here.

Possibly in other MCUs too.