HIC Module

The Host Interface Controller (HIC) API provides a set of functions for configuring and using the Host Interface Controller module. The functions provided helps in the setup and configuration of the Host Interface Controller.

group hic_api

This module is used for Host Interface Controller(HIC) configuration.

Defines

HIC_NUM_BASE_ADDRESS 8U

Number of Base Regions.

HIC_NUM_BUFFER_REGS 16U

Number of D2H,H2D Buffers.

HIC_HOST_INTERFACE_ENABLE 0x0AU

Host Interface Enable.

HIC_LOCK_WRITE_ENABLE_KEY 0x5A5AU

Write Enable Key.

HIC_HOSTCR_WRITE_ENABLE_KEY 0xA5U

Host CR Reg Write Enable Key.

HIC_LOCK_UNLOCK 0x0U

Lock is Unlocked.

HIC_MODE_DW_8BIT 0U

8 Bit Mode

Values that can be passed to HIC_setConfig() as flags or used with HIC_getConfig() API return value parsing

HIC_MODE_DW_16BIT 1U

16 Bit Mode

HIC_MODE_DW_32BIT 2U

32 Bit Mode

HIC_MODE_RW_PIN_SEPARATE 0U

RW Control Pins are separate.

HIC_MODE_RW_PIN_SINGLE 0x10U

Single RnW Control Pin.

HIC_MODE_BEN_PRESENT 0x20U

Byte Enable Present.

HIC_MODE_BEN_ABSENT 0U

Byte Enable not Present.

HIC_MODE_RDY_PRESENT 0x40U

nRDY Pin Present

HIC_MODE_RDY_ABSENT 0U

nRDY Pin not Present

HIC_MODE_H2DBUF_DEVWREN 0x100U

H2D Buf Device Write Enable.

HIC_MODE_D2HBUF_HOST_WR_ENABLE 0x200U

D2H Buf Host Write Enable.

HIC_MODE_DEVICE_HOST_ACCESS_ENABLE 0x400U

Host Access Enable.

HIC_MODE_HOST_WREALLOW_ENABLE 0x800U

Host EALLOW Write Enable.

HIC_PIN_POLARITY_CS_HIGH 0x1U

Active High Chip Select.

Values that can be passed to HIC_setPinPolarity() API as flags or used with HIC_getPinPolarity() API return value parsing

HIC_PIN_POLARITY_CS_LOW 0x0U

Active Low Chip Select.

HIC_PIN_POLARITY_BEN_HIGH 0x2U

Active High Byte Enable.

HIC_PIN_POLARITY_BEN_LOW 0x0U

Active Low Byte Enable.

HIC_PIN_POLARITY_OE_HIGH 0x4U

Active High Output Enable.

HIC_PIN_POLARITY_OE_LOW 0x0U

Active Low Output Enable.

HIC_PIN_POLARITY_WE_HIGH 0x8U

Active High Write Enable.

HIC_PIN_POLARITY_WE_LOW 0x0U

Active Low Write Enable.

HIC_PIN_POLARITY_RDY_HIGH 0x10U

Active High Ready Pin.

HIC_PIN_POLARITY_RDY_LOW 0x0U

Active Low Ready Pin.

HIC_HOST_CONTROL_EALLOW_EN 1U

Host EALLOW Enable.

Values that can be passed to HIC_configureHostAccessMode() API as config or used with HIC_getHostAccessMode() API return value parsing

HIC_HOST_CONTROL_EALLOW_DIS 0U

Host EALLOW Disable.

HIC_HOST_CONTROL_ACCSIZE_16BIT 0U

Device MMR Access size 16 bit.

HIC_HOST_CONTROL_ACCSIZE_32BIT 2U

Device MMR Access size 32 bit.

HIC_HOST_CONTROL_PAGESEL_REG 0U

Page selected via Register.

HIC_HOST_CONTROL_PAGESEL_PIN 4U

Page selected via Pin.

HIC_EVTTRIG_EVENT_0 0x010000U

EVTTRIG0.

Values that can be passed to HIC_enableD2HInterrupt() API or or used with HIC_disableD2HInterrupt() API to enable/disable interrupt or with HIC_clearD2HInterrupt() API to clear interrupt

HIC_EVTTRIG_EVENT_1 0x020000U

EVTTRIG1.

HIC_EVTTRIG_EVENT_2 0x040000U

EVTTRIG2.

HIC_EVTTRIG_EVENT_3 0x080000U

EVTTRIG3.

HIC_EVTTRIG_EVENT_4 0x100000U

EVTTRIG4.

HIC_EVTTRIG_EVENT_5 0x200000U

EVTTRIG5.

HIC_EVTTRIG_EVENT_6 0x400000U

EVTTRIG6.

HIC_EVTTRIG_EVENT_7 0x800000U

EVTTRIG7.

Functions

uint32_t HIC_getRevision(void)

Returns the Revision of HIC Controller interface.

This function returns the hardware revision of the Host Interface controller module

Return

The Hardware Version number returns the content of HICREV register. Please refer to device TRM for field wise details.

void HIC_enableHostInterface(void)

Enables the Host Access to the Device region and to the Mailbox

The Host interface Controller module provides two mechanisms of access

  1. Using Device Memory access, the host can access the memory directly read/write/poll for registers

  2. Using the Mailbox mechanism which can be used when the Host can write the parameters to the mailbox Host-to-Device buffer region and then trigger an interrupt to the Device. The HIC module with the other application running on device side can then be used to signal to the host, using the Device-to-Host buffer region in response. This API enables the access to the Device region and Mailbox. This should be used as the first API in sequence of configuring the HIC module.

Return

none

void HIC_enableLock(void)

Enables the Lock for the HIC module registers protected by Writes

This API enables the lock, which protects the writes to registers protected by Lock. Calling this API prevents writes to the write protected registers.

Return

none

void HIC_disableLock(void)

Disables the Lock for the HIC module registers protected by Writes

This API disables the lock(unlocks), which enables the writes to registers protected by Lock. Calling this API enables writes to the write protected registers. This API must be called one time before calling any of these APIs

Return

None

void HIC_setConfig(uint32_t flags)

Sets the Host Interface Controller Configurations

This API configures the HICMODECR register for the selected configuration

HIC_disableLock() API should have been called prior to this API.

Any one of following values for Data Width

  • HIC_MODE_DW_8BIT -for 8bit Data

  • HIC_MODE_DW_16BIT -for 16bit Data

  • HIC_MODE_DW_32BIT -for 32bit Data

Parameters
  • flags: specifies the ORed values of any of following flags.

Any one of following values for Read Write Pin

  • HIC_MODE_RW_PIN_SEPARATE - for Separate Read and Write Pin

  • HIC_MODE_RW_PIN_SINGLE - for Same Read and Write Pin

Any one of following values for Byte Enable Pin configuration

  • HIC_MODE_BEN_PRESENT - for using Byte Enable Pin

  • HIC_MODE_BEN_ABSENT - for not using Byte Enable Pin

Any one of following values for Ready Pin

  • HIC_MODE_RDY_PRESENT - for using Ready Pin for extended wait

  • HIC_MODE_RDY_ABSENT - for not using Extended Wait pin

Other configurations:

  • HIC_MODE_H2DBUF_DEVWREN - for enabling Device access to host to Device Buffers. If this is not enabled the device cannot write to Host to Device buffers

  • HIC_MODE_D2HBUF_HOST_WR_ENABLE - for enabling host access to device to host buffers. If this is not enabled the host cannot write to device to host buffers.

  • HIC_MODE_DEVICE_HOST_ACCESS_ENABLE - for enabling access to the device region. Only if this is enabled the regions selected by Base select registers using the HIC_selectBaseAddress() API shall be accessible. Without this only the HIC registers and Mailbox registers will be accessible for the host.

  • HIC_MODE_HOST_WREALLOW_ENABLE - for enabling host access to write to EALLOW bitfield using HIC_configureHostAccessMode() API. Without enabling this HIC_configureHostAccessMode(HIC_HOSTCR_EALLOW_EN) will not work.

    Return

    None

uint32_t HIC_getConfig(void)

Returns the Host Interface Controller Configurations

Following values for Other Configurations

  • HIC_MODE_RW_PIN_SEPARATE/ HIC_MODE_RW_PIN_SINGLE - for Read/Write Pin

  • HIC_MODE_BEN_PRESENT/HIC_MODE_BEN_ABSENT - for Byte Enable Pin Usage

  • HIC_MODE_RDY_PRESENT/HIC_MODE_RDY_ABSENT - for using Ready Pin for extended wait

  • HIC_MODE_H2DBUF_DEVWREN- Device access to Host to Device Buffer Enabled

  • HIC_MODE_D2HBUF_HOST_WR_ENABLE - Host access to Device to Host Buffer enabled

  • HIC_MODE_DEVICE_HOST_ACCESS_ENABLE - for enabling access to the device

  • HIC_MODE_HOST_WREALLOW_ENABLE - for host access to write to EALLOW

Return

32-bit integer specifies the ORed values of following flags Any one of following values for Data Width

  • HIC_MODE_DW_8BIT -for 8bit Data

  • HIC_MODE_DW_16BIT -for 16bit Data

  • HIC_MODE_DW_32BIT -for 32bit Data

This API returns the current configuration of HIC module. It can be used along with macros defined in hw_hic.h as below. For querying the Data width use like in below examples HIC_getConfig() & HIC_MODECR_DW_MODE_M == HIC_MODE_DW_8BIT for Data width HIC_getConfig() & HIC_MODECR_RW_MODE == HIC_MODE_RW_PIN_SINGLE for RW Pin HIC_getConfig() & HIC_MODECR_BEN_PRESENT == HIC_MODE_BEN_PRESENT for BE Pin

void HIC_setPinPolarity(uint16_t flags)

Sets the Host Interface Controller Pin Polarity. This API configures the HICPINPOLCR register for the selected configuration. HIC_disableLock() API should have been called prior to this API.

Any one of following values for Chip Select Pin

  • HIC_PIN_POLARITY_CS_HIGH - for Active High Chip Select Pin

  • HIC_PIN_POLARITY_CS_LOW - for Active Low Chip Select Pin

Parameters
  • flags: specifies the ORed values of any of following flags

Any one of following values for Byte Enable Pin configuration

  • HIC_PIN_POLARITY_BEN_HIGH - for Active High Byte Enable

  • HIC_PIN_POLARITY_BEN_LOW - for Active Low Byte Enable

Any one of following values for Output Enable Pin

  • HIC_PIN_POLARITY_OE_HIGH - for Active High Output Enable

  • HIC_PIN_POLARITY_OE_LOW - for Active Low Output Enable

Any one of following values for Write Enable Pin

  • HIC_PIN_POLARITY_WE_HIGH - for Active High Write Enable

  • HIC_PIN_POLARITY_WE_LOW - for Active Low Write Enable

Any one of following values for Ready Pin

  • HIC_PIN_POLARITY_RDY_HIGH - for Active High Write Enable

  • HIC_PIN_POLARITY_RDY_LOW - for Active Low Write Enable

Return

None

uint32_t HIC_getPinPolarity(void)

Returns the Host Interface Controller Pin Polarity Configurations

This API returns the HICPINPOLCR register for the selected configuration

This API returns the Pin Polarity.This can be used with the macros defined in

hw_hic.h as shown below HIC_getPinPolarity & HIC_PINPOLCR_BEN_POL == HIC_PIN_POLARITY_BEN_HIGH for checking the status of Byte Enable Pin Polarity
Return

32-bit integer specifies the ORed values of any of following flags Following values for corresponding Pin Configuration

  • HIC_PIN_POLARITY_CS_HIGH/ HIC_PIN_POLARITY_CS_HIGH - for CS Pin

  • HIC_PIN_POLARITY_BEN_HIGH/HIC_PIN_POLARITY_BEN_HIGH- for Byte Enable pin

  • HIC_PIN_POLARITY_OE_HIGH/HIC_PIN_POLARITY_OE_LOW - for OE Pin

  • HIC_PIN_POLARITY_WE_HIGH/HIC_PIN_POLARITY_WE_LOW- for WE Pin

  • HIC_PIN_POLARITY_RDY_HIGH/HIC_PIN_POLARITY_RDY_LOW - for RDY Pin

void HIC_selectBaseAddress(uint16_t selectIndex)

Selects the Base Address for the device memory access

The Device memory region will be accessible by the region selected in this API. Also look at HIC_configureHostAccessMode(HIC_HOSTCR_PAGESEL)

Parameters
  • selectIndex: specifies the index of Base address in the Base Address regions can vary from 0 to HIC_NUM_BASE_ADDRESS-1

Return

None

uint16_t HIC_getSelectedBaseAddressIndex(void)

Returns the Selected Base address index for the device memory access

The Device memory region will be accessible by the region selected in this API. Also look at HIC_configureHostAccessMode(HIC_HOSTCR_PAGESEL)

Return

selected index of Base address in the Base Address regions. can vary from 0 to HIC_NUM_BASE_ADDRESS-1

void HIC_configureHostAccessMode(uint16_t config)

Configures the Host Access modes to the device region

Return

None

Parameters
  • config: logical OR of the following values

    • HIC_HOSTCR_EALLOW_EN for enabling module writes to EALLOW Protected registers

    • either of HIC_HOST_CONTROL_ACCSIZE_16BIT/HIC_HOST_CONTROL_ACCSIZE_32BIT to select 16 bit or 32 bit device side master port accesses

    • either of HIC_HOST_CONTROL_PAGESEL_REG/HIC_HOST_CONTROL_PAGESEL_PIN to select Page/Region selection based on PAGESEL register programmed using HIC_selectBaseAddress()API or the PAGESEL Pin

uint32_t HIC_getHostAccessMode(void)

Provides the Host Access modes configured currently

This API can be used with few Macros defined in

hw_hic.h as below (HIC_getAccessMode() & HIC_HOSTCR_ACCSIZE) == HIC_HOST_CONTROL_ACCSIZE_32BIT for Access size checking. Similarly it can be used for other bit fields.
Return

Host Access mode value as configured HIC_configureHostAccessMode() API which is a logical OR of

  • HIC_HOSTCR_EALLOW_EN for enabling module writes to EALLOW Protected registers

  • either of HIC_HOST_CONTROL_ACCSIZE_16BIT/HIC_HOST_CONTROL_ACCSIZE_32BIT for selected 16 bit or 32 bit device side master port accesses

  • either of HIC_HOST_CONTROL_PAGESEL_REG/HIC_HOST_CONTROL_PAGESEL_PIN for selected Page/Region selection based on PAGESEL register programmed using HIC_selectBaseAddress()API or the PAGESEL Pin

uint32_t HIC_getErrorAddress(void)

Returns the Host and Device side Status when an Error happened on interface

Return

returns the logical OR of the following

  • 8 bit Host to Device Error Address when Host to Device Error happens

  • 3 bit Base select value when Host to Device Error happens

  • 8 bit Device to Host Error Address when Device to Host Error happens

  • 3 bit Base select value when Device to Host Error Happens.

    Please refer to TRM HICERRADDR register for more details on this.

uint32_t HIC_getH2DToken(void)

Returns the token written by the token written onto the Host to Device Token

This API can be used while using the Mailbox mechanism.

Return

the 32 bit Token value written into the register

void HIC_setD2HToken(uint32_t token)

Writes the Token to the Host from Device

This API can be used while using the Mailbox mechanism. Writing to this register could be used to trigger an interrupt to the Host using the Device to Host interrupt line(D2HINT) of the module. It can be used to interrupt the external host.

Return

None

Parameters
  • token: is the 32 bit token value to be written. It could be used to denote the number of bytes written on to the Device-to-Host buffer

uint32_t HIC_getD2HToken(void)

Returns the token written by the token written onto the Device to Host Token

This API can be used while using the Mailbox mechanism.

Return

the 32 bit Token value written into the register

void HIC_setBaseAddress(uint16_t index, uint32_t baseAddress)

Configures the Base Address of the region

The device memory which HIC module can access can be divided into multiple 256 byte regions. For Example: GSRAM in Region 0, ADC registers in Region 1 FSI registers in Region 2,etc This API helps to configure the base address for each region The HIC address Pin can then be used to offset into the specific region by the host

Parameters
  • index: specifies the index of the Device Region to be configured can be from 0 to HIC_NUM_BASE_ADDRESS-1

  • baseAddress: the 32 bit base address of the device region being configured

Return

None

uint32_t HIC_getBaseAddress(uint16_t index)

Returns the Base Address configured for the region

Returns the configured base address for the Region index provided

Parameters
  • index: specifies the index of the Device Region to be configured can be from 0 to HIC_NUM_BASE_ADDRESS-1

Return

32 bit base address configured for the region

void HIC_enableH2DInterrupt(uint32_t flags)

Enables the Interrupts from Host to Device

Enables the specified interrupts. This will result in a HIC interrupt generated to the C28x core.

Parameters
  • flags: specifies the logical ORed values below

    • HIC_H2DINTEN_H2D_INTEN - Data Ready interrupt Enable

    • HIC_H2DINTEN_BUSERR_INTEN - Bus error Interrupt Enable

    • HIC_H2DINTEN_ILLWR_INTEN - Illegal Write Interrupt Enable

    • HIC_H2DINTEN_ILLRD_INTEN - Illegal Read Interrupt Enable

Return

None

void HIC_disableH2DInterrupt(uint32_t flags)

Disables the Interrupts from Host to Device

Disables the interrupt flags specified

Parameters
  • flags: specifies the logical ORed values below

    • HIC_H2DINTEN_H2D_INTEN - Data Ready interrupt Enable

    • HIC_H2DINTEN_BUSERR_INTEN - Bus error Interrupt Enable

    • HIC_H2DINTEN_ILLWR_INTEN - Illegal Write Interrupt Enable

    • HIC_H2DINTEN_ILLRD_INTEN - Illegal Read Interrupt Enable

Return

None

uint32_t HIC_getH2DInterruptStatus(void)

Gives the status of Host to Device interrupts

The Flag if Set indicates that the corresponding Interrupt is active (has occured)

Return

32bit flag with the logical ORed values below

  • HIC_H2DINTFLG_H2D_FLG - Data Ready interrupt Status

  • HIC_H2DINTFLG_BUSERR_FLG - Bus error Interrupt Status

  • HIC_H2DINTFLG_ILLWR_FLG - Illegal Write Interrupt Status

  • HIC_H2DINTFLG_ILLRD_FLG - Illegal Read Interrupt Status.

void HIC_clearH2DInterrupt(uint32_t flags)

Clears the Interrupts from Host to Device

Clears the interrupt flags specified

Parameters
  • flags: specifies the logical ORed values below to be cleared

    • HIC_H2DINTCLR_H2D_CLR - Data Ready interrupt Clear

    • HIC_H2DINTCLR_BUSERR_CLR - Bus error Interrupt Clear

    • HIC_H2DINTCLR_ILLWR_CLR - Illegal Write Interrupt Clear

    • HIC_H2DINTCLR_ILLRD_CLR - Illegal Read Interrupt Clear

Return

None

void HIC_forceH2DInterrupt(uint32_t flags)

Forces the Interrupts from Host to Device

Forces the interrupt flags specified. Can be used for Debug purpose.

Parameters
  • flags: specifies the logical ORed values below to be Forced

    • HIC_H2DINTFRC_H2D_INTFRC - Data Ready interrupt Force

    • HIC_H2DINTFRC_BUSERR_INTFRC - Bus error Interrupt Force

    • HIC_H2DINTFRC_ILLWR_INTFRC - Illegal Write Interrupt Force

    • HIC_H2DINTFRC_ILLRD_INTFRC - Illegal Read Interrupt Force

Return

None

void HIC_enableD2HInterrupt(uint32_t flags)

Enables the Interrupts from Device to Host

Enables the specified interrupts. This will result in a HIC interrupt generated to the Host(D2HINT).

Parameters
  • flags: specifies the logical ORed values below

    • HIC_D2HINTEN_D2H_INTEN - Data Ready interrupt Enable

    • HIC_D2HINTEN_BUSERR_INTEN - Bus error Interrupt Enable

    • HIC_D2HINTEN_ILLWR_INTEN - Illegal Write Interrupt Enable

    • HIC_D2HINTEN_ILLRD_INTEN - Illegal Read Interrupt Enable

    • HIC_D2HINTEN_ACCVIO_INTEN - Access Violation Interrupt Enable

    • Event Trigger interrupt flags - The higher 16 bits when Set will enable corresponding D2H interrupts. Refer TRM for details.

Return

None

void HIC_disableD2HInterrupt(uint32_t flags)

Disables the Interrupts from Device to Host

Disables the interrupt flags specified

Parameters
  • flags: specifies the logical ORed values below

    • HIC_D2HINTEN_D2H_INTEN - Data Ready interrupt Enable

    • HIC_D2HINTEN_BUSERR_INTEN - Bus error Interrupt Enable

    • HIC_D2HINTEN_ILLWR_INTEN - Illegal Write Interrupt Enable

    • HIC_D2HINTEN_ILLRD_INTEN - Illegal Read Interrupt Enable

    • HIC_D2HINTEN_ACCVIO_INTEN - Access Violation Interrupt Enable

    • Event Trigger interrupt flags - The higher 16 bits when set will disable corresponding D2H interrupts. Refer TRM for details.

Return

None

uint32_t HIC_getD2HInterruptStatus(void)

Gives the status of Device to Host interrupts

Return

32bit flag with the logical ORed values below

  • HIC_D2HINTFLG_D2H_FLG - Data Ready interrupt Status

  • HIC_D2HINTFLG_BUSERR_FLG - Bus error Interrupt Status

  • HIC_D2HINTFLG_ILLWR_FLG - Illegal Write Interrupt Status

  • HIC_D2HINTFLG_ILLRD_FLG - Illegal Read Interrupt Status

  • HIC_D2HINTFLG_ACCVIO_FLG - Access Violation Interrupt Status

  • Event Trigger Interrupt Flags - The higher 16 bits give the status of event Trigger Interrupt flags. Refer TRM for the sources of these interrupts.

    The Flag if Set indicates that the corresponding Interrupt is active (has occurred)

void HIC_clearD2HInterrupt(uint32_t flags)

Clears the Interrupts from Host to Device

Clears the interrupt flags specified

Parameters
  • flags: specifies the logical ORed values below to be cleared

    • HIC_D2HINTCLR_D2H_CLR - Data Ready interrupt Clear

    • HIC_D2HINTCLR_BUSERR_CLR - Bus error Interrupt Clear

    • HIC_D2HINTCLR_ILLWR_CLR - Illegal Write Interrupt Clear

    • HIC_D2HINTCLR_ILLRD_CLR - Illegal Read Interrupt Clear

    • HIC_D2HINTCLR_ACCVIO_CLR - Access Violation Interrupt Clear

    • Event Trigger Interrupt Clear Flags - The higher 16 bits indicates event trigger flags to be cleared. Refer TRM for the sources of these interrupts.

Return

None

void HIC_forceD2HInterrupt(uint32_t flags)

Forces the Interrupts from Host to Device

Forces the interrupt flags specified. Can be used for Debug purposes.

Parameters
  • flags: specifies the logical ORed values below to be Forced

    • HIC_D2HINTFRC_D2H_INTFRC - Data Ready interrupt Force

    • HIC_D2HINTFRC_BUSERR_INTFRC - Bus error Interrupt Force

    • HIC_D2HINTFRC_ILLWR_INTFRC - Illegal Write Interrupt Force

    • HIC_D2HINTFRC_ILLRD_INTFRC - Illegal Read Interrupt Force

    • HIC_D2HINTFRC_ACCVIO_INTFRC - Access violation Interrupt Force

    • Event Trigger Interrupt Force Flags - The higher 16 bits indicates event trigger flags to be cleared. Refer TRM for the sources of these interrupts.

Return

None

uint32_t HIC_getAccessViolationAddress(void)

Returns the Address when Access violation happened

While the HIC module internal access port accesses a memory, if there is an access violation, the module updates the address in this register.

Return

returns the 32 bit address when the Access violation happened

uint32_t HIC_readH2DBuffer(uint16_t offset)

Returns the Host to Device Buffer for the offset specified

The Host to Device buffer can be used to implement a communication scheme on which the Host writes the data to sent to the Control peripherals. The MCU can pick it up and stream it over control peripherals. The Device to Host Buffer can be used to write the response back. The External host need not continuously wait for the data/response.

Return

returns the 32 bit content of the Host to Device buffer.

Parameters
  • offset: specifies the offset of the H2D buffer can vary from 0 to HIC_NUM_BUFFER_REGS-1

void HIC_writeH2DBuffer(uint16_t offset, uint32_t data)

Writes to the Host to Device buffer

This API should be used only when the Device write to Host buffer is enabled, using HIC_setConfig(HIC_MODECR_H2DBUF_DEVWREN) API.

Return

none

Parameters
  • offset: specifies the offset of the H2D buffer can vary from 0 to HIC_NUM_BUFFER_REGS-1

  • data: the 32bit data to be written onto the buffer

void HIC_clearH2DBuffer(uint16_t offset)

Clears the Host to Device buffer (by making it Zero)

This API should be used only when the Device write to Host buffer is enabled, using HIC_setConfig(HIC_MODECR_H2DBUF_DEVWREN) API. This API can be used to clear the content of H2D Buffer

Return

none

Parameters
  • offset: specifies the offset of the H2D buffer can vary from 0 to HIC_NUM_BUFFER_REGS-1

uint32_t HIC_readD2HBuffer(uint16_t offset)

Returns the Device to Host Buffer for the offset specified

The Device to Host Buffer can be used to write the response back to host The External host need not continuously wait for the data/response.

Return

returns the 32 bit content of the Device to Host buffer

Parameters
  • offset: specifies the offset of the D2H buffer can vary from 0 to HIC_NUM_BUFFER_REGS-1

void HIC_writeD2HBuffer(uint16_t offset, uint32_t data)

Writes to the Device to Host buffer

Return

none

Parameters
  • offset: specifies the offset of the D2H buffer can vary from 0 to HIC_NUM_BUFFER_REGS-1

  • data: the 32bit data to be written onto the buffer

void HIC_clearD2HBuffer(uint16_t offset)

Clears the Device to Host buffer (by making it Zero)

This API can be used to clear the content of D2H Buffer

Return

none

Parameters
  • offset: specifies the offset of the D2H buffer can vary from 0 to HIC_NUM_BUFFER_REGS-1

The code for this module is contained in driverlib/hic.h containing the API declarations for use by applications.