|
|
@@ -1045,7 +1045,7 @@ enum IRQ_NUMBER_t { |
|
|
|
|
|
|
|
#define SIM_SOPT1 (*(volatile uint32_t *)0x40047000) // System Options Register 1 |
|
|
|
#define SIM_SOPT1_USBREGEN ((uint32_t)0x80000000) // USB regulator enable |
|
|
|
#define SIM_SOPT1_USBSSTBY ((uint32_t)0x40000000) // USB regulator standby in Stop, VLPS, LLS and VLLS |
|
|
|
#define SIM_SOPT1_USBSSTBY ((uint32_t)0x40000000) // USB regulator standby in Stop, VLPS, LLS and VLLS |
|
|
|
#define SIM_SOPT1_USBVSTBY ((uint32_t)0x20000000) // USB regulator standby in VLPR and VLPW |
|
|
|
#define SIM_SOPT1_OSC32KSEL(n) ((uint32_t)(((n) & 3) << 18)) // 32K oscillator clock, 0=system osc, 2=rtc osc, 3=lpo |
|
|
|
#define SIM_SOPT1CFG (*(volatile uint32_t *)0x40047004) // SOPT1 Configuration Register |
|
|
@@ -1171,8 +1171,8 @@ enum IRQ_NUMBER_t { |
|
|
|
#define SIM_SCGC4_CMT ((uint32_t)0x00000004) // CMT Clock Gate Control |
|
|
|
#define SIM_SCGC4_EWM ((uint32_t)0x00000002) // EWM Clock Gate Control |
|
|
|
#ifdef KINETISL |
|
|
|
#define SIM_SCGC4_SPI1 ((uint32_t)0x00800000) // |
|
|
|
#define SIM_SCGC4_SPI0 ((uint32_t)0x00400000) // |
|
|
|
#define SIM_SCGC4_SPI1 ((uint32_t)0x00800000) // |
|
|
|
#define SIM_SCGC4_SPI0 ((uint32_t)0x00400000) // |
|
|
|
#endif |
|
|
|
#define SIM_SCGC5 (*(volatile uint32_t *)0x40048038) // System Clock Gating Control Register 5 |
|
|
|
#define SIM_SCGC5_PORTE ((uint32_t)0x00002000) // Port E Clock Gate Control |
|
|
@@ -1263,8 +1263,8 @@ enum IRQ_NUMBER_t { |
|
|
|
#define RCM_RPFC (*(volatile uint8_t *)0x4007F004) // Reset Pin Filter Control Register |
|
|
|
#define RCM_RPFW (*(volatile uint8_t *)0x4007F005) // Reset Pin Filter Width Register |
|
|
|
#define RCM_MR (*(volatile uint8_t *)0x4007F007) // Mode Register |
|
|
|
#define RCM_SSRS0 (*(volatile uint8_t *)0x4007F008) // Sticky System Reset Status Register 0 |
|
|
|
#define RCM_SSRS1 (*(volatile uint8_t *)0x4007F009) // Sticky System Reset Status Register 0 |
|
|
|
#define RCM_SSRS0 (*(volatile uint8_t *)0x4007F008) // Sticky System Reset Status Register 0 |
|
|
|
#define RCM_SSRS1 (*(volatile uint8_t *)0x4007F009) // Sticky System Reset Status Register 0 |
|
|
|
|
|
|
|
// System Mode Controller |
|
|
|
|
|
|
@@ -2523,10 +2523,10 @@ typedef struct { |
|
|
|
#define MCG_C2 (KINETIS_MCG.C2) // 40064001 MCG Control 2 Register |
|
|
|
#define MCG_C2_IRCS (uint8_t)0x01 // Internal Reference Clock Select, Selects between the fast or slow internal reference clock source. |
|
|
|
#define MCG_C2_LP (uint8_t)0x02 // Low Power Select, Controls whether the FLL or PLL is disabled in BLPI and BLPE modes. |
|
|
|
#define MCG_C2_EREFS (uint8_t)0x04 // External Reference Select, Selects the source for the external reference clock. |
|
|
|
#define MCG_C2_EREFS (uint8_t)0x04 // External Reference Select, Selects the source for the external reference clock. |
|
|
|
#define MCG_C2_HGO0 (uint8_t)0x08 // High Gain Oscillator Select, Controls the crystal oscillator mode of operation |
|
|
|
#define MCG_C2_RANGE0(n) (uint8_t)(((n) & 0x03) << 4) // Frequency Range Select, Selects the frequency range for the crystal oscillator |
|
|
|
#define MCG_C2_LOCRE0 (uint8_t)0x80 // Loss of Clock Reset Enable, Determines whether an interrupt or a reset request is made following a loss of OSC0 |
|
|
|
#define MCG_C2_LOCRE0 (uint8_t)0x80 // Loss of Clock Reset Enable, Determines whether an interrupt or a reset request is made following a loss of OSC0 |
|
|
|
#define MCG_C3 (KINETIS_MCG.C3) // 40064002 MCG Control 3 Register |
|
|
|
#define MCG_C3_SCTRIM(n) (uint8_t)(n) // Slow Internal Reference Clock Trim Setting |
|
|
|
#define MCG_C4 (KINETIS_MCG.C4) // 40064003 MCG Control 4 Register |
|
|
@@ -2541,7 +2541,7 @@ typedef struct { |
|
|
|
#define MCG_C6 (KINETIS_MCG.C6) // 40064005 MCG Control 6 Register |
|
|
|
#define MCG_C6_VDIV0(n) (uint8_t)((n) & 0x1F) // VCO 0 Divider |
|
|
|
#define MCG_C6_CME0 (uint8_t)0x20 // Clock Monitor Enable |
|
|
|
#define MCG_C6_PLLS (uint8_t)0x40 // PLL Select, Controls whether the PLL or FLL output is selected as the MCG source when CLKS[1:0]=00. |
|
|
|
#define MCG_C6_PLLS (uint8_t)0x40 // PLL Select, Controls whether the PLL or FLL output is selected as the MCG source when CLKS[1:0]=00. |
|
|
|
#define MCG_C6_LOLIE0 (uint8_t)0x80 // Loss of Lock Interrrupt Enable |
|
|
|
#define MCG_S (KINETIS_MCG.S) // 40064006 MCG Status Register |
|
|
|
#define MCG_S_IRCST (uint8_t)0x01 // Internal Reference Clock Status |
|
|
@@ -3996,9 +3996,9 @@ typedef struct { |
|
|
|
#define KINETISL_SPI0 (*(KINETISL_SPI_t *)0x40076000) |
|
|
|
#define KINETISL_SPI1 (*(KINETISL_SPI_t *)0x40077000) |
|
|
|
#define SPI0_S (KINETISL_SPI0.S) // Status |
|
|
|
#define SPI_S_SPRF ((uint8_t)0x80) // Read Buffer Full Flag |
|
|
|
#define SPI_S_SPRF ((uint8_t)0x80) // Read Buffer Full Flag |
|
|
|
#define SPI_S_SPMF ((uint8_t)0x40) // Match Flag |
|
|
|
#define SPI_S_SPTEF ((uint8_t)0x20) // Transmit Buffer Empty Flag |
|
|
|
#define SPI_S_SPTEF ((uint8_t)0x20) // Transmit Buffer Empty Flag |
|
|
|
#define SPI_S_MODF ((uint8_t)0x10) // Fault Flag |
|
|
|
#define SPI_S_RNFULLF ((uint8_t)0x08) // Receive FIFO nearly full flag |
|
|
|
#define SPI_S_TNEAREF ((uint8_t)0x04) // Transmit FIFO nearly empty flag |
|
|
@@ -4855,7 +4855,7 @@ typedef struct __attribute__((packed)) { |
|
|
|
#define TSI_GENCS_ESOR ((uint32_t)0x10000000) // End-of-scan or Out-of-Range Interrupt Selection |
|
|
|
#define TSI_GENCS_MODE(n) (((n) & 15) << 24) // analog modes & status |
|
|
|
#define TSI_GENCS_REFCHRG(n) (((n) & 7) << 21) // reference charge and discharge current |
|
|
|
#define TSI_GENCS_DVOLT(n) (((n) & 3) << 19) // voltage rails |
|
|
|
#define TSI_GENCS_DVOLT(n) (((n) & 3) << 19) // voltage rails |
|
|
|
#define TSI_GENCS_EXTCHRG(n) (((n) & 7) << 16) // electrode charge and discharge current |
|
|
|
#define TSI_GENCS_PS(n) (((n) & 7) << 13) // prescaler |
|
|
|
#define TSI_GENCS_NSCN(n) (((n) & 31) << 8) // scan number |