Driver API for MATRIX (plib_matrix.h) More...
Macros | |
| #define | MATRIX_TC0_CLK_SRC_PCK6 (0U) |
| TC0 clock source: PCK6. | |
| #define | MATRIX_TC0_CLK_SRC_PCK7 (1U) |
| TC0 clock source: PCK7. | |
| #define | MATRIX_I2SC_CLK_SRC_PERIPHERAL (0U) |
| I2SC clock source: Peripheral Clock. | |
| #define | MATRIX_I2SC_CLK_SRC_GCLK (1U) |
| I2SC clock source: Generic Clock (GCLK) | |
| #define | MATRIX_NAND_FLASH_CS_COUNT (4U) |
| Number of SMC NAND Flash chip select lines (CCFG_SMCNFCS.SMC_NFCS0-3). | |
| #define | MATRIX_HOSTS_PER_PR_REG (8U) |
| Number of host priority fields packed into one priority register. | |
| #define | MATRIX_PR_FIELD_WIDTH (4U) |
| Width in bits of one host priority field in MATRIX_PRAS/MATRIX_PRBS. | |
Typedefs | |
| typedef uint32_t | MATRIX_ULBT |
| Type definition representing a MATRIX Undefined Length Burst Type (ULBT). | |
| typedef uint32_t | MATRIX_DEFMSTR_TYPE |
| Type definition representing a MATRIX Default Master Type. | |
| typedef uint32_t | MATRIX_PRIORITY |
| Type definition representing a MATRIX Host priority level (0-3, higher is greater priority). | |
| typedef uint32_t | SYSIO_PIN |
| Type definition representing a CCFG_SYSIO pin mask. | |
Enumerations | |
| enum | MATRIX_HOST { MATRIX_HOST_CORTEX_M7_0 = 0 , MATRIX_HOST_CORTEX_M7_1 = 1 , MATRIX_HOST_CORTEX_M7_PERIPH = 2 , MATRIX_HOST_ICM = 3 , MATRIX_HOST_XDMAC_0 = 4 , MATRIX_HOST_XDMAC_1 = 5 , MATRIX_HOST_ISI_DMA = 6 , MATRIX_HOST_MEDIA_LB = 7 , MATRIX_HOST_USB_DMA = 8 , MATRIX_HOST_GMAC_DMA = 9 , MATRIX_HOST_CAN0_DMA = 10 , MATRIX_HOST_CAN1_DMA = 11 , MATRIX_HOST_CORTEX_M7_2 = 12 } |
| Enumeration for MATRIX Host/Master index. More... | |
| enum | MATRIX_CLIENT { MATRIX_CLIENT_SRAM_0 = 0 , MATRIX_CLIENT_SRAM_1 = 1 , MATRIX_CLIENT_ROM = 2 , MATRIX_CLIENT_FLASH = 3 , MATRIX_CLIENT_USB_HS_DPR = 4 , MATRIX_CLIENT_EBI = 5 , MATRIX_CLIENT_QSPI = 6 , MATRIX_CLIENT_PERIPH_BRIDGE = 7 , MATRIX_CLIENT_AHB = 8 } |
| Enumeration for MATRIX Client/Slave index. More... | |
Functions | |
| void | MATRIX_DisableWriteProtection (void) |
| Disables write protection for MATRIX configuration registers. | |
| void | MATRIX_EnableWriteProtection (void) |
| Enables write protection for MATRIX configuration registers. | |
| void | MATRIX_SetHostULBT (MATRIX_HOST host, MATRIX_ULBT ulbt) |
| Sets the Undefined Length Burst Type for the specified host. | |
| uint32_t | MATRIX_GetHostULBT (MATRIX_HOST host) |
| Retrieves the Undefined Length Burst Type for the specified host. | |
| void | MATRIX_SetClientDefaultHostType (MATRIX_CLIENT client, MATRIX_DEFMSTR_TYPE defmstr_type) |
| Sets the default master type strategy for the specified client. | |
| void | MATRIX_SetClientFixedDefaultHost (MATRIX_CLIENT client, MATRIX_HOST fixed_defmstr) |
| Sets the fixed default master for the specified client. | |
| uint32_t | MATRIX_GetClientDefaultHostType (MATRIX_CLIENT client) |
| Retrieves the default master type for the specified client. | |
| uint32_t | MATRIX_GetClientFixedDefaultHost (MATRIX_CLIENT client) |
| Retrieves the fixed default master index for the specified client. | |
| void | MATRIX_SetClientSlotCycle (MATRIX_CLIENT client, uint32_t slot_cycle) |
| Sets the slot cycle limit for the specified client. | |
| uint32_t | MATRIX_GetClientSlotCycle (MATRIX_CLIENT client) |
| Retrieves the slot cycle limit for the specified client. | |
| void | MATRIX_SetHostPriorityForClient (MATRIX_CLIENT client, MATRIX_HOST host, MATRIX_PRIORITY priority) |
| Sets the host priority for accessing a specific client. | |
| uint32_t | MATRIX_GetHostPriorityForClient (MATRIX_CLIENT client, MATRIX_HOST host) |
| Retrieves the host priority for accessing a specific client. | |
| void | MATRIX_EnableRemap (MATRIX_HOST host) |
| Enables address remapping for the specified host. | |
| void | MATRIX_DisableRemap (MATRIX_HOST host) |
| Disables address remapping for the specified host. | |
| void | MATRIX_SetSYSIOAsGPIO (SYSIO_PIN pins) |
| Configures specified System I/O pins as general purpose I/O (GPIO). | |
| void | MATRIX_SetTC0ClockSource (uint32_t clk_src) |
| Configures Timer/Counter 0 (TC0) clock source. | |
| void | MATRIX_SetI2SC0ClockSource (uint32_t clk_src) |
| Configures I2S Controller 0 (I2SC0) clock source. | |
| void | MATRIX_SetI2SC1ClockSource (uint32_t clk_src) |
| Configures I2S Controller 1 (I2SC1) clock source. | |
| void | MATRIX_EnableDynamicClockGating (void) |
| Enables dynamic clock gating for MATRIX circuitry. | |
| void | MATRIX_DisableDynamicClockGating (void) |
| Disables dynamic clock gating for MATRIX circuitry. | |
| void | MATRIX_EnableBridgeDynamicClockGating (void) |
| Enables dynamic clock gating for peripheral bridge circuitry. | |
| void | MATRIX_DisableBridgeDynamicClockGating (void) |
| Disables dynamic clock gating for peripheral bridge circuitry. | |
| void | MATRIX_EnableEFCDynamicClockGating (void) |
| Enables dynamic clock gating for Embedded Flash Controller (EFC). | |
| void | MATRIX_DisableEFCDynamicClockGating (void) |
| Disables dynamic clock gating for Embedded Flash Controller (EFC). | |
| void | MATRIX_EnableNandFlashChipSelect (uint32_t ncs_index) |
| Assigns a chip select line to NAND Flash operation. | |
| void | MATRIX_DisableNandFlashChipSelect (uint32_t ncs_index) |
| Unassigns a chip select line from NAND Flash operation. | |
| bool | MATRIX_NandFlashChipSelectIsAssigned (uint32_t ncs_index) |
| Checks if a chip select line is assigned to NAND Flash operation. | |
| bool | MATRIX_WriteProtectionViolationHasOccurred (void) |
| Retrieves write protection violation status. | |
| uint16_t | MATRIX_GetWriteProtectionViolSrc (void) |
| Retrieves the register address where a write protection violation occurred. | |
Driver API for MATRIX (plib_matrix.h)
The following example demonstrates typical usage of the MATRIX peripheral:
| #define MATRIX_HOSTS_PER_PR_REG (8U) |
Number of host priority fields packed into one priority register.
Hosts 0 to 7 map to MATRIX_PRAS, hosts 8 and above map to MATRIX_PRBS.
| #define MATRIX_I2SC_CLK_SRC_GCLK (1U) |
I2SC clock source: Generic Clock (GCLK)
| #define MATRIX_I2SC_CLK_SRC_PERIPHERAL (0U) |
I2SC clock source: Peripheral Clock.
| #define MATRIX_NAND_FLASH_CS_COUNT (4U) |
Number of SMC NAND Flash chip select lines (CCFG_SMCNFCS.SMC_NFCS0-3).
Valid chip select indices are 0 to (MATRIX_NAND_FLASH_CS_COUNT - 1).
| #define MATRIX_PR_FIELD_WIDTH (4U) |
Width in bits of one host priority field in MATRIX_PRAS/MATRIX_PRBS.
| #define MATRIX_TC0_CLK_SRC_PCK6 (0U) |
TC0 clock source: PCK6.
| #define MATRIX_TC0_CLK_SRC_PCK7 (1U) |
TC0 clock source: PCK7.
| typedef uint32_t MATRIX_DEFMSTR_TYPE |
Type definition representing a MATRIX Default Master Type.
| typedef uint32_t MATRIX_PRIORITY |
Type definition representing a MATRIX Host priority level (0-3, higher is greater priority).
| typedef uint32_t MATRIX_ULBT |
Type definition representing a MATRIX Undefined Length Burst Type (ULBT).
| typedef uint32_t SYSIO_PIN |
Type definition representing a CCFG_SYSIO pin mask.
| enum MATRIX_CLIENT |
Enumeration for MATRIX Client/Slave index.
| enum MATRIX_HOST |
Enumeration for MATRIX Host/Master index.
| void MATRIX_DisableBridgeDynamicClockGating | ( | void | ) |
Disables dynamic clock gating for peripheral bridge circuitry.
| void MATRIX_DisableDynamicClockGating | ( | void | ) |
Disables dynamic clock gating for MATRIX circuitry.
| void MATRIX_DisableEFCDynamicClockGating | ( | void | ) |
Disables dynamic clock gating for Embedded Flash Controller (EFC).
| void MATRIX_DisableNandFlashChipSelect | ( | uint32_t | ncs_index | ) |
Unassigns a chip select line from NAND Flash operation.
| ncs_index | Chip select index (0 to MATRIX_NAND_FLASH_CS_COUNT - 1). Out-of-range values are ignored. |
| void MATRIX_DisableRemap | ( | MATRIX_HOST | host | ) |
Disables address remapping for the specified host.
| host | MATRIX host index (MATRIX_HOST_*). |
| void MATRIX_DisableWriteProtection | ( | void | ) |
Disables write protection for MATRIX configuration registers.
| void MATRIX_EnableBridgeDynamicClockGating | ( | void | ) |
Enables dynamic clock gating for peripheral bridge circuitry.
| void MATRIX_EnableDynamicClockGating | ( | void | ) |
Enables dynamic clock gating for MATRIX circuitry.
| void MATRIX_EnableEFCDynamicClockGating | ( | void | ) |
Enables dynamic clock gating for Embedded Flash Controller (EFC).
| void MATRIX_EnableNandFlashChipSelect | ( | uint32_t | ncs_index | ) |
Assigns a chip select line to NAND Flash operation.
| ncs_index | Chip select index (0 to MATRIX_NAND_FLASH_CS_COUNT - 1). Out-of-range values are ignored. |
| void MATRIX_EnableRemap | ( | MATRIX_HOST | host | ) |
Enables address remapping for the specified host.
| host | MATRIX host index (MATRIX_HOST_*). |
| void MATRIX_EnableWriteProtection | ( | void | ) |
Enables write protection for MATRIX configuration registers.
| uint32_t MATRIX_GetClientDefaultHostType | ( | MATRIX_CLIENT | client | ) |
Retrieves the default master type for the specified client.
| client | MATRIX client index (MATRIX_CLIENT_*). |
| uint32_t MATRIX_GetClientFixedDefaultHost | ( | MATRIX_CLIENT | client | ) |
Retrieves the fixed default master index for the specified client.
| client | MATRIX client index (MATRIX_CLIENT_*). |
| uint32_t MATRIX_GetClientSlotCycle | ( | MATRIX_CLIENT | client | ) |
Retrieves the slot cycle limit for the specified client.
| client | MATRIX client index (MATRIX_CLIENT_*). |
| uint32_t MATRIX_GetHostPriorityForClient | ( | MATRIX_CLIENT | client, |
| MATRIX_HOST | host ) |
Retrieves the host priority for accessing a specific client.
| client | MATRIX client index (MATRIX_CLIENT_*). |
| host | MATRIX host index (MATRIX_HOST_*). |
| uint32_t MATRIX_GetHostULBT | ( | MATRIX_HOST | host | ) |
Retrieves the Undefined Length Burst Type for the specified host.
| host | MATRIX host index (MATRIX_HOST_*). |
| uint16_t MATRIX_GetWriteProtectionViolSrc | ( | void | ) |
Retrieves the register address where a write protection violation occurred.
| bool MATRIX_NandFlashChipSelectIsAssigned | ( | uint32_t | ncs_index | ) |
Checks if a chip select line is assigned to NAND Flash operation.
| ncs_index | Chip select index (0 to MATRIX_NAND_FLASH_CS_COUNT - 1). |
| void MATRIX_SetClientDefaultHostType | ( | MATRIX_CLIENT | client, |
| MATRIX_DEFMSTR_TYPE | defmstr_type ) |
Sets the default master type strategy for the specified client.
| client | MATRIX client index (MATRIX_CLIENT_*). |
| defmstr_type | Default master type (MATRIX_SCFG_DEFMSTR_TYPE_NONE/LAST/FIXED). |
| void MATRIX_SetClientFixedDefaultHost | ( | MATRIX_CLIENT | client, |
| MATRIX_HOST | fixed_defmstr ) |
Sets the fixed default master for the specified client.
| client | MATRIX client index (MATRIX_CLIENT_*). |
| fixed_defmstr | Fixed master index (MATRIX_HOST_*). |
| void MATRIX_SetClientSlotCycle | ( | MATRIX_CLIENT | client, |
| uint32_t | slot_cycle ) |
Sets the slot cycle limit for the specified client.
| client | MATRIX client index (MATRIX_CLIENT_*). |
| slot_cycle | Slot cycle limit value (0 to disable, max 511). |
| void MATRIX_SetHostPriorityForClient | ( | MATRIX_CLIENT | client, |
| MATRIX_HOST | host, | ||
| MATRIX_PRIORITY | priority ) |
Sets the host priority for accessing a specific client.
| client | MATRIX client index (MATRIX_CLIENT_*). |
| host | MATRIX host index (MATRIX_HOST_*). |
| priority | Priority level (0-3, higher value = higher priority). |
| void MATRIX_SetHostULBT | ( | MATRIX_HOST | host, |
| MATRIX_ULBT | ulbt ) |
Sets the Undefined Length Burst Type for the specified host.
| host | MATRIX host index (MATRIX_HOST_*). |
| ulbt | ULBT value (use MATRIX_MCFG_ULBT_* macros). |
| void MATRIX_SetI2SC0ClockSource | ( | uint32_t | clk_src | ) |
Configures I2S Controller 0 (I2SC0) clock source.
| clk_src | Clock source selection:
|
| void MATRIX_SetI2SC1ClockSource | ( | uint32_t | clk_src | ) |
Configures I2S Controller 1 (I2SC1) clock source.
| clk_src | Clock source selection:
|
| void MATRIX_SetSYSIOAsGPIO | ( | SYSIO_PIN | pins | ) |
Configures specified System I/O pins as general purpose I/O (GPIO).
| pins | Bitmask of pins to release from System I/O to GPIO (CCFG_SYSIO_SYSIO*_Msk). |
| void MATRIX_SetTC0ClockSource | ( | uint32_t | clk_src | ) |
Configures Timer/Counter 0 (TC0) clock source.
| clk_src | Clock source selection:
|
| bool MATRIX_WriteProtectionViolationHasOccurred | ( | void | ) |
Retrieves write protection violation status.