![]() |
NHS31xx SW API
|
The System Configuration driver (SYSCON) provides the API to control most of the functionalities handled by the SYSCON HW block. There is an exception for the handling of clocks, which is covered in a separate Clock driver.
The SYSCON driver allows:
Data Structures | |
struct | NSS_SYSCON_T |
struct NSS_SYSCON_T |
System Configuration register block structure
Data Fields | ||
---|---|---|
__IO uint32_t | SYSMEMREMAP |
System memory remap |
__IO uint32_t | PRESETCTRL |
Peripheral reset control |
__I uint32_t | RESERVED1[6] | |
__IO uint32_t | SYSCLKCTRL |
System clock control register - Used by Clock driver |
__IO uint32_t | SYSCLKUEN |
System clock update enable - Used by Clock driver |
__I uint32_t | RESERVED2[2] | |
__IO uint32_t | SYSRSTSTAT |
System reset status register |
__I uint32_t | RESERVED3[19] | |
__IO uint32_t | SYSAHBCLKCTRL |
AHB clock control - Used by Clock driver |
__I uint32_t | RESERVED4[4] | |
__IO uint32_t | SSP0CLKDIV |
SSP0 clock divider - Used by Clock driver |
__I uint32_t | RESERVED5[14] | |
__IO uint32_t | WDTCLKSEL |
Watchdog timer clock selector - Used by Clock driver |
__IO uint32_t | WDTCLKUEN |
Watchdog timer clock update enable - Used by Clock driver |
__IO uint32_t | WDTCLKDIV |
Watchdog timer clock divider - Used by Clock driver |
__I uint32_t | RESERVED6[3] | |
__IO uint32_t | CLKOUTEN |
CLKOUT enable - Used by Clock driver |
__I uint32_t | RESERVED7[26] | |
__IO uint32_t | SYSTCKCAL |
System tick counter calibration |
__I uint32_t | RESERVED8[42] | |
__IO uint32_t | STARTAPRP0 |
Start logic edge control register 0 |
__IO uint32_t | STARTERP0 |
Start logic signal enable register 0 |
__IO uint32_t | STARTRSRP0CLR |
Start logic reset register 0 |
__IO uint32_t | STARTSRP0 |
Start logic status register 0 |
__I uint32_t | RESERVED9[10] | |
__IO uint32_t | PDRUNCFG |
Power-down configuration register |
__I uint32_t | RESERVED10[110] | |
__I uint32_t | DEVICEID |
Device ID register |
Peripherals that can be reset
Peripherals that whose power state can be controlled
enum SYSCON_RESETSOURCE_T |
Possible chip reset sources
enum SYSCON_STARTSOURCE_T |
Possible system wake-up start logic sources
void Chip_SysCon_IVT_SetAddress | ( | uint32_t | address | ) |
Maps the Interrupt Vector Table (IVT) to any SRAM or Flash location. Valid addresses are on 1024 byte boundaries in Flash or SRAM.
address | : The absolute memory address (SRAM or Flash) to where to map the IVT |
uint32_t Chip_SysCon_IVT_GetAddress | ( | void | ) |
Gets the absolute address (SRAM or Flash) on where the Interrupt Vector Table (IVT) is mapped.
void Chip_SysCon_Peripheral_AssertReset | ( | SYSCON_PERIPHERAL_RESET_T | bitvector | ) |
Asserts the reset of the required peripheral(s)
bitvector | : Bitvector of the peripheral(s) whose reset to assert |
void Chip_SysCon_Peripheral_DeassertReset | ( | SYSCON_PERIPHERAL_RESET_T | bitvector | ) |
De-asserts the reset of the required peripheral(s)
bitvector | : Bitvector of the peripheral(s) whose reset to de-assert |
void Chip_SysCon_Peripheral_EnablePower | ( | SYSCON_PERIPHERAL_POWER_T | bitvector | ) |
Enables the power of the required peripheral(s)
bitvector | : Bitvector of the peripheral(s) whose power to enable |
void Chip_SysCon_Peripheral_DisablePower | ( | SYSCON_PERIPHERAL_POWER_T | bitvector | ) |
Disables the power of the required peripheral(s)
bitvector | : Bitvector of the peripheral(s) whose power to enable Only the power state(s) of the peripheral(s) set in bitvector are changed. All the others are left untouched. |
void Chip_SysCon_Peripheral_SetPowerDisabled | ( | SYSCON_PERIPHERAL_POWER_T | bitvector | ) |
Enables/Disables the power state of the peripheral(s) described in SYSCON_PERIPHERAL_POWER_T
bitvector | : Bitvector of the peripheral(s) whose power to enable/disable |
SYSCON_PERIPHERAL_POWER_T Chip_SysCon_Peripheral_GetPowerDisabled | ( | void | ) |
Retrieves a bitvector stating the enabled/disabled peripheral(s) described in SYSCON_PERIPHERAL_POWER_T
SYSCON_RESETSOURCE_T Chip_SysCon_Reset_GetSource | ( | void | ) |
Gets the source of the last reset event(s)
void Chip_SysCon_Reset_ClearSource | ( | void | ) |
Clears the reset source information
void Chip_SysCon_StartLogic_SetEnabledMask | ( | SYSCON_STARTSOURCE_T | mask | ) |
Enables/Disables the system wake-up start logic interrupts
mask | : Interrupt enabled mask to set |
SYSCON_STARTSOURCE_T Chip_SysCon_StartLogic_GetEnabledMask | ( | void | ) |
Retrieves the system wake-up start logic source interrupt enabled mask
SYSCON_STARTSOURCE_T Chip_SysCon_StartLogic_GetStatus | ( | void | ) |
Retrieves a bitVector with the system wake-up start logic interrupt flags
void Chip_SysCon_StartLogic_ClearStatus | ( | SYSCON_STARTSOURCE_T | flags | ) |
Clears the required system wake-up start logic interrupt flags
flags | : Bitvector indicating which system wake-up start logic interrupt flags to clear |
void Chip_SysCon_StartLogic_SetPIORisingEdge | ( | SYSCON_STARTSOURCE_T | bitvector | ) |
Selects a falling or rising edge as the trigger of the corresponding system wake-up PIO start source
bitvector | : Bitvector of the system wake-up PIO start sources to be triggered on a rising edge (the ones that are not set are triggered on a falling-edge) |
SYSCON_STARTSOURCE_T Chip_SysCon_StartLogic_GetPIORisingEdge | ( | void | ) |
Gets the edge (falling or rising) that is selected to be the trigger for the corresponding system wake-up PIO start source
uint32_t Chip_SysCon_GetDeviceID | ( | void | ) |
Gets the Device ID of the chip
0x4E310020
for NHS3100 devices0x4E315220
for NHS3152 devices0x4E315320
for NHS3153 devices