AM64x MCU+ SDK  08.02.00

Introduction

Functions

void bsp_send_command_to_firmware (PRUICSS_Handle pruIcssHandle, uint32_t command, uint16_t param1, uint16_t param2)
 Send command and parameters from stack to firmware to perform some action based on stack state or in response to AL event interrupt or SYNC interrupt from ESC. More...
 

Function Documentation

◆ bsp_send_command_to_firmware()

void bsp_send_command_to_firmware ( PRUICSS_Handle  pruIcssHandle,
uint32_t  command,
uint16_t  param1,
uint16_t  param2 
)

Send command and parameters from stack to firmware to perform some action based on stack state or in response to AL event interrupt or SYNC interrupt from ESC.

Parameters
pruIcssHandlePRU-ICSS Handle
commandCommand Id to be executed by ESC firmware
param1parameter1 corresponding to the command
param2parameter2 corresponding to the command
Command Id Param1 Param 2 Return Val Remarks
CMD_DL_USER_ACK_MBX_READ 4 address length NA Indicate PDI side mailbox read completion to firmware
CMD_DL_USER_ACK_MBX_WRITE 5 address length NA Indicate PDI side mailbox write to firmware
CMD_DL_USER_EEPROM_CMD_ACK 6 NA NA NA Acknowledge EEEPROM emulation command execution by ARM host stack
CMD_DL_USER_READ_SYNC_STATUS 7 sync_sel NA NA Indicate SYNC0/1 status register read by PDI to firmware
CMD_DL_USER_READ_AL_CONTROL 8 NA NA NA Indicate AL control register read by PDI to firmware
CMD_DL_USER_WRITE_AL_STATUS 9 NA NA NA Indicate AL status register write by PDI to firmware
CMD_DL_USER_READ_PD_WD_STATUS 10 NA NA NA Indicate PD watchdog status register read by PDI to firmware updating register status
CMD_DL_USER_READ_SM_ACTIVATE 11 sm_index NA NA Indicate SM activate register read by PDI to firmware
CMD_DL_USER_WRITE_SM_PDI_CTRL 12 (sm_index<<8) OR pdi control reg value NA NA Indicate SM PDI control write to control SM from PDI to firmware
CMD_DL_USER_READ_LATCH_TIME 13 latch_sel NA NA Indicate Latch0/1 time registest read by PDI to firmware
CMD_DL_USER_READ_SYS_TIME 14 NA NA NA Indicate System Time register read by PDI to firmware
CMD_DL_USER_CLEAR_AL_EVENT_LOW 15 event_mask NA NA Clear events not set in event_mask in AL event request register
CMD_DL_USER_SYSTIME_PDI_CONTROL 16 reg_sel NA NA Indicate to the firmware DC register update from PDI side

Struct for host to PRU ICSS command interface - t_host_interface

IMPORTANT NOTE on SUPPORT_CMDACK_POLL_MODE: EtherCAT firmware supports both poll mode and interrupt mode for command acknowledge. It is found that poll mode offers better latency in given scenarios but will waste CPU cycles busy waiting for command response from PRU. If you need to switch to command ack interrupt mode comment the define for SUPPORT_CMDACK_POLL_MODE in tiescbsp.h