Functions | |
void | bsp_params_init (bsp_params *init_params) |
Initialize the members of bsp_params with default values. More... | |
int32_t | bsp_init (bsp_params *init_params) |
Initialize the EtherCAT FWHAL It does following things: . More... | |
void | bsp_esc_reg_perm_init (PRUICSS_Handle pruIcssHandle) |
Sets up register permissions for ECAT side access for TI ESC, if ENABLE_PDI_REG_PERMISSIONS is defined in tiescbsp.h, then this function also initializes register permissions for PDI side access from stack/application. More... | |
void | bsp_start_esc_isr (PRUICSS_Handle pruIcssHandle) |
Register IRQ handlers for various PRU-ICSS interrupts from firmware to host to clear corresponding events in PRU-ICSS INTC. More... | |
void | bsp_exit (PRUICSS_Handle pruIcssHandle) |
Cleanup of EtherCAT FWHAL It does following things: . More... | |
void | bsp_set_pdi_wd_trigger_mode (PRUICSS_Handle pruIcssHandle, uint32_t mode) |
Configure PDI WD trigger mode, PDI WD is triggered automatically by h/w on RX_SOF(port0/port1), latch0/1 input high, SYNC0/1 out high. PDI WD is also triggered whenever host sends a command to firmware. PDI WD may not expire if host stops sending commands to firmware alone, this will occur only if configured h/w events do not occur during WD period. More... | |
void bsp_params_init | ( | bsp_params * | init_params | ) |
Initialize the members of bsp_params with default values.
init_params | Structure of type bsp_paramss |
int32_t bsp_init | ( | bsp_params * | init_params | ) |
Initialize the EtherCAT FWHAL
It does following things:
.
init_params | Structure of type bsp_params |
SystemP_SUCCESS | in case of success, SystemP_FAILURE otherwise |
void bsp_esc_reg_perm_init | ( | PRUICSS_Handle | pruIcssHandle | ) |
Sets up register permissions for ECAT side access for TI ESC, if ENABLE_PDI_REG_PERMISSIONS is defined in tiescbsp.h, then this function also initializes register permissions for PDI side access from stack/application.
NOTE : ENABLE_PDI_REG_PERMISSIONS This feature is not enabled by default in Industrial SDK for optimizing memory and performance. TI_ESC has Onchip PDI interface where Host CPU has direct access to ESC registers as they are emulated using PRU_ICSS shared data memory.If ENABLE_PDI_REG_PERMISSIONS is defined and bsp_read/write_XXX are used by application for all register accesses then ONLY PDI access check is enforced. If application bypasses the use of bsp_read/write_xxx API (say HWREG to ESC register in PRU_ICSS memory), whole scheme won't work. ENABLE_PDI_REG_PERMISSIONS is a software scheme and has overhead of 4KB data memory to maintain permission array and additional overhead of access check for every read/write to registers. ENABLE_PDI_REG_PERMISSIONS is enabled and bsp_read/write is enabled customer needs to set correct permissions in pdi_reg_perm_array, say for implementing vendor specific register for ESC to activate a host side feature.
Struct for register permission array Starts at PRU1 DMEM t_register_properties;
pruIcssHandle | PRU-ICSS Handle |
void bsp_start_esc_isr | ( | PRUICSS_Handle | pruIcssHandle | ) |
Register IRQ handlers for various PRU-ICSS interrupts from firmware to host to clear corresponding events in PRU-ICSS INTC.
pruIcssHandle | PRU-ICSS Handle |
void bsp_exit | ( | PRUICSS_Handle | pruIcssHandle | ) |
Cleanup of EtherCAT FWHAL
It does following things:
.
pruIcssHandle | PRU-ICSS Handle |
void bsp_set_pdi_wd_trigger_mode | ( | PRUICSS_Handle | pruIcssHandle, |
uint32_t | mode | ||
) |
Configure PDI WD trigger mode, PDI WD is triggered automatically by h/w on RX_SOF(port0/port1), latch0/1 input high, SYNC0/1 out high. PDI WD is also triggered whenever host sends a command to firmware. PDI WD may not expire if host stops sending commands to firmware alone, this will occur only if configured h/w events do not occur during WD period.
pruIcssHandle | PRU-ICSS Handle |
mode | PDI_WD_TRIGGER_RX_SOF PDI_WD_TRIGGER_LATCH_IN PDI_WD_TRIGGER_SYNC0_OUT PDI_WD_TRIGGER_SYNC1_OUT |