12 #include "hpm_sei_regs.h"
13 #include "hpm_soc_feature.h"
14 #include "hpm_soc_ip_feature.h"
169 #define SEI_SELECT_CMD true
170 #define SEI_SELECT_DATA false
175 #define SEI_DATA_CONST_0 (30UL)
176 #define SEI_DATA_CONST_1 (31UL)
181 #define SEI_INSTR_OP_HALT 0u
182 #define SEI_INSTR_OP_JUMP 1u
183 #define SEI_INSTR_OP_SEND_WDG 2u
184 #define SEI_INSTR_OP_SEND 3u
185 #define SEI_INSTR_OP_WAIT_WDG 4u
186 #define SEI_INSTR_OP_WAIT 5u
187 #define SEI_INSTR_OP_RECV_WDG 6u
188 #define SEI_INSTR_OP_RECV 7u
193 #define SEI_INSTR_M_CK_LOW 0u
194 #define SEI_INSTR_M_CK_RISE_FALL 1u
195 #define SEI_INSTR_M_CK_FALL_RISE 2u
196 #define SEI_INSTR_M_CK_HIGH 3u
201 #define SEI_INSTR_S_CK_DEFAULT 0u
202 #define SEI_INSTR_S_CK_TRX_EXCH 1u
203 #define SEI_INSTR_S_CK_TIMEOUT_EN 2u
204 #define SEI_INSTR_S_CK_TRX_EXCH_TIMEOUT_EN 3u
209 #define SEI_JUMP_INIT_INSTR_IDX 0x00u
210 #define SEI_JUMP_WDG_INSTR_IDX 0x01u
211 #define SEI_JUMP_CMD_TABLE_INSTR_IDX0 0x10u
212 #define SEI_JUMP_CMD_TABLE_INSTR_IDX1 0x11u
213 #define SEI_JUMP_CMD_TABLE_INSTR_IDX2 0x12u
214 #define SEI_JUMP_CMD_TABLE_INSTR_IDX3 0x13u
215 #define SEI_JUMP_CMD_TABLE_INSTR_IDX4 0x14u
216 #define SEI_JUMP_CMD_TABLE_INSTR_IDX5 0x15u
217 #define SEI_JUMP_CMD_TABLE_INSTR_IDX6 0x16u
218 #define SEI_JUMP_CMD_TABLE_INSTR_IDX7 0x17u
219 #define SEI_JUMP_CMD_TABLE_INSTR_IDX8 0x18u
220 #define SEI_JUMP_CMD_TABLE_INSTR_IDX9 0x19u
221 #define SEI_JUMP_CMD_TABLE_INSTR_IDX10 0x1Au
222 #define SEI_JUMP_CMD_TABLE_INSTR_IDX11 0x1Bu
223 #define SEI_JUMP_CMD_TABLE_INSTR_IDX12 0x1Cu
224 #define SEI_JUMP_CMD_TABLE_INSTR_IDX13 0x1Du
225 #define SEI_JUMP_CMD_TABLE_INSTR_IDX14 0x1Eu
226 #define SEI_JUMP_CMD_TABLE_INSTR_IDX15 0x1Fu
304 #if defined(HPM_IP_FEATURE_SEI_TIMEOUT_REWIND_FEATURE) && HPM_IP_FEATURE_SEI_TIMEOUT_REWIND_FEATURE
347 uint8_t instr_idx[16];
413 #if defined(__cplusplus)
516 ptr->
CTRL[idx].TRG_TABLE.CMD[type] = data;
528 return ptr->
CTRL[idx].TRG_TABLE.TIME[type];
544 return ptr->
CTRL[idx].LATCH[latch_idx].TIME;
558 tmp = ptr->
CTRL[idx].XCVR.DATA_CFG;
561 ptr->
CTRL[idx].XCVR.DATA_CFG = tmp;
575 tmp = ptr->
CTRL[idx].XCVR.DATA_CFG;
578 ptr->
CTRL[idx].XCVR.DATA_CFG = tmp;
592 tmp = ptr->
CTRL[idx].XCVR.CLK_CFG;
595 ptr->
CTRL[idx].XCVR.CLK_CFG = tmp;
609 tmp = ptr->
CTRL[idx].XCVR.CLK_CFG;
612 ptr->
CTRL[idx].XCVR.CLK_CFG = tmp;
645 ptr->
CTRL[idx].CMD.CMD = cmd;
656 return ptr->
CTRL[idx].CMD.CMD;
709 ptr->
CTRL[idx].POS.SMP_POS = data;
720 ptr->
CTRL[idx].POS.SMP_REV = data;
731 ptr->
CTRL[idx].POS.SMP_SPD = data;
742 ptr->
CTRL[idx].POS.SMP_ACC = data;
753 ptr->
CTRL[idx].POS.UPD_POS = data;
764 ptr->
CTRL[idx].POS.UPD_REV = data;
775 ptr->
CTRL[idx].POS.UPD_SPD = data;
786 ptr->
CTRL[idx].POS.UPD_ACC = data;
797 ptr->
CTRL[idx].POS.UPD_TIME = data;
856 ptr->
CTRL[idx].IRQ.INT_EN |= irq_mask;
858 ptr->
CTRL[idx].IRQ.INT_EN &= ~irq_mask;
872 return ((ptr->
CTRL[idx].IRQ.INT_FLAG & irq_mask) == irq_mask) ? true :
false;
883 ptr->
CTRL[idx].IRQ.INT_FLAG = irq_mask;
898 ptr->
CTRL[idx].DMA_EN |= dma_en_mask;
900 ptr->
CTRL[idx].DMA_EN &= ~dma_en_mask;
1062 void sei_set_instr(
SEI_Type *ptr, uint8_t idx, uint8_t op, uint8_t ck, uint8_t crc, uint8_t data, uint8_t opr);
1065 #if defined(__cplusplus)
#define SEI_CTRL_IRQ_INT_FLAG_TRX_ERR_MASK
Definition: hpm_sei_regs.h:2416
#define SEI_CTRL_XCVR_CLK_CFG_CK0_POINT_MASK
Definition: hpm_sei_regs.h:573
#define SEI_CTRL_CMD_MODE_REWIND_MASK
Definition: hpm_sei_regs.h:1073
#define SEI_CTRL_DMA_EN_TIMEOUT_MASK
Definition: hpm_sei_regs.h:2946
#define SEI_CTRL_XCVR_DATA_CFG_RXD_POINT_SET(x)
Definition: hpm_sei_regs.h:554
#define SEI_CTRL_DMA_EN_PTR1_ST_MASK
Definition: hpm_sei_regs.h:3026
#define SEI_CTRL_IRQ_INT_FLAG_LATCH2_MASK
Definition: hpm_sei_regs.h:2376
#define SEI_CTRL_IRQ_INT_FLAG_LATCH1_MASK
Definition: hpm_sei_regs.h:2386
#define SEI_CTRL_DMA_EN_PTR1_END_MASK
Definition: hpm_sei_regs.h:2986
#define SEI_CTRL_IRQ_INT_FLAG_PTR0_ST_MASK
Definition: hpm_sei_regs.h:2496
#define SEI_CTRL_IRQ_INSTR1_INSTR_SET(x)
Definition: hpm_sei_regs.h:2807
#define SEI_CTRL_IRQ_POINTER0_POINTER_SET(x)
Definition: hpm_sei_regs.h:2774
#define SEI_CTRL_IRQ_INT_FLAG_TRIGER1_MASK
Definition: hpm_sei_regs.h:2336
#define SEI_CTRL_XCVR_DATA_CFG_TXD_POINT_SET(x)
Definition: hpm_sei_regs.h:544
#define SEI_CTRL_ENGINE_CTRL_ENABLE_MASK
Definition: hpm_sei_regs.h:200
#define SEI_CTRL_TRG_IN_CFG_IN0_EN_MASK
Definition: hpm_sei_regs.h:790
#define SEI_CTRL_DMA_EN_INSTR1_ST_MASK
Definition: hpm_sei_regs.h:3006
#define SEI_CTRL_DMA_EN_TRIGER0_MASK
Definition: hpm_sei_regs.h:2886
#define SEI_CTRL_DMA_EN_LATCH0_MASK
Definition: hpm_sei_regs.h:2936
#define SEI_CTRL_DMA_EN_TRIGER1_MASK
Definition: hpm_sei_regs.h:2876
#define SEI_CTRL_IRQ_INT_FLAG_TRG_ERR2_MASK
Definition: hpm_sei_regs.h:2286
#define SEI_CTRL_IRQ_INT_FLAG_PTR1_ST_MASK
Definition: hpm_sei_regs.h:2486
#define SEI_CTRL_IRQ_INT_FLAG_PTR0_END_MASK
Definition: hpm_sei_regs.h:2456
#define SEI_CTRL_IRQ_INT_FLAG_SMP_ERR_MASK
Definition: hpm_sei_regs.h:2356
#define SEI_CTRL_DMA_EN_WDOG_MASK
Definition: hpm_sei_regs.h:3046
#define SEI_DAT_MODE_REWIND_MASK
Definition: hpm_sei_regs.h:3253
#define SEI_CTRL_IRQ_INT_FLAG_INSTR1_END_MASK
Definition: hpm_sei_regs.h:2426
#define SEI_CTRL_DMA_EN_LATCH2_MASK
Definition: hpm_sei_regs.h:2916
#define SEI_CTRL_IRQ_INT_FLAG_TRIGER0_MASK
Definition: hpm_sei_regs.h:2346
#define SEI_CTRL_IRQ_INT_FLAG_TIMEOUT_MASK
Definition: hpm_sei_regs.h:2406
#define SEI_CTRL_IRQ_INT_FLAG_EXCEPT_MASK
Definition: hpm_sei_regs.h:2516
#define SEI_CTRL_IRQ_POINTER1_POINTER_SET(x)
Definition: hpm_sei_regs.h:2785
#define SEI_CTRL_DMA_EN_SMP_ERR_MASK
Definition: hpm_sei_regs.h:2896
#define SEI_CTRL_DMA_EN_TRX_ERR_MASK
Definition: hpm_sei_regs.h:2956
#define SEI_CTRL_IRQ_INT_FLAG_STALL_MASK
Definition: hpm_sei_regs.h:2526
#define SEI_CTRL_DMA_EN_PTR0_ST_MASK
Definition: hpm_sei_regs.h:3036
#define SEI_CTRL_DMA_EN_TRG_ERR0_MASK
Definition: hpm_sei_regs.h:2846
#define SEI_CTRL_IRQ_INT_FLAG_WDOG_MASK
Definition: hpm_sei_regs.h:2506
#define SEI_CTRL_DMA_EN_INSTR0_END_MASK
Definition: hpm_sei_regs.h:2976
#define SEI_CTRL_IRQ_INT_FLAG_TRG_ERR1_MASK
Definition: hpm_sei_regs.h:2296
#define SEI_CTRL_IRQ_INT_FLAG_INSTR0_ST_MASK
Definition: hpm_sei_regs.h:2476
#define SEI_CTRL_DMA_EN_LATCH1_MASK
Definition: hpm_sei_regs.h:2926
#define SEI_CTRL_DMA_EN_PTR0_END_MASK
Definition: hpm_sei_regs.h:2996
#define SEI_CTRL_IRQ_INT_FLAG_PTR1_END_MASK
Definition: hpm_sei_regs.h:2446
#define SEI_CTRL_IRQ_INSTR0_INSTR_SET(x)
Definition: hpm_sei_regs.h:2796
#define SEI_CTRL_DMA_EN_TRG_ERR3_MASK
Definition: hpm_sei_regs.h:2816
#define SEI_CTRL_ENGINE_CTRL_REWIND_MASK
Definition: hpm_sei_regs.h:188
#define SEI_CTRL_XCVR_CLK_CFG_CK1_POINT_GET(x)
Definition: hpm_sei_regs.h:566
#define SEI_CTRL_XCVR_DATA_CFG_RXD_POINT_MASK
Definition: hpm_sei_regs.h:552
#define SEI_CTRL_DMA_EN_TRIGER3_MASK
Definition: hpm_sei_regs.h:2856
#define SEI_CTRL_DMA_EN_TRIGER2_MASK
Definition: hpm_sei_regs.h:2866
#define SEI_CTRL_XCVR_DATA_CFG_TXD_POINT_MASK
Definition: hpm_sei_regs.h:542
#define SEI_CTRL_DMA_EN_INSTR1_END_MASK
Definition: hpm_sei_regs.h:2966
#define SEI_CTRL_IRQ_INT_FLAG_INSTR1_ST_MASK
Definition: hpm_sei_regs.h:2466
#define SEI_CTRL_XCVR_CLK_CFG_CK0_POINT_GET(x)
Definition: hpm_sei_regs.h:576
#define SEI_CTRL_XCVR_CLK_CFG_CK0_POINT_SET(x)
Definition: hpm_sei_regs.h:575
#define SEI_CTRL_TRG_IN_CFG_IN1_EN_MASK
Definition: hpm_sei_regs.h:764
#define SEI_CTRL_DMA_EN_EXCEPT_MASK
Definition: hpm_sei_regs.h:3056
#define SEI_CTRL_DMA_EN_TRG_ERR2_MASK
Definition: hpm_sei_regs.h:2826
#define SEI_CTRL_IRQ_INT_FLAG_LATCH3_MASK
Definition: hpm_sei_regs.h:2366
#define SEI_CTRL_DMA_EN_TRG_ERR1_MASK
Definition: hpm_sei_regs.h:2836
#define SEI_CTRL_IRQ_INT_FLAG_TRIGER3_MASK
Definition: hpm_sei_regs.h:2316
#define SEI_CTRL_IRQ_INT_FLAG_INSTR0_END_MASK
Definition: hpm_sei_regs.h:2436
#define SEI_CTRL_TRG_IN_CFG_PRD_EN_MASK
Definition: hpm_sei_regs.h:738
#define SEI_CTRL_XCVR_CLK_CFG_CK1_POINT_SET(x)
Definition: hpm_sei_regs.h:565
#define SEI_CTRL_TRG_SW_SOFT_MASK
Definition: hpm_sei_regs.h:817
#define SEI_CTRL_IRQ_INT_FLAG_TRG_ERR0_MASK
Definition: hpm_sei_regs.h:2306
#define SEI_CTRL_IRQ_INT_FLAG_TRIGER2_MASK
Definition: hpm_sei_regs.h:2326
#define SEI_CTRL_DMA_EN_INSTR0_ST_MASK
Definition: hpm_sei_regs.h:3016
#define SEI_CTRL_IRQ_INT_FLAG_TRG_ERR3_MASK
Definition: hpm_sei_regs.h:2276
#define SEI_CTRL_DMA_EN_LATCH3_MASK
Definition: hpm_sei_regs.h:2906
#define SEI_CTRL_DMA_EN_STALL_MASK
Definition: hpm_sei_regs.h:3066
#define SEI_CTRL_IRQ_INT_FLAG_LATCH0_MASK
Definition: hpm_sei_regs.h:2396
#define SEI_CTRL_XCVR_CLK_CFG_CK1_POINT_MASK
Definition: hpm_sei_regs.h:563
uint32_t hpm_stat_t
Definition: hpm_common.h:126
hpm_stat_t sei_state_transition_latch_config_init(SEI_Type *ptr, uint8_t idx, uint8_t latch_idx, sei_state_transition_latch_config_t *config)
Init SEI state transition latch configuration.
Definition: hpm_sei_drv.c:268
sei_irq_event_t
sei irq event
Definition: hpm_sei_drv.h:105
@ sei_irq_trx_err_event
Definition: hpm_sei_drv.h:117
@ sei_irq_trig3_err_event
Definition: hpm_sei_drv.h:131
@ sei_irq_execpt_event
Definition: hpm_sei_drv.h:107
@ sei_irq_latch2_event
Definition: hpm_sei_drv.h:121
@ sei_irq_latch1_event
Definition: hpm_sei_drv.h:120
@ sei_irq_latch3_event
Definition: hpm_sei_drv.h:122
@ sei_irq_instr_ptr0_start_event
Definition: hpm_sei_drv.h:109
@ sei_irq_instr_ptr1_end_event
Definition: hpm_sei_drv.h:114
@ sei_irq_trig2_err_event
Definition: hpm_sei_drv.h:130
@ sei_irq_wdog_event
Definition: hpm_sei_drv.h:108
@ sei_irq_timeout_event
Definition: hpm_sei_drv.h:118
@ sei_irq_sample_err_event
Definition: hpm_sei_drv.h:123
@ sei_irq_trig2_event
Definition: hpm_sei_drv.h:126
@ sei_irq_instr_value1_start_event
Definition: hpm_sei_drv.h:112
@ sei_irq_instr_ptr0_end_event
Definition: hpm_sei_drv.h:113
@ sei_irq_trig3_event
Definition: hpm_sei_drv.h:127
@ sei_irq_trig1_event
Definition: hpm_sei_drv.h:125
@ sei_irq_trig1_err_event
Definition: hpm_sei_drv.h:129
@ sei_irq_latch0_event
Definition: hpm_sei_drv.h:119
@ sei_irq_instr_value0_start_event
Definition: hpm_sei_drv.h:111
@ sei_irq_instr_value1_end_event
Definition: hpm_sei_drv.h:116
@ sei_irq_instr_ptr1_start_event
Definition: hpm_sei_drv.h:110
@ sei_irq_stall_event
Definition: hpm_sei_drv.h:106
@ sei_irq_instr_value0_end_event
Definition: hpm_sei_drv.h:115
@ sei_irq_trig0_event
Definition: hpm_sei_drv.h:124
@ sei_irq_trig0_err_event
Definition: hpm_sei_drv.h:128
static uint32_t sei_get_data_value(SEI_Type *ptr, uint8_t idx)
Get the SEI data value.
Definition: hpm_sei_drv.h:686
sei_data_mode_t
sei data mode
Definition: hpm_sei_drv.h:60
@ sei_data_mode
Definition: hpm_sei_drv.h:61
@ sei_crc_mode
Definition: hpm_sei_drv.h:63
@ sei_check_mode
Definition: hpm_sei_drv.h:62
static void sei_set_command_value(SEI_Type *ptr, uint8_t idx, uint32_t cmd)
Set the SEI command value.
Definition: hpm_sei_drv.h:643
hpm_stat_t sei_sample_config_init(SEI_Type *ptr, uint8_t idx, sei_sample_config_t *config)
Init SEI sample configuration.
Definition: hpm_sei_drv.c:280
hpm_stat_t sei_engine_config_init(SEI_Type *ptr, uint8_t idx, sei_engine_config_t *config)
Init SEI engine configuration.
Definition: hpm_sei_drv.c:384
static void sei_set_sample_rev_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI sample revolution (multiturn) override value.
Definition: hpm_sei_drv.h:718
static bool sei_get_irq_status(SEI_Type *ptr, uint8_t idx, uint32_t irq_mask)
Get the SEI irq status.
Definition: hpm_sei_drv.h:870
sei_state_tran_condition_t
sei state transition condition
Definition: hpm_sei_drv.h:85
@ sei_state_tran_condition_low_dismatch
Definition: hpm_sei_drv.h:87
@ sei_state_tran_condition_high_match
Definition: hpm_sei_drv.h:86
@ sei_state_tran_condition_rise_entry
Definition: hpm_sei_drv.h:88
@ sei_state_tran_condition_fall_leave
Definition: hpm_sei_drv.h:89
static void sei_set_xcvr_rx_point(SEI_Type *ptr, uint8_t idx, uint16_t point)
Set the SEI transceiver rx point.
Definition: hpm_sei_drv.h:553
static void sei_set_irq_match_instr0_ptr(SEI_Type *ptr, uint8_t idx, uint8_t instr_idx)
Set the SEI irq match pointer0.
Definition: hpm_sei_drv.h:806
static uint16_t sei_get_xcvr_ck0_point(SEI_Type *ptr, uint8_t idx)
Get the SEI transceiver ck0 point.
Definition: hpm_sei_drv.h:621
static void sei_set_engine_rewind(SEI_Type *ptr, uint8_t idx)
Rewind the SEI engine.
Definition: hpm_sei_drv.h:439
void sei_set_instr(SEI_Type *ptr, uint8_t idx, uint8_t op, uint8_t ck, uint8_t crc, uint8_t data, uint8_t opr)
Set SEI Intsructions.
Definition: hpm_sei_drv.c:404
static void sei_set_update_rev_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI update revolution (multiturn) override value.
Definition: hpm_sei_drv.h:762
sei_data_bit_order_t
sei data bit order
Definition: hpm_sei_drv.h:69
@ sei_bit_lsb_first
Definition: hpm_sei_drv.h:70
@ sei_bit_msb_first
Definition: hpm_sei_drv.h:71
static void sei_clear_irq_flag(SEI_Type *ptr, uint8_t idx, uint32_t irq_mask)
Clear the SEI irq flag.
Definition: hpm_sei_drv.h:881
static void sei_set_xcvr_ck0_point(SEI_Type *ptr, uint8_t idx, uint16_t point)
Set the SEI transceiver ck0 point.
Definition: hpm_sei_drv.h:587
static void sei_set_sample_pos_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI sample position (singleturn) override value.
Definition: hpm_sei_drv.h:707
sei_arming_mode_t
sei arming action
Definition: hpm_sei_drv.h:19
@ sei_arming_direct_exec
Definition: hpm_sei_drv.h:20
@ sei_arming_wait_trigger
Definition: hpm_sei_drv.h:21
static void sei_set_irq_match_instr0_value(SEI_Type *ptr, uint8_t idx, uint32_t instr_value)
Set the SEI irq match instr0.
Definition: hpm_sei_drv.h:828
hpm_stat_t sei_trigger_input_config_init(SEI_Type *ptr, uint8_t idx, sei_trigger_input_config_t *config)
Init SEI trigger input configuration.
Definition: hpm_sei_drv.c:328
sei_idle_state_t
sei ilde state
Definition: hpm_sei_drv.h:52
@ sei_idle_high_state
Definition: hpm_sei_drv.h:54
@ sei_idle_low_state
Definition: hpm_sei_drv.h:53
static void sei_set_sample_spd_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI sample speed override value.
Definition: hpm_sei_drv.h:729
static void sei_set_command_rewind(SEI_Type *ptr, uint8_t idx)
Rewind the SEI command.
Definition: hpm_sei_drv.h:664
static void sei_set_trig_input_in0_enable(SEI_Type *ptr, uint8_t idx, bool enable)
Set the SEI trigger input trig in0 enable or disable.
Definition: hpm_sei_drv.h:452
static void sei_set_xcvr_ck1_point(SEI_Type *ptr, uint8_t idx, uint16_t point)
Set the SEI transceiver ck1 point.
Definition: hpm_sei_drv.h:604
static void sei_set_data_rewind(SEI_Type *ptr, uint8_t idx)
Rewind the SEI data.
Definition: hpm_sei_drv.h:696
sei_wdg_action_t
sei watchdog action
Definition: hpm_sei_drv.h:27
@ sei_wdg_exec_exception_instr
Definition: hpm_sei_drv.h:29
@ sei_wdg_exec_next_instr
Definition: hpm_sei_drv.h:28
hpm_stat_t sei_cmd_table_config_init(SEI_Type *ptr, uint8_t idx, uint8_t table_idx, sei_command_table_config_t *config)
Init SEI command table configuration.
Definition: hpm_sei_drv.c:196
static void sei_set_xcvr_tx_point(SEI_Type *ptr, uint8_t idx, uint16_t point)
Set the SEI transceiver tx point.
Definition: hpm_sei_drv.h:570
static uint32_t sei_get_trig_input_time(SEI_Type *ptr, uint8_t idx, sei_trig_in_type_t type)
Get the SEI trigger input time.
Definition: hpm_sei_drv.h:526
static void sei_set_data_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI data value.
Definition: hpm_sei_drv.h:675
hpm_stat_t sei_transceiver_config_init(SEI_Type *ptr, uint8_t idx, sei_transceiver_config_t *config)
Init SEI transceiver configuration.
Definition: hpm_sei_drv.c:10
static void sei_set_irq_match_instr1_ptr(SEI_Type *ptr, uint8_t idx, uint8_t instr_idx)
Set the SEI irq match pointer1.
Definition: hpm_sei_drv.h:817
static void sei_set_update_time_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI update time override value.
Definition: hpm_sei_drv.h:795
static void sei_set_irq_match_instr1_value(SEI_Type *ptr, uint8_t idx, uint32_t instr_value)
Set the SEI irq match instr1.
Definition: hpm_sei_drv.h:839
hpm_stat_t sei_trigger_output_config_init(SEI_Type *ptr, uint8_t idx, sei_trigger_output_config_t *config)
Init SEI trigger output configuration.
Definition: hpm_sei_drv.c:359
static void sei_set_trig_input_command_value(SEI_Type *ptr, uint8_t idx, sei_trig_in_type_t type, uint32_t data)
Set the SEI trigger input command value.
Definition: hpm_sei_drv.h:514
static void sei_set_update_spd_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI update speed override value.
Definition: hpm_sei_drv.h:773
static uint32_t sei_get_latch_time(SEI_Type *ptr, uint8_t idx, uint8_t latch_idx)
Get the SEI latch time.
Definition: hpm_sei_drv.h:542
static uint32_t sei_get_command_value(SEI_Type *ptr, uint8_t idx)
Get the SEI command value.
Definition: hpm_sei_drv.h:654
hpm_stat_t sei_state_transition_config_init(SEI_Type *ptr, uint8_t idx, uint8_t latch_idx, uint8_t state, sei_state_transition_config_t *config)
Init SEI state transition configuration.
Definition: hpm_sei_drv.c:237
static void sei_set_sample_acc_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI sample acceleration override value.
Definition: hpm_sei_drv.h:740
hpm_stat_t sei_cmd_data_format_config_init(SEI_Type *ptr, bool cmd_data_select, uint8_t idx, sei_data_format_config_t *config)
Init SEI command or data format configuration.
Definition: hpm_sei_drv.c:121
sei_dma_en_t
sei dma enable bit
Definition: hpm_sei_drv.h:137
@ sei_dma_en_instr_ptr1_start_event
Definition: hpm_sei_drv.h:142
@ sei_dma_en_latch2_event
Definition: hpm_sei_drv.h:153
@ sei_dma_en_latch1_event
Definition: hpm_sei_drv.h:152
@ sei_dma_en_timeout_event
Definition: hpm_sei_drv.h:150
@ sei_dma_en_instr_value0_start_event
Definition: hpm_sei_drv.h:143
@ sei_dma_en_latch3_event
Definition: hpm_sei_drv.h:154
@ sei_dma_en_stall_event
Definition: hpm_sei_drv.h:138
@ sei_dma_en_latch0_event
Definition: hpm_sei_drv.h:151
@ sei_dma_en_trig2_event
Definition: hpm_sei_drv.h:158
@ sei_dma_en_sample_err_event
Definition: hpm_sei_drv.h:155
@ sei_dma_en_instr_ptr0_start_event
Definition: hpm_sei_drv.h:141
@ sei_dma_en_instr_ptr0_end_event
Definition: hpm_sei_drv.h:145
@ sei_dma_en_instr_ptr1_end_event
Definition: hpm_sei_drv.h:146
@ sei_dma_en_trig1_err_event
Definition: hpm_sei_drv.h:161
@ sei_dma_en_trig2_err_event
Definition: hpm_sei_drv.h:162
@ sei_dma_en_instr_value0_end_event
Definition: hpm_sei_drv.h:147
@ sei_dma_en_trig0_err_event
Definition: hpm_sei_drv.h:160
@ sei_dma_en_trig1_event
Definition: hpm_sei_drv.h:157
@ sei_dma_en_wdog_event
Definition: hpm_sei_drv.h:140
@ sei_dma_en_trig0_event
Definition: hpm_sei_drv.h:156
@ sei_dma_en_execpt_event
Definition: hpm_sei_drv.h:139
@ sei_dma_en_trig3_event
Definition: hpm_sei_drv.h:159
@ sei_dma_en_instr_value1_start_event
Definition: hpm_sei_drv.h:144
@ sei_dma_en_instr_value1_end_event
Definition: hpm_sei_drv.h:148
@ sei_dma_en_trig3_err_event
Definition: hpm_sei_drv.h:163
@ sei_dma_en_trx_err_event
Definition: hpm_sei_drv.h:149
static void sei_set_trig_input_soft_enable(SEI_Type *ptr, uint8_t idx)
Set the SEI trigger input soft enable or disable.
Definition: hpm_sei_drv.h:502
static void sei_set_dma_req_enable(SEI_Type *ptr, uint8_t idx, uint32_t dma_en_mask, bool enable)
Set the SEI DMA request enable or disable.
Definition: hpm_sei_drv.h:895
static uint16_t sei_get_xcvr_ck1_point(SEI_Type *ptr, uint8_t idx)
Get the SEI transceiver ck1 point.
Definition: hpm_sei_drv.h:632
sei_transceiver_mode_t
sei transfer mode
Definition: hpm_sei_drv.h:35
@ sei_synchronous_master_mode
Definition: hpm_sei_drv.h:36
@ sei_synchronous_slave_mode
Definition: hpm_sei_drv.h:37
@ sei_asynchronous_mode
Definition: hpm_sei_drv.h:38
sei_trig_in_type_t
sei trig in type
Definition: hpm_sei_drv.h:95
@ sei_trig_in_soft
Definition: hpm_sei_drv.h:99
@ sei_trig_in_period
Definition: hpm_sei_drv.h:98
@ sei_trig_in1
Definition: hpm_sei_drv.h:97
@ sei_trig_in0
Definition: hpm_sei_drv.h:96
static void sei_set_trig_input_in1_enable(SEI_Type *ptr, uint8_t idx, bool enable)
Set the SEI trigger input trig in1 enable or disable.
Definition: hpm_sei_drv.h:469
static void sei_set_trig_input_period_enable(SEI_Type *ptr, uint8_t idx, bool enable)
Set the SEI trigger input period enable or disable.
Definition: hpm_sei_drv.h:486
static void sei_set_update_acc_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI update acceleration override value.
Definition: hpm_sei_drv.h:784
sei_data_word_order_t
sei data word order
Definition: hpm_sei_drv.h:77
@ sei_word_reverse
Definition: hpm_sei_drv.h:79
@ sei_word_nonreverse
Definition: hpm_sei_drv.h:78
hpm_stat_t sei_update_config_init(SEI_Type *ptr, uint8_t idx, sei_update_config_t *config)
Init SEI update configuration.
Definition: hpm_sei_drv.c:304
static void sei_set_irq_enable(SEI_Type *ptr, uint8_t idx, uint32_t irq_mask, bool enable)
Set the SEI irq enable or disable.
Definition: hpm_sei_drv.h:853
sei_asynchronous_parity_t
sei asynchronous mode parity
Definition: hpm_sei_drv.h:44
@ sei_asynchronous_parity_odd
Definition: hpm_sei_drv.h:46
@ sei_asynchronous_parity_even
Definition: hpm_sei_drv.h:45
static void sei_set_engine_enable(SEI_Type *ptr, uint8_t idx, bool enable)
Set the SEI engine enable or disable.
Definition: hpm_sei_drv.h:425
static void sei_set_update_pos_override_value(SEI_Type *ptr, uint8_t idx, uint32_t data)
Set the SEI update position (singleturn) override value.
Definition: hpm_sei_drv.h:751
Definition: hpm_sei_regs.h:12
__RW uint32_t CTRL
Definition: hpm_sei_regs.h:15
struct SEI_Type::@329 DAT[10]
__RW uint32_t DATA
Definition: hpm_sei_regs.h:132
__RW uint32_t MODE
Definition: hpm_sei_regs.h:52
sei command table config structure
Definition: hpm_sei_drv.h:343
uint32_t cmd_min_value
Definition: hpm_sei_drv.h:344
uint32_t cmd_mask_value
Definition: hpm_sei_drv.h:346
uint32_t cmd_max_value
Definition: hpm_sei_drv.h:345
sei engine config structure
Definition: hpm_sei_drv.h:231
bool wdg_enable
Definition: hpm_sei_drv.h:236
sei_arming_mode_t arming_mode
Definition: hpm_sei_drv.h:232
uint8_t data_cdm_idx
Definition: hpm_sei_drv.h:233
uint8_t data_base_idx
Definition: hpm_sei_drv.h:234
uint8_t wdg_instr_idx
Definition: hpm_sei_drv.h:238
uint16_t wdg_time
Definition: hpm_sei_drv.h:239
sei_wdg_action_t wdg_action
Definition: hpm_sei_drv.h:237
uint8_t init_instr_idx
Definition: hpm_sei_drv.h:235
sei sample config structure
Definition: hpm_sei_drv.h:379
uint32_t data_register_select
Definition: hpm_sei_drv.h:391
uint8_t spd_data_idx
Definition: hpm_sei_drv.h:381
bool pos_data_use_rx
Definition: hpm_sei_drv.h:387
uint16_t sample_window
Definition: hpm_sei_drv.h:390
bool spd_data_use_rx
Definition: hpm_sei_drv.h:385
uint8_t latch_select
Definition: hpm_sei_drv.h:388
uint8_t acc_data_idx
Definition: hpm_sei_drv.h:380
bool acc_data_use_rx
Definition: hpm_sei_drv.h:384
uint8_t rev_data_idx
Definition: hpm_sei_drv.h:382
bool rev_data_use_rx
Definition: hpm_sei_drv.h:386
bool sample_once
Definition: hpm_sei_drv.h:389
uint8_t pos_data_idx
Definition: hpm_sei_drv.h:383
sei state transition config structure
Definition: hpm_sei_drv.h:353
uint8_t instr_ptr_value
Definition: hpm_sei_drv.h:356
sei_state_tran_condition_t txd_cfg
Definition: hpm_sei_drv.h:360
sei_state_tran_condition_t timeout_cfg
Definition: hpm_sei_drv.h:364
sei_state_tran_condition_t clk_cfg
Definition: hpm_sei_drv.h:358
bool disable_rxd_check
Definition: hpm_sei_drv.h:361
sei_state_tran_condition_t rxd_cfg
Definition: hpm_sei_drv.h:362
bool disable_clk_check
Definition: hpm_sei_drv.h:357
bool disable_txd_check
Definition: hpm_sei_drv.h:359
bool disable_timeout_check
Definition: hpm_sei_drv.h:363
sei_state_tran_condition_t instr_ptr_cfg
Definition: hpm_sei_drv.h:355
bool disable_instr_ptr_check
Definition: hpm_sei_drv.h:354
sei state transition latch config structure
Definition: hpm_sei_drv.h:370
uint16_t delay
Definition: hpm_sei_drv.h:373
uint8_t output_select
Definition: hpm_sei_drv.h:372
bool enable
Definition: hpm_sei_drv.h:371
sei transceiver asynchronous mode config structure
Definition: hpm_sei_drv.h:269
bool data_idle_high_z
Definition: hpm_sei_drv.h:274
uint32_t baudrate
Definition: hpm_sei_drv.h:276
bool parity_enable
Definition: hpm_sei_drv.h:272
uint8_t data_len
Definition: hpm_sei_drv.h:271
sei_asynchronous_parity_t parity
Definition: hpm_sei_drv.h:273
uint8_t wait_len
Definition: hpm_sei_drv.h:270
sei_idle_state_t data_idle_state
Definition: hpm_sei_drv.h:275
sei transceiver config structure
Definition: hpm_sei_drv.h:282
uint32_t src_clk_freq
Definition: hpm_sei_drv.h:285
sei_transceiver_synchronous_slave_config_t synchronous_slave_config
Definition: hpm_sei_drv.h:287
bool tri_sample
Definition: hpm_sei_drv.h:284
sei_transceiver_mode_t mode
Definition: hpm_sei_drv.h:283
sei_transceiver_synchronous_master_config_t synchronous_master_config
Definition: hpm_sei_drv.h:286
sei_transceiver_asynchronous_config_t asynchronous_config
Definition: hpm_sei_drv.h:288
sei transceiver synchronous master mode config structure
Definition: hpm_sei_drv.h:245
bool data_idle_high_z
Definition: hpm_sei_drv.h:246
bool clock_idle_high_z
Definition: hpm_sei_drv.h:248
sei_idle_state_t data_idle_state
Definition: hpm_sei_drv.h:247
uint32_t baudrate
Definition: hpm_sei_drv.h:250
sei_idle_state_t clock_idle_state
Definition: hpm_sei_drv.h:249
sei transceiver synchronous master mode config structure
Definition: hpm_sei_drv.h:256
bool data_idle_high_z
Definition: hpm_sei_drv.h:257
sei_idle_state_t clock_idle_state
Definition: hpm_sei_drv.h:260
sei_idle_state_t data_idle_state
Definition: hpm_sei_drv.h:258
bool clock_idle_high_z
Definition: hpm_sei_drv.h:259
uint16_t ck0_timeout_us
Definition: hpm_sei_drv.h:262
uint32_t max_baudrate
Definition: hpm_sei_drv.h:261
uint16_t ck1_timeout_us
Definition: hpm_sei_drv.h:263
sei trigger output config structure
Definition: hpm_sei_drv.h:313
bool trig_out_enable
Definition: hpm_sei_drv.h:315
uint8_t src_latch_select
Definition: hpm_sei_drv.h:314
uint8_t trig_out_select
Definition: hpm_sei_drv.h:316
sei update config structure
Definition: hpm_sei_drv.h:397
bool pos_data_use_rx
Definition: hpm_sei_drv.h:405
bool acc_data_use_rx
Definition: hpm_sei_drv.h:402
bool rev_data_use_rx
Definition: hpm_sei_drv.h:404
uint8_t spd_data_idx
Definition: hpm_sei_drv.h:399
bool time_use_override
Definition: hpm_sei_drv.h:406
uint8_t latch_select
Definition: hpm_sei_drv.h:408
bool update_on_err
Definition: hpm_sei_drv.h:407
uint32_t data_register_select
Definition: hpm_sei_drv.h:409
uint8_t acc_data_idx
Definition: hpm_sei_drv.h:398
uint8_t rev_data_idx
Definition: hpm_sei_drv.h:400
bool spd_data_use_rx
Definition: hpm_sei_drv.h:403
uint8_t pos_data_idx
Definition: hpm_sei_drv.h:401