![]() |
MINI58_BSP V3.01.005
The Board Support Package for Mini58 Series MCU
|
Mini58 series SYS driver header file. More...
Go to the source code of this file.
Macros | |
#define | ADC_RST ((0x4<<24) | SYS_IPRST1_ADCRST_Pos ) |
#define | ACMP_RST ((0x4<<24) | SYS_IPRST1_ACMPRST_Pos ) |
#define | PWM0_RST ((0x4<<24) | SYS_IPRST1_PWM0RST_Pos ) |
#define | UART0_RST ((0x4<<24) | SYS_IPRST1_UART0RST_Pos ) |
#define | UART1_RST ((0x4<<24) | SYS_IPRST1_UART1RST_Pos ) |
#define | SPI0_RST ((0x4<<24) | SYS_IPRST1_SPI0RST_Pos ) |
#define | I2C0_RST ((0x4<<24) | SYS_IPRST1_I2C0RST_Pos ) |
#define | I2C1_RST ((0x4<<24) | SYS_IPRST1_I2C1RST_Pos ) |
#define | TMR1_RST ((0x4<<24) | SYS_IPRST1_TMR1RST_Pos ) |
#define | TMR0_RST ((0x4<<24) | SYS_IPRST1_TMR0RST_Pos ) |
#define | GPIO_RST ((0x4<<24) | SYS_IPRST1_GPIORST_Pos ) |
#define | SYS_BODCTL_BOD_RST_EN (1UL<<SYS_BODCTL_BODRSTEN_Pos) |
#define | SYS_BODCTL_BOD_INTERRUPT_EN (0UL<<SYS_BODCTL_BODRSTEN_Pos) |
#define | SYS_BODCTL_BODVL_4_4V (3UL<<SYS_BODCTL_BODVL_Pos) |
#define | SYS_BODCTL_BODVL_3_7V (2UL<<SYS_BODCTL_BODVL_Pos) |
#define | SYS_BODCTL_BODVL_2_7V (1UL<<SYS_BODCTL_BODVL_Pos) |
#define | SYS_BODCTL_BODVL_2_2V (0UL<<SYS_BODCTL_BODVL_Pos) |
#define | SYS_MFP_TYPE_Msk(bit) (1UL << ((bit) +16)) |
#define | SYS_MFP_ALT_Msk(bit) (1UL << ((bit) + 8)) |
#define | SYS_MFP_MFP_Msk(bit) (1UL << ((bit) )) |
#define | SYS_MFP_P00_GPIO 0x00000000UL |
#define | SYS_MFP_P00_UART0_nCTS 0x00000100UL |
#define | SYS_MFP_P00_UART0_TXD 0x00000101UL |
#define | SYS_MFP_P00_Msk 0x00000101UL |
#define | SYS_MFP_P01_GPIO 0x00000000UL |
#define | SYS_MFP_P01_SPI0_SS 0x00000002UL |
#define | SYS_MFP_P01_UART0_nRTS 0x00000200UL |
#define | SYS_MFP_P01_UART0_RXD 0x00000202UL |
#define | SYS_MFP_P01_Msk 0x00000202UL |
#define | SYS_MFP_P04_GPIO 0x00000000UL |
#define | SYS_MFP_P04_PWM0_CH5 0x00001010UL |
#define | SYS_MFP_P04_SPI0_SS 0x00001000UL |
#define | SYS_MFP_P04_Msk 0x00001010UL |
#define | SYS_MFP_P05_GPIO 0x00000000UL |
#define | SYS_MFP_P05_PWM0_CH4 0x00002020UL |
#define | SYS_MFP_P05_SPI0_MOSI 0x00002000UL |
#define | SYS_MFP_P05_Msk 0x00002020UL |
#define | SYS_MFP_P06_GPIO 0x00000000UL |
#define | SYS_MFP_P06_PWM0_CH1 0x00004040UL |
#define | SYS_MFP_P06_SPI0_MISO 0x00004000UL |
#define | SYS_MFP_P06_Msk 0x00004040UL |
#define | SYS_MFP_P07_GPIO 0x00000000UL |
#define | SYS_MFP_P07_PWM0_CH0 0x00008080UL |
#define | SYS_MFP_P07_SPI0_CLK 0x00008000UL |
#define | SYS_MFP_P07_Msk 0x00008080UL |
#define | SYS_MFP_P10_ACMP0_P1 0x00000101UL |
#define | SYS_MFP_P10_ADC_CH1 0x00000001UL |
#define | SYS_MFP_P10_GPIO 0x00000000UL |
#define | SYS_MFP_P10_Msk 0x00000101UL |
#define | SYS_MFP_P12_ACMP0_P2 0x00000404UL |
#define | SYS_MFP_P12_ADC_CH2 0x00000004UL |
#define | SYS_MFP_P12_GPIO 0x00000000UL |
#define | SYS_MFP_P12_UART0_RXD 0x00000400UL |
#define | SYS_MFP_P12_PWM0_CH0 0x04000000UL |
#define | SYS_MFP_P12_Msk 0x04000404UL |
#define | SYS_MFP_P13_ACMP0_P3 0x00000808UL |
#define | SYS_MFP_P13_ADC_CH3 0x00000008UL |
#define | SYS_MFP_P13_GPIO 0x00000000UL |
#define | SYS_MFP_P13_UART0_TXD 0x00000800UL |
#define | SYS_MFP_P13_PWM0_CH1 0x08000000UL |
#define | SYS_MFP_P13_Msk 0x08000808UL |
#define | SYS_MFP_P14_ACMP0_N 0x00001010UL |
#define | SYS_MFP_P14_ADC_CH4 0x00000010UL |
#define | SYS_MFP_P14_GPIO 0x00000000UL |
#define | SYS_MFP_P14_UART1_RXD 0x00001000UL |
#define | SYS_MFP_P14_PWM0_CH4 0x10000000UL |
#define | SYS_MFP_P14_Msk 0x10001010UL |
#define | SYS_MFP_P15_ACMP0_P0 0x00002020UL |
#define | SYS_MFP_P15_ADC_CH5 0x00000020UL |
#define | SYS_MFP_P15_GPIO 0x00000000UL |
#define | SYS_MFP_P15_UART1_TXD 0x00002000UL |
#define | SYS_MFP_P15_Msk 0x00002020UL |
#define | SYS_MFP_P22_GPIO 0x00000000UL |
#define | SYS_MFP_P22_I2C1_SCL 0x00000404UL |
#define | SYS_MFP_P22_PWM0_CH0 0x00000400UL |
#define | SYS_MFP_P22_Msk 0x00000404UL |
#define | SYS_MFP_P23_GPIO 0x00000000UL |
#define | SYS_MFP_P23_I2C1_SDA 0x00000808UL |
#define | SYS_MFP_P23_PWM0_CH1 0x00000800UL |
#define | SYS_MFP_P23_Msk 0x00000808UL |
#define | SYS_MFP_P24_GPIO 0x00000000UL |
#define | SYS_MFP_P24_PWM0_CH2 0x00001000UL |
#define | SYS_MFP_P24_UART1_RXD 0x00000010UL |
#define | SYS_MFP_P24_Msk 0x00001010UL |
#define | SYS_MFP_P25_GPIO 0x00000000UL |
#define | SYS_MFP_P25_PWM0_CH3 0x00002000UL |
#define | SYS_MFP_P25_UART1_TXD 0x00000020UL |
#define | SYS_MFP_P25_Msk 0x00002020UL |
#define | SYS_MFP_P26_ACMP1_O 0x00004040UL |
#define | SYS_MFP_P26_GPIO 0x00000000UL |
#define | SYS_MFP_P26_PWM0_CH4 0x00004000UL |
#define | SYS_MFP_P26_Msk 0x00004040UL |
#define | SYS_MFP_P30_ACMP1_N 0x00000100UL |
#define | SYS_MFP_P30_ADC_CH6 0x00000101UL |
#define | SYS_MFP_P30_GPIO 0x00000000UL |
#define | SYS_MFP_P30_Msk 0x00000101UL |
#define | SYS_MFP_P31_ACMP1_P0 0x00000200UL |
#define | SYS_MFP_P31_ADC_CH7 0x00000202UL |
#define | SYS_MFP_P31_GPIO 0x00000000UL |
#define | SYS_MFP_P31_Msk 0x00000202UL |
#define | SYS_MFP_P32_GPIO 0x00000000UL |
#define | SYS_MFP_P32_INT0 0x00000004UL |
#define | SYS_MFP_P32_STADC 0x00000404UL |
#define | SYS_MFP_P32_TM0_EXT 0x00000400UL |
#define | SYS_MFP_P32_ACMP1_P1 0x04000000UL |
#define | SYS_MFP_P32_Msk 0x04000404UL |
#define | SYS_MFP_P34_ACMP1_P2 0x00001010UL |
#define | SYS_MFP_P34_GPIO 0x00000000UL |
#define | SYS_MFP_P34_I2C0_SDA 0x00001000UL |
#define | SYS_MFP_P34_TM0_CNT_OUT 0x00000010UL |
#define | SYS_MFP_P34_Msk 0x00001010UL |
#define | SYS_MFP_P35_ACMP1_P3 0x00002020UL |
#define | SYS_MFP_P35_GPIO 0x00000000UL |
#define | SYS_MFP_P35_I2C0_SCL 0x00002000UL |
#define | SYS_MFP_P35_TM1_CNT_OUT 0x00000020UL |
#define | SYS_MFP_P35_Msk 0x00002020UL |
#define | SYS_MFP_P36_ACMP0_O 0x00004040UL |
#define | SYS_MFP_P36_CLKO 0x00004000UL |
#define | SYS_MFP_P36_GPIO 0x00000000UL |
#define | SYS_MFP_P36_TM1_EXT 0x00000040UL |
#define | SYS_MFP_P36_Msk 0x00004040UL |
#define | SYS_MFP_P46_GPIO 0x00000000UL |
#define | SYS_MFP_P46_ICE_CLK 0x00000040UL |
#define | SYS_MFP_P46_UART1_RXD 0x00004000UL |
#define | SYS_MFP_P46_Msk 0x00004040UL |
#define | SYS_MFP_P47_GPIO 0x00000000UL |
#define | SYS_MFP_P47_ICE_DAT 0x00000080UL |
#define | SYS_MFP_P47_UART1_TXD 0x00008000UL |
#define | SYS_MFP_P47_Msk 0x00008080UL |
#define | SYS_MFP_P50_GPIO 0x00000000UL |
#define | SYS_MFP_P50_I2C1_SDA 0x00000100UL |
#define | SYS_MFP_P50_UART0_TXD 0x00000101UL |
#define | SYS_MFP_P50_XT1_IN 0x00000001UL |
#define | SYS_MFP_P50_Msk 0x00000101UL |
#define | SYS_MFP_P51_GPIO 0x00000000UL |
#define | SYS_MFP_P51_I2C1_SCL 0x00000200UL |
#define | SYS_MFP_P51_UART0_RXD 0x00000202UL |
#define | SYS_MFP_P51_XT1_OUT 0x00000002UL |
#define | SYS_MFP_P51_Msk 0x00000202UL |
#define | SYS_MFP_P52_GPIO 0x00000000UL |
#define | SYS_MFP_P52_INT1 0x00000004UL |
#define | SYS_MFP_P52_Msk 0x00000404UL |
#define | SYS_MFP_P53_ADC_CH0 0x00000008UL |
#define | SYS_MFP_P53_GPIO 0x00000000UL |
#define | SYS_MFP_P53_Msk 0x00000808UL |
#define | SYS_MFP_P54_GPIO 0x00000000UL |
#define | SYS_MFP_P54_Msk 0x00001010UL |
#define | SYS_MFP_P55_GPIO 0x00000000UL |
#define | SYS_MFP_P55_Msk 0x00002020UL |
#define | SYS_CLEAR_BOD_INT_FLAG() (SYS->BODCTL |= SYS_BODCTL_BODIF_Msk) |
Clear Brown-out detector interrupt flag. More... | |
#define | SYS_CLEAR_BOD_LPM() (SYS->BODCTL &= ~SYS_BODCTL_BODLPM_Msk) |
Set Brown-out detector function to normal mode. More... | |
#define | SYS_DISABLE_BOD() (SYS->BODCTL = (SYS->BODCTL &~(SYS_BODCTL_BODVL_Msk|SYS_BODCTL_BODEN_Msk))|SYS_BODCTL_BODVL_Msk) |
Disable Brown-out detector function. More... | |
#define | SYS_ENABLE_BOD() (SYS->BODCTL = (SYS->BODCTL | SYS_BODCTL_BODEN_Msk)) |
Enable Brown-out detector function. More... | |
#define | SYS_GET_BOD_INT_FLAG() (SYS->BODCTL & SYS_BODCTL_BODIF_Msk) |
Get Brown-out detector interrupt flag. More... | |
#define | SYS_GET_BOD_OUTPUT() (SYS->BODCTL & SYS_BODCTL_BODOUT_Msk) |
Get Brown-out detector status. More... | |
#define | SYS_DISABLE_BOD_RST() (SYS->BODCTL &= ~SYS_BODCTL_BODRSTEN_Msk) |
Enable Brown-out detector interrupt function. More... | |
#define | SYS_ENABLE_BOD_RST() (SYS->BODCTL |= SYS_BODCTL_BODRSTEN_Msk) |
Enable Brown-out detector reset function. More... | |
#define | SYS_SET_BOD_LPM() (SYS->BODCTL |= SYS_BODCTL_BODLPM_Msk) |
Set Brown-out detector function low power mode. More... | |
#define | SYS_SET_BOD_LEVEL(u32Level) (SYS->BODCTL = (SYS->BODCTL & ~SYS_BODCTL_BODVL_Msk) | (u32Level)) |
Set Brown-out detector voltage level. More... | |
#define | SYS_IS_BOD_RST() (SYS->RSTSTS & SYS_RSTSTS_BODRF_Msk) |
Get reset source is from Brown-out detector reset. More... | |
#define | SYS_IS_CPU_RST() (SYS->RSTSTS & SYS_RSTSTS_CPURF_Msk) |
Get reset source is from CPU reset. More... | |
#define | SYS_IS_POR_RST() (SYS->RSTSTS & SYS_RSTSTS_PORF_Msk) |
Get reset source is from Power-on Reset. More... | |
#define | SYS_IS_RSTPIN_RST() (SYS->RSTSTS & SYS_RSTSTS_PINRF_Msk) |
Get reset source is from reset pin reset. More... | |
#define | SYS_IS_SYSTEM_RST() (SYS->RSTSTS & SYS_RSTSTS_SYSRF_Msk) |
Get reset source is from system reset. More... | |
#define | SYS_IS_WDT_RST() (SYS->RSTSTS & SYS_RSTSTS_WDTRF_Msk) |
Get reset source is from window watch dog reset. More... | |
#define | SYS_DISABLE_POR() (SYS->PORCTL = 0x5AA5) |
Disable Power-on Reset function. More... | |
#define | SYS_ENABLE_POR() (SYS->PORCTL = 0) |
Enable Power-on Reset function. More... | |
#define | SYS_CLEAR_RST_SOURCE(u32RstSrc) ((SYS->RSTSTS) = (u32RstSrc) ) |
Clear reset source flag. More... | |
Functions | |
__STATIC_INLINE void | SYS_UnlockReg (void) |
Disable register write-protection function. More... | |
__STATIC_INLINE void | SYS_LockReg (void) |
Enable register write-protection function. More... | |
void | SYS_ClearResetSrc (uint32_t u32Src) |
This function clear the selected system reset source. More... | |
uint32_t | SYS_GetBODStatus (void) |
This function get Brown-out detector output status. More... | |
uint32_t | SYS_GetResetSrc (void) |
This function get the system reset source register value. More... | |
uint32_t | SYS_IsRegLocked (void) |
This function check register write-protection bit setting. More... | |
uint32_t | SYS_ReadPDID (void) |
This function get product ID. More... | |
void | SYS_ResetChip (void) |
This function reset chip. More... | |
void | SYS_ResetCPU (void) |
This function reset CPU. More... | |
void | SYS_ResetModule (uint32_t u32ModuleIndex) |
This function reset selected modules. More... | |
void | SYS_EnableBOD (int32_t i32Mode, uint32_t u32BODLevel) |
This function configure BOD function. Configure BOD reset or interrupt mode and set Brown-out voltage level. Enable Brown-out function. More... | |
void | SYS_DisableBOD (void) |
This function disable BOD function. More... | |
Mini58 series SYS driver header file.
Definition in file sys.h.