Go to the documentation of this file.
34 #ifndef __PARAMETERS_H__
35 #define __PARAMETERS_H__
40 #include "maxim_uart_stdio.h"
41 #include "maxim_gpio.h"
42 #include "maxim_uart.h"
43 #include "maxim_irq.h"
44 #include "maxim_i2c.h"
45 #include "maxim_spi.h"
50 #define UART_IRQ_ID UART0_IRQn
52 #define UART_DEVICE_ID 0
53 #define UART_BAUDRATE 57600
54 #define UART_EXTRA &ade9113_uart_extra_ip
55 #define UART_OPS &max_uart_ops
57 #define I2C_DEVICE_ID 1
58 #define I2C_OPS &max_i2c_ops
59 #define I2C_EXTRA &adt75_i2c_extra
62 #if (TARGET_NUM == 78000)
63 #define SPI_DEVICE_ID 1
65 #elif (TARGET_NUM == 32650)
66 #define SPI_DEVICE_ID 1
69 #define SPI_DEVICE_ID 1
73 #define SPI_BAUDRATE 1000000
74 #define SPI_OPS &max_spi_ops
75 #define SPI_EXTRA &ade9113_spi_extra_ip
78 #define GPIO_OPS &max_gpio_ops
79 #define GPIO_EXTRA &ade9113_gpio_extra_ip
80 #define GPIO_RDY_PIN_NUM 15
81 #define GPIO_RDY_PORT_NUM 0
83 #define GPIO_IRQ_OPS &max_gpio_irq_ops
84 #define GPIO_CTRL_IRQ_ID 0
85 #define GPIO_IRQ_EXTRA &ade9113_gpio_extra_ip
86 #define NVIC_GPIO_IRQ GPIO0_IRQn
88 #define GPIO_RESET_PIN_NUM 19
89 #define GPIO_RESET_PORT_NUM 0
91 #define GPIO_ZC_PIN 14
94 #define GPIO_RCM_TEST_PIN 18
95 #define GPIO_RCDDC_PIN 26
96 #define GPIO_RCDAC_PIN 27
99 #define FREQ 1000 // (Hz)
100 #define PWM_TIMER MXC_TMR0 // Port 0, Pin 2 output
101 #define PWM_LOW_TIMER MXC_TMR1 // Timer for measuring CP Low voltage
102 #define PWM_DUTY_10A (166u)
103 #define PWM_DUTY_16A (266u)
104 #define PWM_DC (999u)
106 #define PWM_LOW_TEST_VAL (160u)
107 #define PWM_HIGH_TEST_VAL (1890u)
108 #define PWM_HIGH_TEST_VAL_EV_CONNECTED (1600u)
110 #define ADC_CHANNEL MXC_ADC_CH_0
112 #define TAKE_S_M_ACTION (1000u)
114 #define RELAY_CHECK_STEP (3u)
116 #define MEASURE_RCDAC_RCDDC_STEP (108u)
117 #define RESTORE_TEST_PIN_STEP (3u)
118 #define SAMPLE_PINS_STEP_1 (37u)
119 #define SAMPLE_PINS_STEP_2 (72u)
120 #define SAMPLE_PINS_STEP_3 (108u)
122 #define MEASURE_OVERCURRENT_STEP (300u)
124 #define I_LIMIT_NOT_CHG (200u)
126 #define I_LIMIT_16A (16500u)
128 #define I_LIMIT_10A (10500u)
130 #define SELF_TEST_SKIP_CYCLES_NO (50u)
132 #define SKIP_CYCLES_AFTER_SELF_TEST (100u)
135 #define SKIP_CYCLES_AFTER_RELAY_SW (150u)
138 #define DELAY_SELF_TEST_READING (300u)
140 #define VALUE_20MS (20000u)
142 #define RCD_TIME_REPEAT_INTERVAL (10u)
144 #define PRINT_VALUES_TIME (4u)
146 #define COMPUTE_VALUES_INTERVAL (5u)
148 #define COMPUTE_VRELAY_INTERVAL (25u)
150 #define TEMPERATURE_READ_RATE (250u)
152 #define DIODE_ERR_DELAY (20u)
154 #define CP_DIODE_ERROR_LIMIT (150u)
156 #define LED_BLINKING_16A (4u)
158 #define LED_BLINKING_10A (8u)
160 #define CP_H_LOW_LIMIT (1100u)
162 #define CPH_A_LIMIT_HIGH (1890u)
164 #define CPH_A_LIMIT_LOW (1800u)
166 #define CPH_B_LIMIT_HIGH (1670u)
168 #define CPH_B_LIMIT_LOW (1600u)
170 #define CPH_C_LIMIT_HIGH (1450u)
172 #define CPH_C_LIMIT_LOW (1390u)
174 #define CPH_D_LIMIT_HIGH (1226u)
176 #define CPH_D_LIMIT_LOW (1180u)
178 #define CP_DC_PWM_DELAY (2000u)
180 #define ADJUST_TIME (5000l)
183 #define INT_PORT (2u)
185 #define INT_PIN_OPTO1 (5u)
186 #define INT_PIN_OPTO2 (7u)
const char * name
Definition: clk_axi_clkgen.h:51
uint8_t offload_config
Definition: spi_engine.h:151
Structure holding the initialization parameters for stm32 platform specific SPI parameters.
Definition: stm32_spi.h:51
@ SPI0_SCK_GP18
Definition: pico_spi.h:80
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
TIM_HandleTypeDef * htimer
Definition: stm32_timer.h:46
Structure holding the initialization parameters for stm32 platform specific GPIO IRQ parameters.
Definition: stm32_gpio_irq.h:44
const struct no_os_i2c_platform_ops max_i2c_ops
MAXIM platform specific I2C platform ops structure.
Definition: maxim_i2c.c:322
@ PWM_TRGO_ENABLE
Definition: stm32_pwm.h:70
Platform independent function definitions and data types for the DMA API.
uint16_t uart_tx_pin
Definition: mbed_uart.h:64
@ GPIO_PS
Definition: xilinx_gpio.h:56
@ SPI_PS
Definition: xilinx_spi.h:62
@ UART_PL
Definition: xilinx_uart.h:57
@ PWM_TRGO_UPDATE
Definition: stm32_pwm.h:71
Initialization parameter for the DMA controller.
Definition: no_os_dma.h:171
bool continuous_mode
Definition: aducm3029_spi.h:91
enum xil_uart_type type
Definition: xilinx_uart.h:69
Definition: maxim_i2c.h:58
Definition: aducm3029_timer.h:88
Driver for the Analog Devices AXI CLKGEN.
const struct no_os_eeprom_platform_ops eeprom_24xx32a_ops
24XX32A EEPROM specific ops structure
Definition: 24xx32a.c:229
@ SPI_SS_POL_LOW
Definition: maxim_spi.h:49
uint32_t mode
Definition: stm32_gpio.h:46
Definition: clk_axi_clkgen.h:50
int32_t port
Definition: no_os_gpio.h:81
@ UART_PS
Definition: xilinx_uart.h:59
mxc_gpio_vssel_t vssel
Definition: maxim_i2c.h:59
uint32_t irq_id
Definition: no_os_uart.h:114
Configuration structure sent in the extra parameter from no_os_spi_init_param.
Definition: aducm3029_spi.h:87
Structure holding the initialization parameters for stm32 platform specific timer parameters.
Definition: stm32_timer.h:45
Structure holding the initialization parameters for stm32 platform.
Definition: stm32_gpio.h:44
uint32_t device_id
Definition: xilinx_gpio.h:68
uint32_t id
Definition: no_os_pwm.h:68
@ SPI0_CS_GP17
Definition: pico_spi.h:93
Structure holding the initialization parameters for Linux platform specific I2C parameters.
Definition: linux_i2c.h:41
@ NO_OS_PULL_NONE
Definition: no_os_gpio.h:66
DMA_HandleTypeDef * hdma
Definition: stm32_dma.h:66
Specific initialization parameters for stm32 UART.
Definition: stm32_uart.h:46
uint32_t id
Definition: no_os_dma.h:173
enum max_uart_flow_ctrl flow
Definition: maxim_uart.h:56
const struct no_os_dma_platform_ops stm32_dma_ops
stm32 platform specific DMA platform ops structure
Definition: stm32_dma.c:330
uint32_t device_id
Definition: no_os_eeprom.h:60
@ TIM_OC_PWM1
Definition: stm32_pwm.h:57
24XX32A EEPROM init params structure
Definition: 24xx32a.h:52
Maxim specific SPI initialization parameters.
Definition: maxim_spi.h:53
STM32 DMA Channels.
Definition: stm32_dma.h:64
@ SPI_PL
Definition: xilinx_spi.h:60
const struct no_os_pwm_platform_ops stm32_pwm_ops
STM32 platform specific PWM platform ops structure.
Definition: stm32_pwm.c:709
uint16_t spi_miso_pin
Definition: mbed_spi.h:64
Specific initialization parameters for stm32 UART over USB.
Definition: stm32_usb_uart.h:46
uint32_t device_id
Definition: linux_i2c.h:43
uint8_t port_nb
Definition: stm32_gpio_irq.h:45
enum avail_freqs source_freq
Definition: aducm3029_timer.h:90
Additional SPI config parameters.
Definition: pico_spi.h:119
Structure holding the SPI init parameters for mbed platform.
Definition: mbed_spi.h:63
Structure holding the initialization parameters for Xilinx platform specific UART parameters.
Definition: xilinx_uart.h:67
Aditional UART config parameters.
Definition: maxim_uart.h:55
@ UART_FLOW_DIS
Definition: maxim_uart.h:47
enum xil_spi_type type
Definition: xilinx_spi.h:74
const struct no_os_gpio_platform_ops max_gpio_ops
maxim platform specific GPIO platform ops structure
Definition: maxim_gpio.c:320
uint32_t chip_select_port
Definition: stm32_spi.h:53
@ DMA_CIRCULAR_MODE
Definition: stm32_dma.h:57
@ NO_OS_PWM_POLARITY_HIGH
Definition: no_os_pwm.h:57
mxc_gpio_vssel_t vssel
Definition: maxim_gpio.h:57
struct xil_uart_init_param platform_uart_param
const struct no_os_uart_platform_ops max_uart_ops
Maxim platform specific UART platform ops structure.
Definition: maxim_uart.c:475
GPIO platform specific init parameters.
Definition: maxim_gpio.h:55
Structure holding the initialization parameters for axi PWM.
Definition: axi_pwm_extra.h:50
@ SPI_ENGINE
Definition: xilinx_spi.h:64
Structure holding the initialization parameters for Xilinx platform specific SPI parameters when usin...
Definition: xilinx_spi.h:72
uint32_t num_slaves
Definition: maxim_spi.h:54
Header file of PWM Interface.
#define OFFLOAD_RX_EN
Definition: spi_engine.h:53
@ SPI0_RX_GP16
Definition: pico_spi.h:67
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:110
@ DATA_ALIGN_BYTE
Definition: stm32_dma.h:46
UART_HandleTypeDef * huart
Definition: stm32_uart.h:48
mxc_gpio_vssel_t vssel
Definition: maxim_pwm.h:46
Structure containing the init parameters needed by the SPI engine.
Definition: spi_engine.h:83
Definition: maxim_pwm.h:45
Structure holding the UART init parameters for mbed platform.
Definition: mbed_uart.h:63
@ PWM_TS_ITR0
Definition: stm32_pwm.h:62
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:77
Structure holding the I2C init parameters for mbed platform.
Definition: mbed_i2c.h:63
uint16_t i2c_sda_pin
Definition: mbed_i2c.h:64
uint32_t speed
Definition: stm32_gpio.h:48
Structure holding the initialization parameters for Xilinx platform specific GPIO parameters.
Definition: xilinx_gpio.h:64
@ NO_OS_PULL_UP
Definition: no_os_gpio.h:68
@ MASTER
Definition: aducm3029_spi.h:56
Structure holding the STM32 PWM parameters.
Definition: stm32_pwm.h:82
Aditional UART config parameters.
Definition: maxim_usb_uart.h:42
@ PCLK_DIV256
Definition: aducm3029_timer.h:56
Structure containing the init parameters needed by the offload module.
Definition: spi_engine.h:143
uint16_t vid
Definition: maxim_usb_uart.h:43
mxc_gpio_vssel_t vssel
Definition: maxim_spi.h:56
uint32_t prescaler
Definition: stm32_pwm.h:84
@ GPIO_PL
Definition: xilinx_gpio.h:54
@ DMA_NORMAL_MODE
Definition: stm32_dma.h:56
@ SPI0_TX_GP19
Definition: pico_spi.h:54
uint32_t base_addr
Definition: axi_pwm_extra.h:52
Structure holding the parameters for EEPROM initialization.
Definition: no_os_eeprom.h:58
uint32_t ref_clk_hz
Definition: spi_engine.h:85
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66
uint32_t device_id
Definition: no_os_i2c.h:66
enum xil_gpio_type type
Definition: xilinx_gpio.h:66
Additional UART config parameters.
Definition: pico_uart.h:90