📄 hw_sysctl.h
字号:
#define SYSCTL_SRCR2_GPIOH 0x00000080 // Port H Reset Control
#define SYSCTL_SRCR2_GPIOG 0x00000040 // Port G Reset Control
#define SYSCTL_SRCR2_GPIOF 0x00000020 // Port F Reset Control
#define SYSCTL_SRCR2_GPIOE 0x00000010 // Port E Reset Control
#define SYSCTL_SRCR2_GPIOD 0x00000008 // Port D Reset Control
#define SYSCTL_SRCR2_GPIOC 0x00000004 // Port C Reset Control
#define SYSCTL_SRCR2_GPIOB 0x00000002 // Port B Reset Control
#define SYSCTL_SRCR2_GPIOA 0x00000001 // Port A Reset Control
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_RIS register.
//
//*****************************************************************************
#define SYSCTL_RIS_MOSCPUPRIS 0x00000100 // MOSC Power Up Raw Interrupt
// Status
#define SYSCTL_RIS_USBPLLLRIS 0x00000080 // USB PLL Lock Raw Interrupt
// Status
#define SYSCTL_RIS_PLLLRIS 0x00000040 // PLL Lock Raw Interrupt Status
#define SYSCTL_RIS_CLRIS 0x00000020 // Current Limit Raw Interrupt
// Status
#define SYSCTL_RIS_IOFRIS 0x00000010 // Internal Oscillator Fault Raw
// Interrupt Status
#define SYSCTL_RIS_MOFRIS 0x00000008 // Main Oscillator Fault Raw
// Interrupt Status
#define SYSCTL_RIS_LDORIS 0x00000004 // LDO Power Unregulated Raw
// Interrupt Status
#define SYSCTL_RIS_BORRIS 0x00000002 // Brown-Out Reset Raw Interrupt
// Status
#define SYSCTL_RIS_PLLFRIS 0x00000001 // PLL Fault Raw Interrupt Status
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_IMC register.
//
//*****************************************************************************
#define SYSCTL_IMC_MOSCPUPIM 0x00000100 // MOSC Power Up Interrupt Mask
#define SYSCTL_IMC_USBPLLLIM 0x00000080 // USB PLL Lock Interrupt Mask
#define SYSCTL_IMC_PLLLIM 0x00000040 // PLL Lock Interrupt Mask
#define SYSCTL_IMC_CLIM 0x00000020 // Current Limit Interrupt Mask
#define SYSCTL_IMC_IOFIM 0x00000010 // Internal Oscillator Fault
// Interrupt Mask
#define SYSCTL_IMC_MOFIM 0x00000008 // Main Oscillator Fault Interrupt
// Mask
#define SYSCTL_IMC_LDOIM 0x00000004 // LDO Power Unregulated Interrupt
// Mask
#define SYSCTL_IMC_BORIM 0x00000002 // Brown-Out Reset Interrupt Mask
#define SYSCTL_IMC_PLLFIM 0x00000001 // PLL Fault Interrupt Mask
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_MISC register.
//
//*****************************************************************************
#define SYSCTL_MISC_MOSCPUPMIS 0x00000100 // MOSC Power Up Masked Interrupt
// Status
#define SYSCTL_MISC_USBPLLLMIS 0x00000080 // USB PLL Lock Masked Interrupt
// Status
#define SYSCTL_MISC_PLLLMIS 0x00000040 // PLL Lock Masked Interrupt Status
#define SYSCTL_MISC_CLMIS 0x00000020 // Current Limit Masked Interrupt
// Status
#define SYSCTL_MISC_IOFMIS 0x00000010 // Internal Oscillator Fault Masked
// Interrupt Status
#define SYSCTL_MISC_MOFMIS 0x00000008 // Main Oscillator Fault Masked
// Interrupt Status
#define SYSCTL_MISC_LDOMIS 0x00000004 // LDO Power Unregulated Masked
// Interrupt Status
#define SYSCTL_MISC_BORMIS 0x00000002 // BOR Masked Interrupt Status
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_RESC register.
//
//*****************************************************************************
#define SYSCTL_RESC_MOSCFAIL 0x00010000 // MOSC Failure Reset
#define SYSCTL_RESC_LDO 0x00000020 // LDO power OK lost reset
#define SYSCTL_RESC_WDT1 0x00000020 // Watchdog Timer 1 Reset
#define SYSCTL_RESC_SW 0x00000010 // Software reset
#define SYSCTL_RESC_WDT0 0x00000008 // Watchdog Timer 0 Reset
#define SYSCTL_RESC_BOR 0x00000004 // Brown-out reset
#define SYSCTL_RESC_POR 0x00000002 // Power on reset
#define SYSCTL_RESC_EXT 0x00000001 // External reset
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_RCC register.
//
//*****************************************************************************
#define SYSCTL_RCC_ACG 0x08000000 // Automatic clock gating
#define SYSCTL_RCC_SYSDIV_M 0x07800000 // System Clock Divisor
#define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2
#define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3
#define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4
#define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5
#define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6
#define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7
#define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8
#define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9
#define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10
#define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11
#define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12
#define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13
#define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14
#define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15
#define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16
#define SYSCTL_RCC_USESYSDIV 0x00400000 // Enable System Clock Divider
#define SYSCTL_RCC_USEPWMDIV 0x00100000 // Enable PWM Clock Divisor
#define SYSCTL_RCC_PWMDIV_M 0x000E0000 // PWM clock divider
#define SYSCTL_RCC_PWMDIV_2 0x00000000 // PWM clock /2
#define SYSCTL_RCC_PWMDIV_4 0x00020000 // PWM clock /4
#define SYSCTL_RCC_PWMDIV_8 0x00040000 // PWM clock /8
#define SYSCTL_RCC_PWMDIV_16 0x00060000 // PWM clock /16
#define SYSCTL_RCC_PWMDIV_32 0x00080000 // PWM clock /32
#define SYSCTL_RCC_PWMDIV_64 0x000A0000 // PWM clock /64
#define SYSCTL_RCC_PWRDN 0x00002000 // PLL power down
#define SYSCTL_RCC_OEN 0x00001000 // PLL Output Enable
#define SYSCTL_RCC_BYPASS 0x00000800 // PLL bypass
#define SYSCTL_RCC_XTAL_M 0x000007C0 // Crystal attached to main osc
#define SYSCTL_RCC_XTAL_1MHZ 0x00000000 // Using a 1MHz crystal
#define SYSCTL_RCC_XTAL_1_84MHZ 0x00000040 // Using a 1.8432MHz crystal
#define SYSCTL_RCC_XTAL_2MHZ 0x00000080 // Using a 2MHz crystal
#define SYSCTL_RCC_XTAL_2_45MHZ 0x000000C0 // Using a 2.4576MHz crystal
#define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // Using a 3.579545MHz crystal
#define SYSCTL_RCC_XTAL_3_68MHZ 0x00000140 // Using a 3.6864MHz crystal
#define SYSCTL_RCC_XTAL_4MHZ 0x00000180 // Using a 4MHz crystal
#define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // Using a 4.096MHz crystal
#define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // Using a 4.9152MHz crystal
#define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // Using a 5MHz crystal
#define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // Using a 5.12MHz crystal
#define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // Using a 6MHz crystal
#define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // Using a 6.144MHz crystal
#define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // Using a 7.3728MHz crystal
#define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // Using a 8MHz crystal
#define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // Using a 8.192MHz crystal
#define SYSCTL_RCC_XTAL_10MHZ 0x00000400 // 10.0 MHz (USB)
#define SYSCTL_RCC_XTAL_12MHZ 0x00000440 // 12.0 MHz (USB)
#define SYSCTL_RCC_XTAL_12_2MHZ 0x00000480 // 12.288 MHz
#define SYSCTL_RCC_XTAL_13_5MHZ 0x000004C0 // 13.56 MHz
#define SYSCTL_RCC_XTAL_14_3MHZ 0x00000500 // 14.31818 MHz
#define SYSCTL_RCC_XTAL_16MHZ 0x00000540 // 16.0 MHz (USB)
#define SYSCTL_RCC_XTAL_16_3MHZ 0x00000580 // 16.384 MHz
#define SYSCTL_RCC_PLLVER 0x00000400 // PLL verification timer enable
#define SYSCTL_RCC_OSCSRC_M 0x00000030 // Oscillator input select
#define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // Use the main oscillator
#define SYSCTL_RCC_OSCSRC_INT 0x00000010 // Use the internal oscillator
#define SYSCTL_RCC_OSCSRC_INT4 0x00000020 // Use the internal oscillator / 4
#define SYSCTL_RCC_OSCSRC_30 0x00000030 // 30 KHz internal oscillator
#define SYSCTL_RCC_IOSCVER 0x00000008 // Int. osc. verification timer en
#define SYSCTL_RCC_MOSCVER 0x00000004 // Main osc. verification timer en
#define SYSCTL_RCC_IOSCDIS 0x00000002 // Internal oscillator disable
#define SYSCTL_RCC_MOSCDIS 0x00000001 // Main oscillator disable
#define SYSCTL_RCC_SYSDIV_S 23 // Shift to the SYSDIV field
#define SYSCTL_RCC_PWMDIV_S 17 // Shift to the PWMDIV field
#define SYSCTL_RCC_XTAL_S 6 // Shift to the XTAL field
#define SYSCTL_RCC_OSCSRC_S 4 // Shift to the OSCSRC field
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_PLLCFG register.
//
//*****************************************************************************
#define SYSCTL_PLLCFG_OD_M 0x0000C000 // Output divider
#define SYSCTL_PLLCFG_OD_1 0x00000000 // Output divider is 1
#define SYSCTL_PLLCFG_OD_2 0x00004000 // Output divider is 2
#define SYSCTL_PLLCFG_OD_4 0x00008000 // Output divider is 4
#define SYSCTL_PLLCFG_F_M 0x00003FE0 // PLL F Value
#define SYSCTL_PLLCFG_R_M 0x0000001F // PLL R Value
#define SYSCTL_PLLCFG_F_S 5
#define SYSCTL_PLLCFG_R_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_GPIOHSCTL
// register.
//
//*****************************************************************************
#define SYSCTL_GPIOHSCTL_PORTH 0x00000080 // Port H High-Speed
#define SYSCTL_GPIOHSCTL_PORTG 0x00000040 // Port G High-Speed
#define SYSCTL_GPIOHSCTL_PORTF 0x00000020 // Port F High-Speed
#define SYSCTL_GPIOHSCTL_PORTE 0x00000010 // Port E High-Speed
#define SYSCTL_GPIOHSCTL_PORTD 0x00000008 // Port D High-Speed
#define SYSCTL_GPIOHSCTL_PORTC 0x00000004 // Port C High-Speed
#define SYSCTL_GPIOHSCTL_PORTB 0x00000002 // Port B High-Speed
#define SYSCTL_GPIOHSCTL_PORTA 0x00000001 // Port A High-Speed
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_GPIOHBCTL
// register.
//
//*****************************************************************************
#define SYSCTL_GPIOHBCTL_PORTJ 0x00000100 // Port J Advanced Host Bus
#define SYSCTL_GPIOHBCTL_PORTH 0x00000080 // Port H Advanced Host Bus
#define SYSCTL_GPIOHBCTL_PORTG 0x00000040 // Port G Advanced Host Bus
#define SYSCTL_GPIOHBCTL_PORTF 0x00000020 // Port F Advanced Host Bus
#define SYSCTL_GPIOHBCTL_PORTE 0x00000010 // Port E Advanced Host Bus
#define SYSCTL_GPIOHBCTL_PORTD 0x00000008 // Port D Advanced Host Bus
#define SYSCTL_GPIOHBCTL_PORTC 0x00000004 // Port C Advanced Host Bus
#define SYSCTL_GPIOHBCTL_PORTB 0x00000002 // Port B Advanced Host Bus
#define SYSCTL_GPIOHBCTL_PORTA 0x00000001 // Port A Advanced Host Bus
//*****************************************************************************
//
// The following are defines for the bit fields in the SYSCTL_RCC2 register.
//
//*****************************************************************************
#define SYSCTL_RCC2_USERCC2 0x80000000 // Use RCC2
#define SYSCTL_RCC2_USEFRACT 0x40000000 // Use fractional divider
#define SYSCTL_RCC2_SYSDIV2_M 0x1F800000 // System clock divider
#define SYSCTL_RCC2_SYSDIV2_2 0x00800000 // System clock /2
#define SYSCTL_RCC2_SYSDIV2_3 0x01000000 // System clock /3
#define SYSCTL_RCC2_SYSDIV2_4 0x01800000 // System clock /4
#define SYSCTL_RCC2_SYSDIV2_5 0x02000000 // System clock /5
#define SYSCTL_RCC2_SYSDIV2_6 0x02800000 // System clock /6
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -