Skip to content

Daisy chain module edge case #123

Open
@sy2002

Description

@sy2002

I stumbled over the following situation in the context of the refactoring of the timer module to use our new daisy chain module. Consider this situation:

  1. The timer fires and therefore requests an interrupt
  2. The CPU cannot handle it, yet, because it is currently in an ISR of that very timer. That ISR has the following task: deleting the ISR address of the timer (with the intention to stop the timer).
  3. The Daisy chain module is latching the request
  4. In the meantime, the ISR sucessfully sets the timer's ISR address register to zero (with the intention to stop the timer). That means: The timer now does not have any ISR address to provide any more. (Because the register was deleted.)
  5. The CPU now has time again to handle interrupts
  6. The Daisy chain module remembers, that there is a latched interrupt request from the timer module
  7. The handshake between the Daisy chain module and the CPU takes place
  8. The Daisy chain module pulls this_grant_n_o to zero
  9. 💥 💥 💥 The timer module puts the ISR address 0x0000 on the data bus 💣 💣 💣

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions