CC35xxDriverLibrary
Collaboration diagram for Xip_api:

Macros

#define XIP_UDMA_BIT_SECURE_MASK   0x04000000
 Address bit secure mask - identify secure/non-secure address based on bit 26 (External memory) More...
 
#define XIP_UDMA_CHANNEL_STATUS_IDLE   0
 Channel is in IDLE state, there is no active job. More...
 
#define XIP_UDMA_CHANNEL_STATUS_PROGRESS   1
 Channel is in PROGRESS state, there is an active job. More...
 
#define XIP_UDMA_DIRECTION_EXT_TO_INT   0
 UDMA Data movement from External memory to Internal memory. More...
 
#define XIP_UDMA_DIRECTION_INT_TO_EXT   1
 UDMA Data movement from Internal memory to External memory. More...
 
#define XIP_UDMA_JOB_STARTED   0
 UDMA job started. More...
 
#define XIP_UDMA_JOB_NOT_START   (-1)
 UDMA job not started. More...
 
#define XIP_UDMA_JOB_IRQ_STATUS_DONE   0
 Transaction done. More...
 
#define XIP_UDMA_JOB_IRQ_STATUS_BUS_ERROR   1
 Error, but able to recover (only in write) More...
 
#define XIP_UDMA_JOB_IRQ_STATUS_SEC_ERROR   2
 Error, unable to recover. More...
 
#define XIP_UDMA_NON_SECURE_CHANNEL   0
 
#define XIP_UDMA_SECURE_CHANNEL   1
 

Functions

uint32_t XIPStartUDMATransaction (const uint32_t *srcAddr, uint32_t *dstAddr, uint32_t length, uint8_t directionMode, uint32_t channelSelect)
 Configure the relevant channel and start a uDMA transaction. More...
 
uint32_t XIPGetUDMAChannelProgressingStatus (uint32_t channelSelect)
 Return the channel progressing status. More...
 
uint32_t XIPGetUDMAChannelWordsLeft (uint32_t channelSelect)
 Return the channel remaining words left to transmit. More...
 
uint32_t XIPGetUDMAIrqStatus (uint32_t channelSelect)
 Return the transactions status. More...
 
void XIPDisableOTFDE (void)
 Disable the OTFDE processing. More...
 
void XIPEnableOTFDE (void)
 Enable the OTFDE processing. More...
 

Detailed Description

Macro Definition Documentation

§ XIP_UDMA_BIT_SECURE_MASK

#define XIP_UDMA_BIT_SECURE_MASK   0x04000000

Address bit secure mask - identify secure/non-secure address based on bit 26 (External memory)

§ XIP_UDMA_CHANNEL_STATUS_IDLE

#define XIP_UDMA_CHANNEL_STATUS_IDLE   0

Channel is in IDLE state, there is no active job.

§ XIP_UDMA_CHANNEL_STATUS_PROGRESS

#define XIP_UDMA_CHANNEL_STATUS_PROGRESS   1

Channel is in PROGRESS state, there is an active job.

§ XIP_UDMA_DIRECTION_EXT_TO_INT

#define XIP_UDMA_DIRECTION_EXT_TO_INT   0

UDMA Data movement from External memory to Internal memory.

§ XIP_UDMA_DIRECTION_INT_TO_EXT

#define XIP_UDMA_DIRECTION_INT_TO_EXT   1

UDMA Data movement from Internal memory to External memory.

§ XIP_UDMA_JOB_STARTED

#define XIP_UDMA_JOB_STARTED   0

UDMA job started.

Referenced by XIPStartUDMATransaction().

§ XIP_UDMA_JOB_NOT_START

#define XIP_UDMA_JOB_NOT_START   (-1)

UDMA job not started.

Referenced by XIPStartUDMATransaction().

§ XIP_UDMA_JOB_IRQ_STATUS_DONE

#define XIP_UDMA_JOB_IRQ_STATUS_DONE   0

Transaction done.

§ XIP_UDMA_JOB_IRQ_STATUS_BUS_ERROR

#define XIP_UDMA_JOB_IRQ_STATUS_BUS_ERROR   1

Error, but able to recover (only in write)

§ XIP_UDMA_JOB_IRQ_STATUS_SEC_ERROR

#define XIP_UDMA_JOB_IRQ_STATUS_SEC_ERROR   2

Error, unable to recover.

§ XIP_UDMA_NON_SECURE_CHANNEL

§ XIP_UDMA_SECURE_CHANNEL

#define XIP_UDMA_SECURE_CHANNEL   1

Function Documentation

§ XIPStartUDMATransaction()

uint32_t XIPStartUDMATransaction ( const uint32_t *  srcAddr,
uint32_t *  dstAddr,
uint32_t  length,
uint8_t  directionMode,
uint32_t  channelSelect 
)

Configure the relevant channel and start a uDMA transaction.

Parameters
srcAddris a pointer to the source data.
dstAddris a pointer to the destination data.
Note
if direction is XIP_UDMA_DIRECTION_EXT_TO_INT srcAddr: pointer to External memory dstAddr: pointer to Internal memory if direction is XIP_UDMA_DIRECTION_INT_TO_EXT srcAddr: pointer to Internal memory dstAddr: pointer to External memory
For non-secured channel, external memory address must comply with bit 26 to enable Secure/Non-Secure accesses, otherwise transactions will be blocked. In case using SAU to define secured memory region 'inside' the non-secured, non-secure channel will allow this.
Parameters
lengthis the number of words to transfer and should not be larger than XIP_UDMA_MAX_JOB_SIZE.
directionModespecify the copy direction.
channelSelectspecify which channel to use secure or non-secure (in current implementation only use SECURE channel!)
Returns
Returns indication if job started or if job did not started because of an ongoing job.
Note
Follow the transfer limitations: ONLY USE XIP_UDMA_SECURE_CHANNEL

References ASSERT, HOST_XIP_O_UDSCFG0, HOST_XIP_O_UDSCFG1, HOST_XIP_O_UDSCFG2, HOST_XIP_O_UDSCFG3, HOST_XIP_O_UDSCTL0, HOST_XIP_O_UDSSTA, HOST_XIP_REGS_BASE, HOST_XIP_UDSCFG0_JSRCADDR_M, HOST_XIP_UDSCFG0_JSRCADDR_S, HOST_XIP_UDSCFG1_JDESTADDR_M, HOST_XIP_UDSCFG1_JDESTADDR_S, HOST_XIP_UDSCFG2_JLEN_M, HOST_XIP_UDSCFG2_JLEN_S, HOST_XIP_UDSCFG3_JDIR_M, HOST_XIP_UDSCFG3_JDIR_S, HOST_XIP_UDSCTL0_JSTART, HOST_XIP_UDSSTA_JSTA_M, HWREG, XIP_UDMA_JOB_NOT_START, XIP_UDMA_JOB_STARTED, XIP_UDMA_MAX_JOB_SIZE, XIP_UDMA_NO_JOB_CONFIGURED, XIP_UDMA_NON_SECURE_CHANNEL, XIP_UDMA_NONSEC_CH_OFFSET, and XIP_UDMA_SEC_CH_OFFSET.

§ XIPGetUDMAChannelProgressingStatus()

uint32_t XIPGetUDMAChannelProgressingStatus ( uint32_t  channelSelect)

Return the channel progressing status.

Parameters
channelSelectselects either secure or non-secure channel.
Note
This function does not return the transaction status, only the channel status.
Returns
Returns the channel progressing status, one of the following:
See also
XIPGetUDMAIrqStatus()

References HOST_XIP_O_UDSSTA, HOST_XIP_REGS_BASE, HOST_XIP_UDSSTA_JINPROG_M, HOST_XIP_UDSSTA_JINPROG_S, HWREG, XIP_UDMA_NON_SECURE_CHANNEL, XIP_UDMA_NONSEC_CH_OFFSET, and XIP_UDMA_SEC_CH_OFFSET.

§ XIPGetUDMAChannelWordsLeft()

uint32_t XIPGetUDMAChannelWordsLeft ( uint32_t  channelSelect)

Return the channel remaining words left to transmit.

Parameters
channelSelectselects either secure or non-secure channel.
Note
This function return the channel words left to transmit.

References HOST_XIP_O_UDSSTA, HOST_XIP_REGS_BASE, HOST_XIP_UDSSTA_RDWRDSLFT_M, HOST_XIP_UDSSTA_RDWRDSLFT_S, HWREG, XIP_UDMA_NON_SECURE_CHANNEL, XIP_UDMA_NONSEC_CH_OFFSET, and XIP_UDMA_SEC_CH_OFFSET.

§ XIPGetUDMAIrqStatus()

uint32_t XIPGetUDMAIrqStatus ( uint32_t  channelSelect)

Return the transactions status.

This function can be called when interrupt raised or when channel is Idle.

Parameters
channelSelectselects either the secure or non-secure channel.
Returns
Returns the current interrupt status, one of the following:

References HOST_XIP_O_UDSIRQ, HOST_XIP_REGS_BASE, HOST_XIP_UDSIRQ_JIRQSTA_M, HOST_XIP_UDSIRQ_JIRQSTA_S, HWREG, XIP_UDMA_NON_SECURE_CHANNEL, XIP_UDMA_NONSEC_CH_OFFSET, and XIP_UDMA_SEC_CH_OFFSET.

§ XIPDisableOTFDE()

void XIPDisableOTFDE ( void  )

Disable the OTFDE processing.

Note
It is the user's responsibility to check that there are no active/pending tasks before calling this function.
this function must be placed in RAM by the linker (ref. TI.ramfunc), as calling to this function will disable any access to flash, preventing execution for flash.

§ XIPEnableOTFDE()

void XIPEnableOTFDE ( void  )

Enable the OTFDE processing.

Note
this function must be placed in RAM by the linker (ref. TI.ramfunc), as only this function enables the access to the flash.

Referenced by __attribute__().