summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-06-17 16:23:19 +0700
committerhathach <[email protected]>2026-06-18 15:35:55 +0700
commit8456821fc2bf54297932fd7e8381c3fe50359b0a (patch)
treeadda74f8bb67a64072ad940549fa26825f4a33e3 /docs/reference
parent8fc0a65ec9bba337f8f6b6f9d6a288b039f17421 (diff)
dcd/stm32_fsdev: make CH32 ep0_set_type read-modify-write atomic
ep0_set_type() read the EP0 register outside any critical section and only ep_write() masked the USB IRQ around the store. A USB interrupt landing between the read and the write (e.g. a new SETUP whose handler installs the BULK gate) was silently undone when the task resumed and wrote back its pre-interrupt snapshot with the type forced to CONTROL, re-exposing the unsolicited EP0 OUT ACK the workaround blocks. Bracket the whole read-modify-write with fsdev_int_disable/enable when called with need_exclusive (task context). ISR-context callers pass false and are unaffected (the ISR cannot preempt itself). Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'docs/reference')
0 files changed, 0 insertions, 0 deletions