System interrupts

This is advanced, low-level functionality, intended primarily for library writers.


Gen 2 Devices (STM32) (E-Series, Electron, Photon, and P2; does not include E404X):

System interrupts happen as a result of peripheral events within the system.

Identifier Description
SysInterrupt_SysTick System Tick (1ms) handler
SysInterrupt_TIM3 Timer 3 interrupt
SysInterrupt_TIM4 Timer 4 interrupt
SysInterrupt_TIM5 Timer 5 interrupt
SysInterrupt_TIM6 Timer 6 interrupt
SysInterrupt_TIM7 Timer 7 interrupt
  • SysInterrupt_TIM3 and SysInterrupt_TIM4 are used by the system to provide tone() and PWM output.
  • SysInterrupt_TIM5 is used by the system to provide tone() and PWM output.
  • SysInterrupt_TIM7 is used as a shadow watchdog timer by WICED when connected to JTAG.

See the full list of interrupts in the firmware repository.

When implementing an interrupt handler, the handler must execute quickly, or the system operation may be impaired. Any variables shared between the interrupt handler and the main program should be declared as volatile to ensure that changes in the interrupt handler are visible in the main loop and vice versa.