CC23x0R5DriverLibrary
copylist.h File Reference
#include <stdint.h>
#include "hapi.h"
#include "../inc/hw_types.h"
Include dependency graph for copylist.h:

Go to the source code of this file.

Macros

#define CopyList_EOL   0U
 Copy list macro to end a copy list. More...
 
#define CopyList_NOP   CopyList_WAIT(0U)
 Copy list macro to do nothing. More...
 
#define CopyList_WAIT(n)   (0x10000000U | (((uint32_t)n << 2U) & 0xFFFFCU))
 Copy list macro for waiting n iterations of a do-nothing loop. More...
 
#define CopyList_COPY(address)   ((uint32_t)address | 0x1U)
 Copy list macro for copying a single literal to a specified address. More...
 
#define CopyList_COPY_MULTI(address, n)   (((uint32_t)address & 0xF00FFFFCU) | (((uint32_t)n << 20U) & 0xFF00000U))
 Copy list macro for copying multiple literals to a specified address. More...
 
#define CopyList_JUMP(address)   ((uint32_t)address | 0x2U)
 Copy list macro for continuing copy list processing at a new address. More...
 
#define CopyList_CALL(address)   ((uint32_t)address | 0x3U)
 Copy list macro to recurse to a new list. More...
 

Functions

__STATIC_INLINE void CopyList_apply (const uint32_t *list)
 Process copy list Processes a copy list in a flexible CopyList format. Used by trims in FCFG, for user-defined initialization in CCFG and may be used by peripheral drivers to do HW reinitialization during wakeup from standby. The copy list is processed as a sequence of 32b command words, followed by zero or more literal words (LW): More...
 

Macro Definition Documentation

§ CopyList_EOL

#define CopyList_EOL   0U

Copy list macro to end a copy list.

Processing of the copy list with CopyList_apply() will stop upon encountering this entry.

Command 31:2827:20 19:2 1:0LWDescription
EOL 0000 0000_00000000_0000_0000_0000_0000 0 End-of-list
See also
CopyList_apply()

§ CopyList_NOP

#define CopyList_NOP   CopyList_WAIT(0U)

Copy list macro to do nothing.

Command 31:2827:20 19:2 1:0LWDescription
NOP = WAIT(0)0001 0000_00000000_0000_0000_0000_0000 0 No operation
See also
CopyList_apply()

§ CopyList_WAIT

#define CopyList_WAIT (   n)    (0x10000000U | (((uint32_t)n << 2U) & 0xFFFFCU))

Copy list macro for waiting n iterations of a do-nothing loop.

Command 31:2827:20 19:2 1:0LWDescription
WAIT(N) 0001 0000_0000nnnn_nnnn_nnnn_nnnn_nn00 0 Wait N/12 us
Parameters
[in]nNumber of iterations to wait. Must be in range [1, 2^18 - 1].
See also
CopyList_apply()

§ CopyList_COPY

#define CopyList_COPY (   address)    ((uint32_t)address | 0x1U)

Copy list macro for copying a single literal to a specified address.

This macro copies a 32-bit literal to a specified address. This command expects the next word in the copy list to be the literal it is supposed to copy.

Command 31:2827:20 19:2 1:0LWDescription
CPY(A,1) aaaa aaaa_aaaaaaaa_aaaa_aaaa_aaaa_aa01 1 Copy single literal word to full address A
Parameters
[in]addressAddress to copy the following literal to. The address must be word-aligned.
See also
CopyList_apply()

§ CopyList_COPY_MULTI

#define CopyList_COPY_MULTI (   address,
 
)    (((uint32_t)address & 0xF00FFFFCU) | (((uint32_t)n << 20U) & 0xFF00000U))

Copy list macro for copying multiple literals to a specified address.

This macro copies n 32-bit literal to a specified address. This command expects the next n words in the copy list to be the literal it is supposed to copy.

Command 31:2827:20 19:2 1:0LWDescription
CPY(A*,N) aaaa nnnn_nnnnaaaa_aaaa_aaaa_aaaa_aa00 N Copy N literal words to address A*

The devices' address space is arranged such that bits 20:27 are not actually needed to specify any valid address.

Parameters
[in]addressAddress to copy the following literals to. The address must be word-aligned.
[in]nNumber of words to copy. Must be in range [1, 255]
See also
CopyList_apply()

§ CopyList_JUMP

#define CopyList_JUMP (   address)    ((uint32_t)address | 0x2U)

Copy list macro for continuing copy list processing at a new address.

This macro continues processing the copy list at address.

Command 31:2827:20 19:2 1:0LWDescription
JMP(A) aaaa aaaa_aaaaaaaa_aaaa_aaaa_aaaa_aa10 0 Jump to new list at full address A
Parameters
[in]addressAddress to continue processing the copy list at. The address must be word-aligned.
See also
CopyList_apply()

§ CopyList_CALL

#define CopyList_CALL (   address)    ((uint32_t)address | 0x3U)

Copy list macro to recurse to a new list.

Recurse into new list at address by invoking CopyList_apply(). Once this list ends it will return back here and continue parsing this list.

Command 31:2827:20 19:2 1:0LWDescription
CALL(A) aaaa aaaa_aaaaaaaa_aaaa_aaaa_aaaa_aa11 0 Recurse to list at full address A
Parameters
[in]addressAddress to continue processing the copy list at. The address must be word-aligned.
See also
CopyList_apply()

Function Documentation

§ CopyList_apply()

__STATIC_INLINE void CopyList_apply ( const uint32_t *  list)

Process copy list Processes a copy list in a flexible CopyList format. Used by trims in FCFG, for user-defined initialization in CCFG and may be used by peripheral drivers to do HW reinitialization during wakeup from standby. The copy list is processed as a sequence of 32b command words, followed by zero or more literal words (LW):

Command 31:2827:20 19:2 1:0LWDescription
EOL 0000 0000_00000000_0000_0000_0000_0000 0 End-of-list
WAIT(N) 0001 0000_0000nnnn_nnnn_nnnn_nnnn_nn00 0 Wait N/12 us
NOP = WAIT(0)0001 0000_00000000_0000_0000_0000_0000 0 No operation
CPY(A*,N) aaaa nnnn_nnnnaaaa_aaaa_aaaa_aaaa_aa00 N Copy N literal words to address A*
CPY(A,1) aaaa aaaa_aaaaaaaa_aaaa_aaaa_aaaa_aa01 1 Copy single literal word to full address A
JMP(A) aaaa aaaa_aaaaaaaa_aaaa_aaaa_aaaa_aa10 0 Jump to new list at full address A
CALL(A) aaaa aaaa_aaaaaaaa_aaaa_aaaa_aaaa_aa11 0 Recurse to list at full address A

A* is a reduced address space that covers all SRAM and peripheral space. Bits 27:20 of this address will be assumed to be all zero. Full addresses must have 32b alignment

Parameters
[in]listPointer to the copy list

References HapiApplyCopyList.