#include <stdint.h>
#include "../inc/hw_types.h"
#include "hapi.h"
Go to the source code of this file.
|
| #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...
|
| |
|
| __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...
|
| |
§ CopyList_EOL
Copy list macro to end a copy list.
Processing of the copy list with CopyList_apply() will stop upon encountering this entry.
| Command | 31:28 | 27:20 | 19:2 | 1:0 | LW | Description |
| EOL | 0000 | 0000_0000 | 0000_0000_0000_0000_00 | 00 | 0 | End-of-list |
- See also
- CopyList_apply()
§ CopyList_NOP
Copy list macro to do nothing.
| Command | 31:28 | 27:20 | 19:2 | 1:0 | LW | Description |
| NOP = WAIT(0) | 0001 | 0000_0000 | 0000_0000_0000_0000_00 | 00 | 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:28 | 27:20 | 19:2 | 1:0 | LW | Description |
| WAIT(N) | 0001 | 0000_0000 | nnnn_nnnn_nnnn_nnnn_nn | 00 | 0 | Wait N/12 us |
- Parameters
-
| [in] | n | Number 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:28 | 27:20 | 19:2 | 1:0 | LW | Description |
| CPY(A,1) | aaaa | aaaa_aaaa | aaaa_aaaa_aaaa_aaaa_aa | 01 | 1 | Copy single literal word to full address A |
- Parameters
-
| [in] | address | Address to copy the following literal to. The address must be word-aligned. |
- See also
- CopyList_apply()
§ CopyList_COPY_MULTI
| #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.
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:28 | 27:20 | 19:2 | 1:0 | LW | Description |
| CPY(A*,N) | aaaa | nnnn_nnnn | aaaa_aaaa_aaaa_aaaa_aa | 00 | 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] | address | Address to copy the following literals to. The address must be word-aligned. |
| [in] | n | Number 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:28 | 27:20 | 19:2 | 1:0 | LW | Description |
| JMP(A) | aaaa | aaaa_aaaa | aaaa_aaaa_aaaa_aaaa_aa | 10 | 0 | Jump to new list at full address A |
- Parameters
-
| [in] | address | Address 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:28 | 27:20 | 19:2 | 1:0 | LW | Description |
| CALL(A) | aaaa | aaaa_aaaa | aaaa_aaaa_aaaa_aaaa_aa | 11 | 0 | Recurse to list at full address A |
- Parameters
-
| [in] | address | Address to continue processing the copy list at. The address must be word-aligned. |
- See also
- CopyList_apply()
§ CopyList_apply()
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:28 | 27:20 | 19:2 | 1:0 | LW | Description |
| EOL | 0000 | 0000_0000 | 0000_0000_0000_0000_00 | 00 | 0 | End-of-list |
| WAIT(N) | 0001 | 0000_0000 | nnnn_nnnn_nnnn_nnnn_nn | 00 | 0 | Wait N/12 us |
| NOP = WAIT(0) | 0001 | 0000_0000 | 0000_0000_0000_0000_00 | 00 | 0 | No operation |
| CPY(A*,N) | aaaa | nnnn_nnnn | aaaa_aaaa_aaaa_aaaa_aa | 00 | N | Copy N literal words to address A* |
| CPY(A,1) | aaaa | aaaa_aaaa | aaaa_aaaa_aaaa_aaaa_aa | 01 | 1 | Copy single literal word to full address A |
| JMP(A) | aaaa | aaaa_aaaa | aaaa_aaaa_aaaa_aaaa_aa | 10 | 0 | Jump to new list at full address A |
| CALL(A) | aaaa | aaaa_aaaa | aaaa_aaaa_aaaa_aaaa_aa | 11 | 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] | list | Pointer to the copy list |
References HapiApplyCopyList.