2024-10-24 02:05 AM
https://github.com/STMicroelectronics/stm32h7rsxx-hal-driver/blob/ecc746788b9843dd4295f0acb58b3d15c3477abb/Src/stm32h7rsxx_ll_usb.c
In stm32h7rsxx_ll_usb.c in function USB_CoreInit:
if (USBx == USB_OTG_HS)
{
if (cfg.phy_itface == USB_OTG_HS_EMBEDDED_PHY)
{
/* Init The UTMI Interface */
USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_TSDPS);
}
/* Reset after a PHY select */
ret = USB_CoreReset(USBx);
if (cfg.dma_enable == 1U)
{
USBx->GAHBCFG |= USB_OTG_GAHBCFG_HBSTLEN_2;
USBx->GAHBCFG |= USB_OTG_GAHBCFG_DMAEN;
}
}
It set USB_OTG_GAHBCFG_HBSTLEN_2 in GAHBCFG, so GAHBCFG.HBSTLEN should be 0b0100.
But in RM0477(Reference Manual for STM32H7RS):
Bits 4:1 HBSTLEN[3:0]: Burst length/type
0000 Single: Bus transactions use single 32 bit accesses (not recommended)
0001 INCR: Bus transactions use unspecified length accesses (not recommended, uses the
INCR AHB bus command)
0011 INCR4: Bus transactions target 4x 32 bit accesses
0101 INCR8: Bus transactions target 8x 32 bit accesses
0111 INCR16: Bus transactions based on 16x 32 bit accesses
Others: Reserved
But 0b0100 for HBSTLEN is Reserved. So the code is correct or the RM0477 is correct?
2025-01-08 02:45 AM
Hi @VSF
Thank you for reporting this incoherency, an internal ticket (199817) is submitted to dedicated team.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.