fix(usb): MPU non-cacheable region + IWDG ordering fix (bd-3ulu) #10
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-firmware/bd-3ulu-usb-dcache-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes issue #9: USB CDC TX fails when ICM42688 init is added.
Root cause 1 — IWDG watchdog reset loop (primary blocker):
safety_init()was called beforempu6000_init(). IWDG starts with 50ms timeout butmpu6000_init()takes ~510ms. IWDG fires → MCU resets → infinite loop. USB enumerates during the 3s pre-IWDG delay but board resets before main loop runs.Fix: moved
safety_init()to after all peripheral inits.Root cause 2 — DCache coherency for USB buffers:
Groups USB TX/RX buffers into 512B-aligned struct. MPU Region 0 configured
TEX=1, C=0, B=0(Normal Non-cacheable) inUSBD_LL_Init()beforeHAL_PCD_Init(). DCache stays ON globally. RemovedSCB_DisableDCache()frommain.c.Additional: fix
safety.cIWDG_RELOADmacro (float in #if), addcrsf.cstub.Test plan
Tested on hardware — USB CDC streaming confirmed at 50Hz with IMU data. Both fixes verified: IWDG ordering + DCache MPU region. Merging.