Skip to content

Commit 54e1973

Browse files
CopilotHiFiPhile
andauthored
Restore errata context comment on inline delay helper
Agent-Logs-Url: https://github.com/hathach/tinyusb/sessions/8588a09c-d4e5-4284-8944-47ae4e2a2a1f Co-authored-by: HiFiPhile <4375114+HiFiPhile@users.noreply.github.com>
1 parent 048bb5c commit 54e1973

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/portable/st/stm32_fsdev/fsdev_common.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,13 @@ uint16_t pma_align_buffer_size(uint16_t size, uint8_t *blsize, uint8_t *num_bloc
467467
// Set RX buffer size
468468
void btable_set_rx_bufsize(uint32_t ep_id, uint8_t buf_id, uint16_t wCount);
469469

470-
// Delay helper for STM32 FSDEV PMA Buffer Description Table errata (ES0561/ES0587).
471-
// Low-speed path uses CFG_TUSB_FSDEV_BTABLE_LS_DELAY_COUNT, otherwise full-speed count.
470+
/* STM32 FSDEV PMA Buffer Description Table errata workaround:
471+
* - ES0561 (STM32H503), ES0587 (STM32U535/U545)
472+
* - CTR may trigger before final PMA SRAM accesses complete on OUT transfers.
473+
* - Insert delay before reading PMA count/data.
474+
*
475+
* Low-speed path uses CFG_TUSB_FSDEV_BTABLE_LS_DELAY_COUNT, otherwise full-speed count.
476+
*/
472477
TU_ATTR_ALWAYS_INLINE static inline void fsdev_btable_workaround_delay(bool low_speed) {
473478
#if defined(TUP_USBIP_FSDEV_STM32) && defined(CFG_TUSB_FSDEV_32BIT)
474479
uint32_t cycle_count = low_speed ? CFG_TUSB_FSDEV_BTABLE_LS_DELAY_COUNT : CFG_TUSB_FSDEV_BTABLE_FS_DELAY_COUNT;

0 commit comments

Comments
 (0)