PER Firmware
Loading...
Searching...
No Matches
imd_decode.c File Reference

IMD PWM state decoding and insulation resistance calculation. More...

#include "imd_decode.h"
Include dependency graph for imd_decode.c:

Functions

void imd_capture_update (volatile imd_capture_tracker_t *tracker, uint32_t period_ticks, uint32_t high_ticks, uint32_t now_ms, bool cycle_ok)
 
static bool is_between (float value, float minimum, float maximum)
 
static bool frequency_matches (float measured_hz, float expected_hz)
 
static imd_state_t state_from_pwm (float frequency_hz, float duty_pct)
 
static void calculate_resistance (float duty_pct, imd_measurement_t *result)
 
imd_measurement_t imd_decode (const imd_capture_t *capture, uint32_t now_ms)
 

Detailed Description

IMD PWM state decoding and insulation resistance calculation.

Author
Millan Kumar (kumar.nosp@m.798@.nosp@m.purdu.nosp@m.e.ed.nosp@m.u)

Function Documentation

◆ calculate_resistance()

static void calculate_resistance ( float duty_pct,
imd_measurement_t * result )
static
Here is the caller graph for this function:

◆ frequency_matches()

static bool frequency_matches ( float measured_hz,
float expected_hz )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ imd_capture_update()

void imd_capture_update ( volatile imd_capture_tracker_t * tracker,
uint32_t period_ticks,
uint32_t high_ticks,
uint32_t now_ms,
bool cycle_ok )
Here is the caller graph for this function:

◆ imd_decode()

imd_measurement_t imd_decode ( const imd_capture_t * capture,
uint32_t now_ms )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_between()

static bool is_between ( float value,
float minimum,
float maximum )
static
Here is the caller graph for this function:

◆ state_from_pwm()

static imd_state_t state_from_pwm ( float frequency_hz,
float duty_pct )
static
Here is the call graph for this function:
Here is the caller graph for this function: