diff options
| author | hathach <[email protected]> | 2026-06-17 16:23:19 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-06-18 15:35:55 +0700 |
| commit | 8456821fc2bf54297932fd7e8381c3fe50359b0a (patch) | |
| tree | adda74f8bb67a64072ad940549fa26825f4a33e3 /examples/device/hid_multiple_interface/Makefile | |
| parent | 8fc0a65ec9bba337f8f6b6f9d6a288b039f17421 (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 'examples/device/hid_multiple_interface/Makefile')
0 files changed, 0 insertions, 0 deletions
