summaryrefslogtreecommitdiff
path: root/docs/getting_started.rst
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-07-16 14:11:04 +0700
committerhathach <[email protected]>2026-07-17 16:48:02 +0700
commita3ee0b4ff12615552de50bd2a61287fdb0b11bd9 (patch)
tree93c6f0232f4f33a5c4e91d5315c917a1c97612b2 /docs/getting_started.rst
parent36cd9f9f46ca20be907ed57b874d9d1dc7b3bf64 (diff)
dcd_lpc17_40: mask USB IRQ around non-reentrant SIE and realization sequences
The SIE command protocol (CmdCode + CCEMPTY/CDFULL handshake), the slave-mode Ctrl/RxData/TxData window, the EpIntEn read-modify-writes, and set_ep_size's ReEp/EP_RLZED handshake are all shared between thread-mode API calls and dcd_int_handler, and none are reentrant: an ISR preempting a thread-mode sequence consumes its handshake flags or, in set_ep_size's case, a bus reset's DevIntClr = 0xFFFFFFFF eats the EP_RLZED flag the spin waits on, hanging it forever. Guard them by masking only the USB IRQ (nestable, ISR-safe; CMSIS NVIC_DisableIRQ already ends with DSB+ISB). control_xact keeps the mask across its in_isr=true event push, since osal_none skips queue locking for in_isr. Hardening, not a fix for an observed failure: the ea4088 usbtest 30/30 + HIL 14/14 results were reproduced with and without it. The windows are a few instructions wide and most exposed on RTOS builds where class drivers queue transfers from tasks concurrent with the USB IRQ.
Diffstat (limited to 'docs/getting_started.rst')
0 files changed, 0 insertions, 0 deletions