Trident IoT SDK
Loading...
Searching...
No Matches
T32CM11_sysctrl.h
Go to the documentation of this file.
1
10
11#ifndef T32CM11_SYSCTRL_H_
12#define T32CM11_SYSCTRL_H_
13
14#include "tr_hal_platform.h"
15
21
26#define TR_HAL_NUM_PULL_REGISTERS 4
27#define TR_HAL_PINS_PER_PULL_REG 8
28
29#define TR_HAL_NUM_MODE_REGISTERS 4
30#define TR_HAL_PINS_PER_MODE_REG 8
31
32#define TR_HAL_NUM_DRIVE_REGISTERS 2
33#define TR_HAL_PINS_PER_DRIVE_REG 16
34
35
42typedef struct
43{
44 __IO uint32_t sleep_enable; // 0x00
45 __IO uint32_t system_clock_control; // 0x04
46 __IO uint32_t reserved[2]; // 0x08, 0x0C
47
48 // default is 0 = GPIO
49 __IO uint32_t gpio_pin_map[TR_HAL_NUM_MODE_REGISTERS]; // 0x10, 0x14, 0x18, 0x1C
50
51 // default is 0b110 = 6 = 100K pull up
52 __IO uint32_t gpio_pull_ctrl[TR_HAL_NUM_PULL_REGISTERS]; // 0x20, 0x24, 0x28, 0x2C
53
54 // default is 0b11 = 3 = 20 mA (max)
55 __IO uint32_t gpio_drv_ctrl[TR_HAL_NUM_DRIVE_REGISTERS]; // 0x30, 0x34
56
57 // default is 0 = disabled
58 __IO uint32_t open_drain_enable; // 0x38
59
60 // note this only works for pins 24-31, of which 24-27 are not available
61 // lowest 8 bits are used to enable these 8 pins
62 // bit 0 = pin 24... bit 7 = pin 31
63 __IO uint32_t analog_IO_enable; // 0x3C
64
65 // random number generator registers (see section 20)
66 __IO uint32_t random_number_trigger; // 0x40
67 __IO uint32_t random_number_select; // 0x44
68 __IO uint32_t random_number_status; // 0x48
69 __IO uint32_t random_number_value; // 0x4C
70
71 // reserved
72 __IO uint32_t reserved2[4]; // 0x50, 0x54, 0x58, 0x5C
73 __IO uint32_t scratchpad[8]; // 0x60, 0x64, 0x68, 0x6C, 0x70, 0x74, 0x78, 0x7C
74
75 // wake from sleep on low-to-high transition of GPIO
76 __IO uint32_t enable_wake_on_high; // 0x80
77
78 // wake from sleep on high-to-low transition of GPIO
79 __IO uint32_t enable_wake_on_low; // 0x84
80
81 // reserved
82 __IO uint32_t reserved3[2]; // 0x88, 0x8C
83
84 // chip info
85 // bit 4 to bit 7 (0x000000F0) is the chip revision
86 // bit 8 to bit 15 (0x0000FF00) is the chip ID
87 __IO uint32_t chip_info; // 0x90
88
90
91// *****************************************************************
92// this orients the SYSCTRL_REGISTERS struct with the correct addresses
93// so referencing a field will now read/write the correct SYSCTRL register
94// chip address
95#define SYS_CTRL_CHIP_REGISTERS ((SYS_CTRL_REGISTERS_T *) CHIP_MEMORY_MAP_SYS_CTRL_BASE)
96
97// these are for setting the system_clock_control register
98#define SCC_UART0_CLOCK_BIT 16
99#define SCC_UART1_CLOCK_BIT 17
100#define SCC_UART2_CLOCK_BIT 18
101
102#define TR_HAL_ENABLE_LITE_SLEEP 1
103#define TR_HAL_ENABLE_DEEP_SLEEP 2
104
108
109#endif // T32CM11_SYSCTRL_H_
This file contains the CHIP SPECIFIC types and defines for the T32CM11.
#define TR_HAL_NUM_MODE_REGISTERS
Definition T32CM11_sysctrl.h:29
#define TR_HAL_NUM_DRIVE_REGISTERS
Definition T32CZ20_sysctrl.h:31
#define TR_HAL_NUM_PULL_REGISTERS
defines for dealing with the SYS_CTRL pull registers and drive registers
Definition T32CZ20_sysctrl.h:28
offsets for where to find chip registers needed for System Control register which is used to configur...
Definition T32CM11_sysctrl.h:43
__IO uint32_t scratchpad[8]
Definition T32CM11_sysctrl.h:73
__IO uint32_t gpio_drv_ctrl[TR_HAL_NUM_DRIVE_REGISTERS]
Definition T32CM11_sysctrl.h:55
__IO uint32_t reserved3[2]
Definition T32CM11_sysctrl.h:82
__IO uint32_t reserved2[4]
Definition T32CM11_sysctrl.h:72
__IO uint32_t gpio_pin_map[TR_HAL_NUM_MODE_REGISTERS]
Definition T32CM11_sysctrl.h:49
__IO uint32_t reserved[2]
Definition T32CM11_sysctrl.h:46
__IO uint32_t gpio_pull_ctrl[TR_HAL_NUM_PULL_REGISTERS]
Definition T32CM11_sysctrl.h:52
__IO uint32_t system_clock_control
Definition T32CM11_sysctrl.h:45
__IO uint32_t random_number_value
Definition T32CM11_sysctrl.h:69
__IO uint32_t chip_info
Definition T32CM11_sysctrl.h:87
__IO uint32_t enable_wake_on_high
Definition T32CM11_sysctrl.h:76
__IO uint32_t open_drain_enable
Definition T32CM11_sysctrl.h:58
__IO uint32_t random_number_select
Definition T32CM11_sysctrl.h:67
__IO uint32_t analog_IO_enable
Definition T32CM11_sysctrl.h:63
__IO uint32_t random_number_status
Definition T32CM11_sysctrl.h:68
__IO uint32_t sleep_enable
Definition T32CM11_sysctrl.h:44
__IO uint32_t enable_wake_on_low
Definition T32CM11_sysctrl.h:79
__IO uint32_t random_number_trigger
Definition T32CM11_sysctrl.h:66