no-OS
self_test.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef __SELF_TEST_H__
34 #define __SELF_TEST_H__
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include "state_machine.h"
40 
41 /******************************************************************************/
42 /************************* Functions Declarations******************************/
43 /******************************************************************************/
45 int self_test_startup(struct stout *stout,
47 
49 int self_test_relay_stuck(struct stout *stout);
50 
52 int self_test_rcd(struct stout *stout);
53 
55 int self_test_rcd_running(struct stout *stout, uint16_t step,
57 
59 int self_test_supply(struct stout *stout,
61 
63 int self_test_relay_closed(struct stout *stout, int32_t v2);
64 
66 int self_test_pe_upstream(struct stout *stout);
67 
68 #endif /* __SELF_TEST_H__ */
rms_adc_values_read
int rms_adc_values_read(struct stout *stout, struct rms_adc_values *rms)
saves the current and voltage values in rms_adc structure
Definition: supply.c:351
self_test_startup
int self_test_startup(struct stout *stout, struct rms_adc_values *rms_adc_values)
Startup test.
Definition: self_test.c:465
self_test_rcd_running
int self_test_rcd_running(struct stout *stout, uint16_t step, enum state_machine_events_e *event)
Running test for RCD.
Definition: self_test.c:286
INTF_RELAY_ERR
@ INTF_RELAY_ERR
Definition: state_machine.h:75
GPIO_RCDDC_PIN
#define GPIO_RCDDC_PIN
Definition: parameters.h:95
relay_close
int relay_close(struct no_os_gpio_desc *relay)
Close relay command.
Definition: relay.c:91
SAMPLE_PINS_STEP_3
#define SAMPLE_PINS_STEP_3
Definition: parameters.h:120
state_machine_events_e
state_machine_events_e
State machine event.
Definition: state_machine.h:106
stout::ade9113
struct ade9113_dev * ade9113
Definition: state_machine.h:187
self_test_relay_closed
int self_test_relay_closed(struct stout *stout, int32_t v2)
Running test for relay.
Definition: self_test.c:386
PWM_HIGH_TEST_VAL
#define PWM_HIGH_TEST_VAL
Definition: parameters.h:107
PWM_DC
#define PWM_DC
Definition: parameters.h:104
reset_rcd_flag_state
void reset_rcd_flag_state(void)
Reset RCD flag value.
Definition: rcd.c:79
self_test_supply
int self_test_supply(struct stout *stout, struct rms_adc_values *rms_adc_values)
Startup test for power supply.
Definition: self_test.c:68
no_os_gpio_get_value
int32_t no_os_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: no_os_gpio.c:221
get_zero_cross_flag_state
int get_zero_cross_flag_state(void)
Get zero crossing flag value.
Definition: supply.c:71
no_os_delay.h
Header file of Delay functions.
relay_open
int relay_open(struct no_os_gpio_desc *relay)
Open relay command.
Definition: relay.c:81
stout::v2_val
int32_t v2_val
Definition: state_machine.h:201
stout
Structure for Stout machine.
Definition: state_machine.h:185
stout::grid
uint8_t grid
Definition: state_machine.h:211
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
no_os_print_log.h
Print messages helpers.
V2_CLOSED_LIMIT
#define V2_CLOSED_LIMIT
Definition: common_data.h:98
supply.h
Power supply phase interface file.
RESTORE_TEST_PIN_STEP
#define RESTORE_TEST_PIN_STEP
Definition: parameters.h:117
stout::gpio_rcdac
struct no_os_gpio_desc * gpio_rcdac
Definition: state_machine.h:219
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
self_test_relay_closed
int self_test_relay_closed(struct stout *stout, int32_t v2)
Running test for relay.
Definition: self_test.c:386
VIN_HIGH_LIMIT_2
#define VIN_HIGH_LIMIT_2
Definition: common_data.h:86
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
pr_debug
#define pr_debug(fmt, args...)
Definition: no_os_print_log.h:129
SAMPLE_PINS_STEP_1
#define SAMPLE_PINS_STEP_1
Definition: parameters.h:118
self_test_pe_upstream
int self_test_pe_upstream(struct stout *stout)
rms_adc_values::v2_rms
int32_t v2_rms
Definition: state_machine.h:231
self_test_rcd_running
int self_test_rcd_running(struct stout *stout, uint16_t step, enum state_machine_events_e *event)
Running test for RCD.
Definition: self_test.c:286
inter.h
GPIO interrupt phase interface file.
stout::err_status
enum interface_err_status_e err_status
Definition: state_machine.h:221
stout::gpio_rcm_test
struct no_os_gpio_desc * gpio_rcm_test
Definition: state_machine.h:217
relay_state
int relay_state(struct no_os_gpio_desc *relay, uint8_t *state)
Relay command line state.
Definition: relay.c:102
rms_adc_values
Definition: state_machine.h:224
S_M_RCD_TEST_TRIGGERED
@ S_M_RCD_TEST_TRIGGERED
Definition: state_machine.h:120
interface.h
User interface interface file.
INTF_NO_ERR
@ INTF_NO_ERR
Definition: state_machine.h:73
S_M_RCD_TEST_FAIL
@ S_M_RCD_TEST_FAIL
Definition: state_machine.h:124
self_test_relay_stuck
int self_test_relay_stuck(struct stout *stout)
Relay test.
Definition: self_test.c:504
get_gpio_opto_out2_flag_state
int get_gpio_opto_out2_flag_state(void)
Get GPIO Opto_out2 flag value.
Definition: inter.c:144
VIN_HIGH_LIMIT
#define VIN_HIGH_LIMIT
Definition: common_data.h:82
ade9113_dev::irq_ctrl
struct no_os_irq_ctrl_desc * irq_ctrl
Definition: ade9113.h:366
self_test_rcd
int self_test_rcd(struct stout *stout)
Startup test for RCD.
Definition: self_test.c:203
PWM_HIGH_TEST_VAL_EV_CONNECTED
#define PWM_HIGH_TEST_VAL_EV_CONNECTED
Definition: parameters.h:108
get_pwm_high_val
uint32_t get_pwm_high_val(void)
Get PWM HIGH value.
Definition: pilot.c:146
INTF_INPUT_V_ERR_U
@ INTF_INPUT_V_ERR_U
Definition: state_machine.h:79
stout::relay
struct no_os_gpio_desc * relay
Definition: state_machine.h:189
INTF_INIT_RCD_ERROR
@ INTF_INIT_RCD_ERROR
Definition: state_machine.h:85
state_machine.h
STOUT state machine header file.
no_os_callback_desc::event
enum no_os_irq_event event
Definition: no_os_irq.h:148
SAMPLE_PINS_STEP_2
#define SAMPLE_PINS_STEP_2
Definition: parameters.h:119
relay.h
Relay interface file.
VIN_LOW_LIMIT
#define VIN_LOW_LIMIT
Definition: common_data.h:81
pilot_convert_to_mv
uint32_t pilot_convert_to_mv(uint32_t value)
Compute ADC voltage value.
Definition: pilot.c:341
self_test.h
Self-tests interface file.
pilot_pwm_timer_set_duty_cycle
void pilot_pwm_timer_set_duty_cycle(struct stout *stout, unsigned int duty_cycle)
Set PMW duty cycle.
Definition: pilot.c:271
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
DELAY_SELF_TEST_READING
#define DELAY_SELF_TEST_READING
Definition: parameters.h:138
self_test_startup
int self_test_startup(struct stout *stout, struct rms_adc_values *rms_adc_values)
Startup test.
Definition: self_test.c:465
pilot.h
Pilot phase interface file.
self_test_relay_stuck
int self_test_relay_stuck(struct stout *stout)
Relay test.
Definition: self_test.c:504
SELF_TEST_SKIP_CYCLES_NO
#define SELF_TEST_SKIP_CYCLES_NO
Definition: parameters.h:130
rms_adc_values::v1_rms
int32_t v1_rms
Definition: state_machine.h:229
GPIO_RCDAC_PIN
#define GPIO_RCDAC_PIN
Definition: parameters.h:96
no_os_irq_enable
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:181
VIN_LOW_LIMIT_2
#define VIN_LOW_LIMIT_2
Definition: common_data.h:85
INTF_INPUT_V_ERR
@ INTF_INPUT_V_ERR
Definition: state_machine.h:77
no_os_util.h
Header file of utility functions.
get_pwm_low_val
uint32_t get_pwm_low_val(void)
Get PWM LOW value.
Definition: pilot.c:136
no_os_irq_disable
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:198
self_test_supply
int self_test_supply(struct stout *stout, struct rms_adc_values *rms_adc_values)
Startup test for power supply.
Definition: self_test.c:68
INTF_PILOT_ERROR
@ INTF_PILOT_ERROR
Definition: state_machine.h:87
get_gpio_opto_out1_flag_state
int get_gpio_opto_out1_flag_state(void)
Get GPIO Opto_out1 flag value.
Definition: inter.c:124
reset_zero_cross_flag_state
void reset_zero_cross_flag_state(void)
Reset zero crossing flag value.
Definition: supply.c:81
S_M_RCD_TEST_COMPLETED
@ S_M_RCD_TEST_COMPLETED
Definition: state_machine.h:122
self_test_rcd
int self_test_rcd(struct stout *stout)
Startup test for RCD.
Definition: self_test.c:203
stout::gpio_rcddc
struct no_os_gpio_desc * gpio_rcddc
Definition: state_machine.h:218