mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-13 19:19:18 +00:00
Updated the clearing of the status register bits to use a straight '=', rather than an '|='. Use of the latter caused an extra, unwanted read of the status register before the write-to-clear operation, which, in some cases, allowed new status bits to assert (relative to the initial read of the status register two statements earlier), and then be cleared blindly and unconditionally during the write-back. This had the potential (and, in my case, observed) effect of dropping the handling of an enabled interrupt. Ultimately, the system would lock up in a busy state, with no hope of clearing the condition. See Issue #1339 for more information.
This commit is contained in:
parent
b797d1aa50
commit
39fdbc8ffc
@ -657,7 +657,7 @@ void hcd_int_handler(uint8_t rhport)
|
||||
uint32_t int_status = regs->status;
|
||||
int_status &= regs->inten;
|
||||
|
||||
regs->status |= int_status; // Acknowledge handled interrupt
|
||||
regs->status = int_status; // Acknowledge handled interrupt
|
||||
|
||||
if (int_status == 0) return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user