AM64x MCU+ SDK  08.02.00

Introduction

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...
 

Function Documentation

◆ bsp_params_init()

void bsp_params_init ( bsp_params init_params)

Initialize the members of bsp_params with default values.

Parameters
init_paramsStructure of type bsp_paramss

◆ bsp_init()

int32_t bsp_init ( bsp_params init_params)

Initialize the EtherCAT FWHAL
It does following things:
.

  1. Setup PRU-ICSS interrupt controller for EtherCAT application
  2. Initialize the PRU data memories
  3. Setup register permissions by invoking bsp_esc_reg_perm_init
  4. Load and start EtherCAT PRU firmware
  5. Initialize EEPROM emulation
  6. Initialize command semaphore
    Parameters
    init_paramsStructure of type bsp_params
    Return values
    SystemP_SUCCESSin case of success, SystemP_FAILURE otherwise

◆ bsp_esc_reg_perm_init()

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;

Parameters
pruIcssHandlePRU-ICSS Handle

◆ bsp_start_esc_isr()

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.

Parameters
pruIcssHandlePRU-ICSS Handle

◆ bsp_exit()

void bsp_exit ( PRUICSS_Handle  pruIcssHandle)

Cleanup of EtherCAT FWHAL
It does following things:
.

  1. Delete command semaphore
  2. Flush the EEPROM cache to non-volatile memory
  3. Disable PRUs
    Parameters
    pruIcssHandlePRU-ICSS Handle

◆ bsp_set_pdi_wd_trigger_mode()

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.

Parameters
pruIcssHandlePRU-ICSS Handle
modePDI_WD_TRIGGER_RX_SOF
PDI_WD_TRIGGER_LATCH_IN
PDI_WD_TRIGGER_SYNC0_OUT
PDI_WD_TRIGGER_SYNC1_OUT