IoT Supervisor 0.0
Loading...
Searching...
No Matches
Voltage In and Reset State Machine

vin and reset the state machine More...

Macros

#define SCOUNTER_ONE_SECOND   (125)
 

Enumerations

enum  VinSm_t { eVIN_Init = 0 , eVIN_VLow , eVIN_OK }
 

Functions

void VinSm (void)
 

Variables

bool nReset = false
 
bool modbusWdtSmEn = false
 
bool cprif = false
 
bool modbusWdtExp = false
 

Detailed Description

vin and reset the state machine

stateDiagram-v2 direction LR [*] --> Init Init --> OK: Two Seconds Init --> VLow: Voltage In Low OK --> VLow: Voltage In Low OK --> VLow: Modbus Timeout VLow --> Init: Voltage In Normal
flowchart LR start(( )) subgraph Interrupts.c subgraph TIMER1_ISR["TIMER1_ISR()"] div8["Divide By 8 Calls"] end end subgraph IoT supervisor_main.c VinSm["VinSm( )"] end start -->|every 1 ms| div8 div8 -->|every 8 ms| VinSm
The reset and voltage in state machine responds to reset sources and pulls the reset line down for two seconds upon the reset source triggering. The detailed implementation is different for each reset source. The voltage in reset source pulls down for as long as it is running. It only reaches the two second countdown once the vin state is cleared. The WDT reset source fires once and automatically reaches the two second countdown.

Macro Definition Documentation

◆ SCOUNTER_ONE_SECOND

#define SCOUNTER_ONE_SECOND   (125)

Definition at line 195 of file IoT Supervisor_main.c.

Enumeration Type Documentation

◆ VinSm_t

enum VinSm_t

Voltage in (and Reset) State Machine _ Type

Voltage in (and Reset) State Machine _ Type

Enumerator
eVIN_Init 

Voltage in and Reset State Machine Initial State

The state machine sets reset to true in this state, and the state machine transitions into this state when the Modbus WDT bites. eVIN_Init

eVIN_VLow 

Voltage Low State.

eVIN_OK 

Voltage in and Reset State Machine OK.

Definition at line 48 of file IoT_Supervisor.h.

Function Documentation

◆ VinSm()

void VinSm ( void  )

Voltage in state machine. Perhaps this could be called the main state machine in this application.

The state machine starts in the reset mode to enable a boot-up delay on the SBC so that screens and stuff can initialize before the board does.

Definition at line 204 of file IoT Supervisor_main.c.

Variable Documentation

◆ cprif

bool cprif = false

Definition at line 190 of file IoT Supervisor_main.c.

◆ modbusWdtExp

bool modbusWdtExp = false

Definition at line 192 of file IoT Supervisor_main.c.

◆ modbusWdtSmEn

bool modbusWdtSmEn = false

Definition at line 187 of file IoT Supervisor_main.c.

◆ nReset

bool nReset = false

Definition at line 186 of file IoT Supervisor_main.c.