Go to the documentation of this file.
40 #ifndef __PARAMETERS_H__
41 #define __PARAMETERS_H__
46 #include "maxim_uart_stdio.h"
47 #include "maxim_gpio.h"
48 #include "maxim_uart.h"
49 #include "maxim_irq.h"
50 #include "maxim_i2c.h"
51 #include "maxim_spi.h"
56 #define UART_IRQ_ID UART0_IRQn
58 #define UART_DEVICE_ID 0
59 #define UART_BAUDRATE 57600
60 #define UART_EXTRA &ade9113_uart_extra_ip
61 #define UART_OPS &max_uart_ops
63 #define I2C_DEVICE_ID 1
64 #define I2C_OPS &max_i2c_ops
65 #define I2C_EXTRA &adt75_i2c_extra
68 #if (TARGET_NUM == 78000)
69 #define SPI_DEVICE_ID 1
71 #elif (TARGET_NUM == 32650)
72 #define SPI_DEVICE_ID 1
75 #define SPI_DEVICE_ID 1
79 #define SPI_BAUDRATE 1000000
80 #define SPI_OPS &max_spi_ops
81 #define SPI_EXTRA &ade9113_spi_extra_ip
84 #define GPIO_OPS &max_gpio_ops
85 #define GPIO_EXTRA &ade9113_gpio_extra_ip
86 #define GPIO_RDY_PIN_NUM 15
87 #define GPIO_RDY_PORT_NUM 0
89 #define GPIO_IRQ_OPS &max_gpio_irq_ops
90 #define GPIO_CTRL_IRQ_ID 0
91 #define GPIO_IRQ_EXTRA &ade9113_gpio_extra_ip
92 #define NVIC_GPIO_IRQ GPIO0_IRQn
94 #define GPIO_RESET_PIN_NUM 19
95 #define GPIO_RESET_PORT_NUM 0
97 #define GPIO_ZC_PIN 14
100 #define GPIO_RCM_TEST_PIN 18
101 #define GPIO_RCDDC_PIN 26
102 #define GPIO_RCDAC_PIN 27
105 #define FREQ 1000 // (Hz)
106 #define PWM_TIMER MXC_TMR0 // Port 0, Pin 2 output
107 #define PWM_LOW_TIMER MXC_TMR1 // Timer for measuring CP Low voltage
108 #define PWM_DUTY_10A (166u)
109 #define PWM_DUTY_16A (266u)
110 #define PWM_DC (999u)
112 #define PWM_LOW_TEST_VAL (160u)
113 #define PWM_HIGH_TEST_VAL (1890u)
114 #define PWM_HIGH_TEST_VAL_EV_CONNECTED (1600u)
116 #define ADC_CHANNEL MXC_ADC_CH_0
118 #define TAKE_S_M_ACTION (1000u)
120 #define RELAY_CHECK_STEP (3u)
122 #define MEASURE_RCDAC_RCDDC_STEP (108u)
123 #define RESTORE_TEST_PIN_STEP (3u)
124 #define SAMPLE_PINS_STEP_1 (37u)
125 #define SAMPLE_PINS_STEP_2 (72u)
126 #define SAMPLE_PINS_STEP_3 (108u)
128 #define MEASURE_OVERCURRENT_STEP (300u)
130 #define I_LIMIT_NOT_CHG (200u)
132 #define I_LIMIT_16A (16500u)
134 #define I_LIMIT_10A (10500u)
136 #define SELF_TEST_SKIP_CYCLES_NO (50u)
138 #define SKIP_CYCLES_AFTER_SELF_TEST (100u)
141 #define SKIP_CYCLES_AFTER_RELAY_SW (150u)
144 #define DELAY_SELF_TEST_READING (300u)
146 #define VALUE_20MS (20000u)
148 #define RCD_TIME_REPEAT_INTERVAL (10u)
150 #define PRINT_VALUES_TIME (4u)
152 #define COMPUTE_VALUES_INTERVAL (5u)
154 #define COMPUTE_VRELAY_INTERVAL (25u)
156 #define TEMPERATURE_READ_RATE (250u)
158 #define DIODE_ERR_DELAY (20u)
160 #define CP_DIODE_ERROR_LIMIT (150u)
162 #define LED_BLINKING_16A (4u)
164 #define LED_BLINKING_10A (8u)
166 #define CP_H_LOW_LIMIT (1100u)
168 #define CPH_A_LIMIT_HIGH (1890u)
170 #define CPH_A_LIMIT_LOW (1800u)
172 #define CPH_B_LIMIT_HIGH (1670u)
174 #define CPH_B_LIMIT_LOW (1600u)
176 #define CPH_C_LIMIT_HIGH (1450u)
178 #define CPH_C_LIMIT_LOW (1390u)
180 #define CPH_D_LIMIT_HIGH (1226u)
182 #define CPH_D_LIMIT_LOW (1180u)
184 #define CP_DC_PWM_DELAY (2000u)
186 #define ADJUST_TIME (5000l)
189 #define INT_PORT (2u)
191 #define INT_PIN_OPTO1 (5u)
192 #define INT_PIN_OPTO2 (7u)
Structure holding the initialization parameters for stm32 platform specific SPI parameters.
Definition: stm32_spi.h:55
@ SPI0_SCK_GP18
Definition: pico_spi.h:86
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
TIM_HandleTypeDef * htimer
Definition: stm32_timer.h:52
Structure holding the initialization parameters for stm32 platform specific GPIO IRQ parameters.
Definition: stm32_gpio_irq.h:50
const struct no_os_i2c_platform_ops max_i2c_ops
MAXIM platform specific I2C platform ops structure.
Definition: maxim_i2c.c:328
uint16_t uart_tx_pin
Definition: mbed_uart.h:70
@ GPIO_PS
Definition: xilinx_gpio.h:62
@ SPI_PS
Definition: xilinx_spi.h:68
@ UART_PL
Definition: xilinx_uart.h:63
bool continuous_mode
Definition: aducm3029_spi.h:97
enum xil_uart_type type
Definition: xilinx_uart.h:75
Definition: maxim_i2c.h:64
Definition: aducm3029_timer.h:94
const struct no_os_eeprom_platform_ops eeprom_24xx32a_ops
24XX32A EEPROM specific ops structure
Definition: 24xx32a.c:235
@ SPI_SS_POL_LOW
Definition: maxim_spi.h:55
uint32_t mode
Definition: stm32_gpio.h:52
int32_t port
Definition: no_os_gpio.h:87
@ UART_PS
Definition: xilinx_uart.h:65
mxc_gpio_vssel_t vssel
Definition: maxim_i2c.h:65
uint32_t irq_id
Definition: no_os_uart.h:120
Configuration structure sent in the extra parameter from no_os_spi_init_param.
Definition: aducm3029_spi.h:93
Structure holding the initialization parameters for stm32 platform specific timer parameters.
Definition: stm32_timer.h:51
Structure holding the initialization parameters for stm32 platform.
Definition: stm32_gpio.h:50
uint32_t device_id
Definition: xilinx_gpio.h:74
@ SPI0_CS_GP17
Definition: pico_spi.h:99
@ NO_OS_PULL_NONE
Definition: no_os_gpio.h:72
Specific initialization parameters for stm32 UART.
Definition: stm32_uart.h:52
enum max_uart_flow_ctrl flow
Definition: maxim_uart.h:62
uint32_t device_id
Definition: no_os_eeprom.h:66
24XX32A EEPROM init params structure
Definition: 24xx32a.h:58
Maxim specific SPI initialization parameters.
Definition: maxim_spi.h:59
@ SPI_PL
Definition: xilinx_spi.h:66
uint16_t spi_miso_pin
Definition: mbed_spi.h:70
uint8_t port_nb
Definition: stm32_gpio_irq.h:51
enum avail_freqs source_freq
Definition: aducm3029_timer.h:96
Additional SPI config parameters.
Definition: pico_spi.h:125
Structure holding the SPI init parameters for mbed platform.
Definition: mbed_spi.h:69
Structure holding the initialization parameters for Xilinx platform specific UART parameters.
Definition: xilinx_uart.h:73
Aditional UART config parameters.
Definition: maxim_uart.h:61
@ UART_FLOW_DIS
Definition: maxim_uart.h:53
enum xil_spi_type type
Definition: xilinx_spi.h:80
const struct no_os_gpio_platform_ops max_gpio_ops
maxim platform specific GPIO platform ops structure
Definition: maxim_gpio.c:326
uint32_t chip_select_port
Definition: stm32_spi.h:57
mxc_gpio_vssel_t vssel
Definition: maxim_gpio.h:63
const struct no_os_uart_platform_ops max_uart_ops
Maxim platform specific UART platform ops structure.
Definition: maxim_uart.c:481
GPIO platform specific init parameters.
Definition: maxim_gpio.h:61
Structure holding the initialization parameters for axi PWM.
Definition: axi_pwm_extra.h:56
@ SPI_ENGINE
Definition: xilinx_spi.h:70
Structure holding the initialization parameters for Xilinx platform specific SPI parameters when usin...
Definition: xilinx_spi.h:78
uint32_t num_slaves
Definition: maxim_spi.h:60
@ SPI0_RX_GP16
Definition: pico_spi.h:73
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:70
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:116
UART_HandleTypeDef * huart
Definition: stm32_uart.h:54
Structure containing the init parameters needed by the SPI engine.
Definition: spi_engine.h:89
Structure holding the UART init parameters for mbed platform.
Definition: mbed_uart.h:69
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:83
Structure holding the I2C init parameters for mbed platform.
Definition: mbed_i2c.h:69
#define GPIO_DEVICE_ID
Definition: parameters.h:89
uint16_t i2c_sda_pin
Definition: mbed_i2c.h:70
uint32_t speed
Definition: stm32_gpio.h:54
Structure holding the initialization parameters for Xilinx platform specific GPIO parameters.
Definition: xilinx_gpio.h:70
@ NO_OS_PULL_UP
Definition: no_os_gpio.h:74
@ MASTER
Definition: aducm3029_spi.h:62
Aditional UART config parameters.
Definition: maxim_usb_uart.h:48
@ PCLK_DIV256
Definition: aducm3029_timer.h:62
mxc_gpio_vssel_t vssel
Definition: maxim_spi.h:62
@ GPIO_PL
Definition: xilinx_gpio.h:60
@ SPI0_TX_GP19
Definition: pico_spi.h:60
uint32_t base_addr
Definition: axi_pwm_extra.h:58
Structure holding the parameters for EEPROM initialization.
Definition: no_os_eeprom.h:64
uint32_t ref_clk_hz
Definition: spi_engine.h:91
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:72
uint32_t device_id
Definition: no_os_i2c.h:72
enum xil_gpio_type type
Definition: xilinx_gpio.h:72
Additional UART config parameters.
Definition: pico_uart.h:96