AM64x MCU+ SDK  08.02.00
ESC Register/Memory access. Special handling APIs

Introduction

Functions

uint8_t bsp_read_byte (PRUICSS_Handle pruIcssHandle, uint16_t address)
 Read a byte value at 'Address' from ESC memory: SM mailbox (single buffer) mapped or register area. More...
 
uint16_t bsp_read_word (PRUICSS_Handle pruIcssHandle, uint16_t address)
 Read a 16-bit value at 'Address' from ESC memory: SM mailbox (single buffer) mapped or register area. More...
 
uint32_t bsp_read_dword (PRUICSS_Handle pruIcssHandle, uint16_t address)
 Read a 32-bit value at 'Address' from ESC memory: SM mailbox (single buffer) mapped or register area. More...
 
void bsp_read (PRUICSS_Handle pruIcssHandle, uint8_t *pdata, uint16_t address, uint16_t len)
 Read a byte array at 'address' from ESC memory. More...
 
uint8_t bsp_read_byte_isr (PRUICSS_Handle pruIcssHandle, uint16_t address)
 Read a byte value at 'Address' from ESC process data memory: SM buffer (3-buffer) mapped area. More...
 
uint16_t bsp_read_word_isr (PRUICSS_Handle pruIcssHandle, uint16_t address)
 Read a 16-bit value at 'Address' from ESC process data memory: SM buffer (3-buffer) mapped area. More...
 
uint32_t bsp_read_dword_isr (PRUICSS_Handle pruIcssHandle, uint16_t address)
 Read a 32-bit value at 'Address' from ESC process data memory: SM buffer (3-buffer) mapped area. More...
 
void bsp_pdi_post_read_indication (PRUICSS_Handle pruIcssHandle, uint16_t address, uint16_t length)
 Invoked after reading a register or mailbox buffer from PDI side
. More...
 
void bsp_pdi_write_indication (PRUICSS_Handle pruIcssHandle, uint16_t address, uint16_t length, uint16_t value)
 Invoked after writing a register or mailbox buffer from PDI side
. More...
 
void bsp_write_byte (PRUICSS_Handle pruIcssHandle, uint8_t val, uint16_t address)
 Write a byte value at 'address' in ESC memory. More...
 
void bsp_write_word (PRUICSS_Handle pruIcssHandle, uint16_t val, uint16_t address)
 Write a 16-bit value at 'address' in ESC memory. More...
 
void bsp_write_dword (PRUICSS_Handle pruIcssHandle, uint32_t val, uint16_t address)
 Write a 32-bit value at 'address' in ESC memory. More...
 
void bsp_write (PRUICSS_Handle pruIcssHandle, uint8_t *pdata, uint16_t address, uint16_t len)
 Write 'len' bytes from pdata to 'address' in ESC memory. More...
 
uint32_t bsp_pruss_mdioreg_read (PRUICSS_Handle pruIcssHandle, uint32_t regoffset)
 Read a 32-bit value from PRU-ICSS MDIO register at 'regoffset'. More...
 
void bsp_pruss_mdioreg_write (PRUICSS_Handle pruIcssHandle, uint32_t val, uint32_t regoffset)
 Write a 32-bit value from PRU-ICSS MDIO register at 'regoffset'. More...
 
uint32_t bsp_pruss_iepreg_read (PRUICSS_Handle pruIcssHandle, uint32_t regoffset)
 Read a 32-bit value from PRU-ICSS IEP register at 'regoffset'. More...
 
void bsp_pruss_iepreg_write (PRUICSS_Handle pruIcssHandle, uint32_t val, uint32_t regoffset)
 Write a 32-bit value from PRU-ICSS IEP register at 'regoffset'. More...
 
void bsp_pruss_cmd_intfc_write_word (uint16_t val, volatile uint16_t *ptr)
 Read a 16-bit value from PRU-ICSS IEP command interface. More...
 
uint16_t bsp_pruss_cmd_intfc_read_word (volatile uint16_t *ptr)
 Read a 16-bit value from PRU-ICSS IEP command interface. More...
 
uint8_t bsp_get_pdi_access_perm (uint16_t address, uint8_t access)
 Checks if the PDI register [byte] has the requested access permission and returns the result. More...
 
uint8_t bsp_pdi_access_perm_word (uint16_t address, uint8_t access)
 Checks if the PDI register [Two bytes] has the requested access permission and returns the result. More...
 
uint8_t bsp_pdi_access_perm_dword (uint16_t address, uint8_t access)
 Checks if the PDI register [Four bytes] has the requested access permission and returns the result. More...
 
uint8_t bsp_pdi_access_perm_array (uint16_t address, uint8_t access, uint16_t size)
 Checks if all PDI registers starting from 'address' has the requested access permission and returns the result. More...
 
void bsp_set_pdi_perm_read_only (uint16_t *perm_array, uint16_t address)
 Set the PDI register [byte] access permission to read only. More...
 
void bsp_set_pdi_perm_read_write (uint16_t *perm_array, uint16_t address)
 Set the PDI register [byte] access permission to read and write. More...
 
uint8_t bsp_is_pdi_perm_read_only (uint16_t *perm_array, uint16_t address)
 Checks if the PDI register [byte] has read only access permission and returns the result. More...
 
uint32_t bsp_get_pdi_read_access_fail_cnt ()
 Returns the count of PDI read access failures. More...
 
uint32_t bsp_get_pdi_write_access_fail_cnt ()
 Returns the count of PDI write access failures. More...
 

Function Documentation

◆ bsp_read_byte()

uint8_t bsp_read_byte ( PRUICSS_Handle  pruIcssHandle,
uint16_t  address 
)

Read a byte value at 'Address' from ESC memory: SM mailbox (single buffer) mapped or register area.

Parameters
pruIcssHandlePRUSS Handle
addressESC address to read from PDI
Return values
Valueat address

◆ bsp_read_word()

uint16_t bsp_read_word ( PRUICSS_Handle  pruIcssHandle,
uint16_t  address 
)

Read a 16-bit value at 'Address' from ESC memory: SM mailbox (single buffer) mapped or register area.

Parameters
pruIcssHandlePRUSS Handle
addressESC address to read from PDI
Return values
Valueat address

◆ bsp_read_dword()

uint32_t bsp_read_dword ( PRUICSS_Handle  pruIcssHandle,
uint16_t  address 
)

Read a 32-bit value at 'Address' from ESC memory: SM mailbox (single buffer) mapped or register area.

Parameters
pruIcssHandlePRUSS Handle
addressESC address to read from PDI
Return values
Valueat address

◆ bsp_read()

void bsp_read ( PRUICSS_Handle  pruIcssHandle,
uint8_t *  pdata,
uint16_t  address,
uint16_t  len 
)

Read a byte array at 'address' from ESC memory.

Parameters
pruIcssHandlePRUSS Handle
pdataPointer to the array in application
addressESC address to read from PDI
lenNumber of bytes to read from ESC memory

◆ bsp_read_byte_isr()

uint8_t bsp_read_byte_isr ( PRUICSS_Handle  pruIcssHandle,
uint16_t  address 
)

Read a byte value at 'Address' from ESC process data memory: SM buffer (3-buffer) mapped area.

Parameters
pruIcssHandlePRUSS Handle
addressESC Address to read from PDI
Return values
Valueat address

◆ bsp_read_word_isr()

uint16_t bsp_read_word_isr ( PRUICSS_Handle  pruIcssHandle,
uint16_t  address 
)

Read a 16-bit value at 'Address' from ESC process data memory: SM buffer (3-buffer) mapped area.

Parameters
pruIcssHandlePRUSS Handle
addressESC address to read from PDI
Return values
Valueat address

◆ bsp_read_dword_isr()

uint32_t bsp_read_dword_isr ( PRUICSS_Handle  pruIcssHandle,
uint16_t  address 
)

Read a 32-bit value at 'Address' from ESC process data memory: SM buffer (3-buffer) mapped area.

Parameters
pruIcssHandlePRUSS Handle
addressESC address to read from PDI
Return values
Valueat address

◆ bsp_pdi_post_read_indication()

void bsp_pdi_post_read_indication ( PRUICSS_Handle  pruIcssHandle,
uint16_t  address,
uint16_t  length 
)

Invoked after reading a register or mailbox buffer from PDI side
.

     Handles following registers: \n
     SM WD status \n
     AL control   \n
     SYNC0/1 status   \n
     SM Activate registers    \n
     Latch0/1 time Postive/Negative edge  \n
     Also detects read mailbox start address access from PDI side \n
Parameters
pruIcssHandlePRUSS Handle
addressStart address of ESC read from PDI
lengthLength of ESC read from PDI

◆ bsp_pdi_write_indication()

void bsp_pdi_write_indication ( PRUICSS_Handle  pruIcssHandle,
uint16_t  address,
uint16_t  length,
uint16_t  value 
)

Invoked after writing a register or mailbox buffer from PDI side
.

     Handles following registers: \n
     AL status \n
     SM PDI control registers \n
     Also detects write mailbox start address access from PDI side \n
Parameters
pruIcssHandlePRUSS Handle
addressStart address of ESC write from PDI
lengthLength of ESC write from PDI
valueValue to be written?

◆ bsp_write_byte()

void bsp_write_byte ( PRUICSS_Handle  pruIcssHandle,
uint8_t  val,
uint16_t  address 
)

Write a byte value at 'address' in ESC memory.

Parameters
pruIcssHandlePRUSS Handle
val8-bit value to write
addressESC address read from PDI

◆ bsp_write_word()

void bsp_write_word ( PRUICSS_Handle  pruIcssHandle,
uint16_t  val,
uint16_t  address 
)

Write a 16-bit value at 'address' in ESC memory.

Parameters
pruIcssHandlePRUSS Handle
val16-bit value to write
addressESC address read from PDI

◆ bsp_write_dword()

void bsp_write_dword ( PRUICSS_Handle  pruIcssHandle,
uint32_t  val,
uint16_t  address 
)

Write a 32-bit value at 'address' in ESC memory.

Parameters
pruIcssHandlePRUSS Handle
val32-bit value to write
addressESC address read from PDI

◆ bsp_write()

void bsp_write ( PRUICSS_Handle  pruIcssHandle,
uint8_t *  pdata,
uint16_t  address,
uint16_t  len 
)

Write 'len' bytes from pdata to 'address' in ESC memory.

Parameters
pruIcssHandlePRUSS Handle
pdataPointer to byte array in application
addressESC address read from PDI
lenLength of data

◆ bsp_pruss_mdioreg_read()

uint32_t bsp_pruss_mdioreg_read ( PRUICSS_Handle  pruIcssHandle,
uint32_t  regoffset 
)

Read a 32-bit value from PRU-ICSS MDIO register at 'regoffset'.

Parameters
pruIcssHandlePRUSS Handle
regoffsetPRU-ICSS MDIO register offset
Return values
Valueread

◆ bsp_pruss_mdioreg_write()

void bsp_pruss_mdioreg_write ( PRUICSS_Handle  pruIcssHandle,
uint32_t  val,
uint32_t  regoffset 
)

Write a 32-bit value from PRU-ICSS MDIO register at 'regoffset'.

Parameters
pruIcssHandlePRUSS Handle
val32-bit value to write to PRU-ICSS MDIO
regoffsetPRU-ICSS MDIO register offset

◆ bsp_pruss_iepreg_read()

uint32_t bsp_pruss_iepreg_read ( PRUICSS_Handle  pruIcssHandle,
uint32_t  regoffset 
)

Read a 32-bit value from PRU-ICSS IEP register at 'regoffset'.

Parameters
pruIcssHandlePRUSS Handle
regoffsetPRU-ICSS IEP register offset
Return values
Readvalue

◆ bsp_pruss_iepreg_write()

void bsp_pruss_iepreg_write ( PRUICSS_Handle  pruIcssHandle,
uint32_t  val,
uint32_t  regoffset 
)

Write a 32-bit value from PRU-ICSS IEP register at 'regoffset'.

Parameters
pruIcssHandlePRUSS Handle
val32-bit value to write to PRU-ICSS IEP
regoffsetPRU-ICSS MDIO register offset

◆ bsp_pruss_cmd_intfc_write_word()

void bsp_pruss_cmd_intfc_write_word ( uint16_t  val,
volatile uint16_t *  ptr 
)

Read a 16-bit value from PRU-ICSS IEP command interface.

Parameters
val16-bit value to write
ptrPointer to Host - PRU-ICSS command interface in PRU-ICSS data memory

◆ bsp_pruss_cmd_intfc_read_word()

uint16_t bsp_pruss_cmd_intfc_read_word ( volatile uint16_t *  ptr)

Read a 16-bit value from PRU-ICSS IEP command interface.

Parameters
ptrPRU-ICSS command interface pointer
Return values
16-bitvalue read

◆ bsp_get_pdi_access_perm()

uint8_t bsp_get_pdi_access_perm ( uint16_t  address,
uint8_t  access 
)

Checks if the PDI register [byte] has the requested access permission and returns the result.

Parameters
addressPDI Register address
accessPermission to be checked ( Read, Write, Read&Write )
Return values
1if the register has the requested permission, 0 if otherwise

◆ bsp_pdi_access_perm_word()

uint8_t bsp_pdi_access_perm_word ( uint16_t  address,
uint8_t  access 
)

Checks if the PDI register [Two bytes] has the requested access permission and returns the result.

Parameters
addressPDI Register address
accessPermission to be checked ( Read, Write, Read&Write )
Return values
1if the register has the requested permission, 0 if otherwise

◆ bsp_pdi_access_perm_dword()

uint8_t bsp_pdi_access_perm_dword ( uint16_t  address,
uint8_t  access 
)

Checks if the PDI register [Four bytes] has the requested access permission and returns the result.

Parameters
addressPDI Register address
accessPermission to be checked ( Read, Write, Read&Write )
Return values
1if the register has the requested permission, 0 if otherwise

◆ bsp_pdi_access_perm_array()

uint8_t bsp_pdi_access_perm_array ( uint16_t  address,
uint8_t  access,
uint16_t  size 
)

Checks if all PDI registers starting from 'address' has the requested access permission and returns the result.

Parameters
addressPDI Register address
accessPermission to be checked ( Read, Write, Read&Write )
sizeNumber of register bytes
Return values
1if the register has the requested permission, 0 if otherwise

◆ bsp_set_pdi_perm_read_only()

void bsp_set_pdi_perm_read_only ( uint16_t *  perm_array,
uint16_t  address 
)

Set the PDI register [byte] access permission to read only.

Parameters
perm_arrayPointer to the Permissions array
addressPDI Register address

◆ bsp_set_pdi_perm_read_write()

void bsp_set_pdi_perm_read_write ( uint16_t *  perm_array,
uint16_t  address 
)

Set the PDI register [byte] access permission to read and write.

Parameters
perm_arrayPointer to the Permissions array
addressPDI Register address

◆ bsp_is_pdi_perm_read_only()

uint8_t bsp_is_pdi_perm_read_only ( uint16_t *  perm_array,
uint16_t  address 
)

Checks if the PDI register [byte] has read only access permission and returns the result.

Parameters
perm_arrayPointer to the Permissions array
addressPDI Register address
Return values
1if the register has read only permission, 0 if otherwise

◆ bsp_get_pdi_read_access_fail_cnt()

uint32_t bsp_get_pdi_read_access_fail_cnt ( )

Returns the count of PDI read access failures.

Return values
PDIread access fail count

◆ bsp_get_pdi_write_access_fail_cnt()

uint32_t bsp_get_pdi_write_access_fail_cnt ( )

Returns the count of PDI write access failures.

Return values
PDIwrite access fail count