IoT Supervisor 0.0
Loading...
Searching...
No Matches
Application Interrupts

Functions

 SI_INTERRUPT (CMP1_ISR, CMP1_IRQn)
 
 SI_INTERRUPT (TIMER0_ISR, TIMER0_IRQn)
 
 SI_INTERRUPT (TIMER1_ISR, TIMER1_IRQn)
 
 SI_INTERRUPT (UART0_ISR, UART0_IRQn)
 
 SI_INTERRUPT (ADC0EOC_ISR, ADC0EOC_IRQn)
 

Detailed Description

Function Documentation

◆ SI_INTERRUPT() [1/5]

SI_INTERRUPT ( ADC0EOC_ISR  ,
ADC0EOC_IRQn   
)

ADC0EOC ISR Content goes here. Remember to clear flag bits:

  • ADC0CN0::ADINT (Conversion Complete Interrupt Flag)

ADC0 End of Conversion ISR

This ISR is called when the ADC finishes converting. In this application, it should be configured for every 50ms or so.

Definition at line 196 of file Interrupts.c.

◆ SI_INTERRUPT() [2/5]

SI_INTERRUPT ( CMP1_ISR  ,
CMP1_IRQn   
)

CMPn ISR Content goes here. Remember to clear flag bits:

  • CMPnCN0::CPFIF (Comparator Falling-Edge Flag)
  • CMPnCN0::CPRIF (Comparator Rising-Edge Flag)

This ISR implements the immediate voltage low reset for the SBC.

Definition at line 32 of file Interrupts.c.

◆ SI_INTERRUPT() [3/5]

SI_INTERRUPT ( TIMER0_ISR  ,
TIMER0_IRQn   
)

TIMER0 ISR Content goes here. Remember to clear flag bits:

  • TCON::TF0 (Timer 0 Overflow Flag)

ISR for modbus message timeout

Note
This is actually the timer 0 low ISR since timer0 is split into two timers.

Modbus implements a "T_1.5" timeout between bytes. Clearing the data in the modbus buffer invalidates it.

Definition at line 73 of file Interrupts.c.

◆ SI_INTERRUPT() [4/5]

SI_INTERRUPT ( TIMER1_ISR  ,
TIMER1_IRQn   
)

TIMER1 ISR Content goes here. Remember to clear flag bits:

  • TCON::TF1 (Timer 1 Overflow Flag)

ISR for for timing (1 ms)

Actually the timer 0 high ISR since timer0 is split into two timers.

This is more or less the main timing source for the functions on this application.

Definition at line 116 of file Interrupts.c.

◆ SI_INTERRUPT() [5/5]

SI_INTERRUPT ( UART0_ISR  ,
UART0_IRQn   
)

UART0 ISR Content goes here. Remember to clear flag bits:

  • RI::SCON0 (UART 0 Receive Flag)
  • TI::SCON0 (UART 0 Transmit Flag)

ISR for for UART

On UART receive, this ISR is called to insert the received byte into the petit modbus buffer.

On UART transmit, this ISR is called to start transmitting the next byte

Note
both UART transmit and UART receive interrupts are implemented here

Definition at line 155 of file Interrupts.c.