@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
resets.h
// THIS HEADER FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT
#ifndef _HARDWARE_STRUCTS_RESETS_H
#define _HARDWARE_STRUCTS_RESETS_H
#include "hardware/address_mapped.h"
#include "hardware/regs/resets.h"
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_resets
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/resets.h.
//
// Bit-field descriptions are of the form:
// BITMASK [BITRANGE] FIELDNAME (RESETVALUE) DESCRIPTION
typedef enum reset_num_rp2040 {
RESET_ADC = 0,
RESET_BUSCTRL = 1,
RESET_DMA = 2,
RESET_I2C0 = 3,
RESET_I2C1 = 4,
RESET_IO_BANK0 = 5,
RESET_IO_QSPI = 6,
RESET_JTAG = 7,
RESET_PADS_BANK0 = 8,
RESET_PADS_QSPI = 9,
RESET_PIO0 = 10,
RESET_PIO1 = 11,
RESET_PLL_SYS = 12,
RESET_PLL_USB = 13,
RESET_PWM = 14,
RESET_RTC = 15,
RESET_SPI0 = 16,
RESET_SPI1 = 17,
RESET_SYSCFG = 18,
RESET_SYSINFO = 19,
RESET_TBMAN = 20,
RESET_TIMER = 21,
RESET_UART0 = 22,
RESET_UART1 = 23,
RESET_USBCTRL = 24,
RESET_COUNT
} reset_num_t;
typedef struct {
_REG_(RESETS_RESET_OFFSET) // RESETS_RESET
// Reset control.
// 0x01000000 [24] USBCTRL (1)
// 0x00800000 [23] UART1 (1)
// 0x00400000 [22] UART0 (1)
// 0x00200000 [21] TIMER (1)
// 0x00100000 [20] TBMAN (1)
// 0x00080000 [19] SYSINFO (1)
// 0x00040000 [18] SYSCFG (1)
// 0x00020000 [17] SPI1 (1)
// 0x00010000 [16] SPI0 (1)
// 0x00008000 [15] RTC (1)
// 0x00004000 [14] PWM (1)
// 0x00002000 [13] PLL_USB (1)
// 0x00001000 [12] PLL_SYS (1)
// 0x00000800 [11] PIO1 (1)
// 0x00000400 [10] PIO0 (1)
// 0x00000200 [9] PADS_QSPI (1)
// 0x00000100 [8] PADS_BANK0 (1)
// 0x00000080 [7] JTAG (1)
// 0x00000040 [6] IO_QSPI (1)
// 0x00000020 [5] IO_BANK0 (1)
// 0x00000010 [4] I2C1 (1)
// 0x00000008 [3] I2C0 (1)
// 0x00000004 [2] DMA (1)
// 0x00000002 [1] BUSCTRL (1)
// 0x00000001 [0] ADC (1)
io_rw_32 reset;
_REG_(RESETS_WDSEL_OFFSET) // RESETS_WDSEL
// Watchdog select.
// 0x01000000 [24] USBCTRL (0)
// 0x00800000 [23] UART1 (0)
// 0x00400000 [22] UART0 (0)
// 0x00200000 [21] TIMER (0)
// 0x00100000 [20] TBMAN (0)
// 0x00080000 [19] SYSINFO (0)
// 0x00040000 [18] SYSCFG (0)
// 0x00020000 [17] SPI1 (0)
// 0x00010000 [16] SPI0 (0)
// 0x00008000 [15] RTC (0)
// 0x00004000 [14] PWM (0)
// 0x00002000 [13] PLL_USB (0)
// 0x00001000 [12] PLL_SYS (0)
// 0x00000800 [11] PIO1 (0)
// 0x00000400 [10] PIO0 (0)
// 0x00000200 [9] PADS_QSPI (0)
// 0x00000100 [8] PADS_BANK0 (0)
// 0x00000080 [7] JTAG (0)
// 0x00000040 [6] IO_QSPI (0)
// 0x00000020 [5] IO_BANK0 (0)
// 0x00000010 [4] I2C1 (0)
// 0x00000008 [3] I2C0 (0)
// 0x00000004 [2] DMA (0)
// 0x00000002 [1] BUSCTRL (0)
// 0x00000001 [0] ADC (0)
io_rw_32 wdsel;
_REG_(RESETS_RESET_DONE_OFFSET) // RESETS_RESET_DONE
// Reset done.
// 0x01000000 [24] USBCTRL (0)
// 0x00800000 [23] UART1 (0)
// 0x00400000 [22] UART0 (0)
// 0x00200000 [21] TIMER (0)
// 0x00100000 [20] TBMAN (0)
// 0x00080000 [19] SYSINFO (0)
// 0x00040000 [18] SYSCFG (0)
// 0x00020000 [17] SPI1 (0)
// 0x00010000 [16] SPI0 (0)
// 0x00008000 [15] RTC (0)
// 0x00004000 [14] PWM (0)
// 0x00002000 [13] PLL_USB (0)
// 0x00001000 [12] PLL_SYS (0)
// 0x00000800 [11] PIO1 (0)
// 0x00000400 [10] PIO0 (0)
// 0x00000200 [9] PADS_QSPI (0)
// 0x00000100 [8] PADS_BANK0 (0)
// 0x00000080 [7] JTAG (0)
// 0x00000040 [6] IO_QSPI (0)
// 0x00000020 [5] IO_BANK0 (0)
// 0x00000010 [4] I2C1 (0)
// 0x00000008 [3] I2C0 (0)
// 0x00000004 [2] DMA (0)
// 0x00000002 [1] BUSCTRL (0)
// 0x00000001 [0] ADC (0)
io_ro_32 reset_done;
} resets_hw_t;
#define resets_hw ((resets_hw_t *)RESETS_BASE)
static_assert(sizeof (resets_hw_t) == 0x000c, "");
#endif // _HARDWARE_STRUCTS_RESETS_H
address_mapped.h
reset_num_t
enum reset_num_rp2040 reset_num_t
Resettable component numbers on RP2040 (used as typedef reset_num_t).
reset_num_rp2040
reset_num_rp2040
Resettable component numbers on RP2040 (used as typedef reset_num_t).
Definition resets.h:29
RESET_UART0
@ RESET_UART0
Select UART0 to be reset.
Definition resets.h:52
RESET_PADS_BANK0
@ RESET_PADS_BANK0
Select PADS_BANK0 to be reset.
Definition resets.h:38
RESET_PIO1
@ RESET_PIO1
Select PIO1 to be reset.
Definition resets.h:41
RESET_UART1
@ RESET_UART1
Select UART1 to be reset.
Definition resets.h:53
RESET_TIMER
@ RESET_TIMER
Select TIMER to be reset.
Definition resets.h:51
RESET_SPI1
@ RESET_SPI1
Select SPI1 to be reset.
Definition resets.h:47
RESET_PLL_SYS
@ RESET_PLL_SYS
Select PLL_SYS to be reset.
Definition resets.h:42
RESET_PWM
@ RESET_PWM
Select PWM to be reset.
Definition resets.h:44
RESET_PADS_QSPI
@ RESET_PADS_QSPI
Select PADS_QSPI to be reset.
Definition resets.h:39
RESET_RTC
@ RESET_RTC
Select RTC to be reset.
Definition resets.h:45
RESET_IO_BANK0
@ RESET_IO_BANK0
Select IO_BANK0 to be reset.
Definition resets.h:35
RESET_I2C1
@ RESET_I2C1
Select I2C1 to be reset.
Definition resets.h:34
RESET_PIO0
@ RESET_PIO0
Select PIO0 to be reset.
Definition resets.h:40
RESET_SYSCFG
@ RESET_SYSCFG
Select SYSCFG to be reset.
Definition resets.h:48
RESET_I2C0
@ RESET_I2C0
Select I2C0 to be reset.
Definition resets.h:33
RESET_USBCTRL
@ RESET_USBCTRL
Select USBCTRL to be reset.
Definition resets.h:54
RESET_JTAG
@ RESET_JTAG
Select JTAG to be reset.
Definition resets.h:37
RESET_IO_QSPI
@ RESET_IO_QSPI
Select IO_QSPI to be reset.
Definition resets.h:36
RESET_BUSCTRL
@ RESET_BUSCTRL
Select BUSCTRL to be reset.
Definition resets.h:31
RESET_DMA
@ RESET_DMA
Select DMA to be reset.
Definition resets.h:32
RESET_SPI0
@ RESET_SPI0
Select SPI0 to be reset.
Definition resets.h:46
RESET_SYSINFO
@ RESET_SYSINFO
Select SYSINFO to be reset.
Definition resets.h:49
RESET_PLL_USB
@ RESET_PLL_USB
Select PLL_USB to be reset.
Definition resets.h:43
RESET_TBMAN
@ RESET_TBMAN
Select TBMAN to be reset.
Definition resets.h:50
RESET_ADC
@ RESET_ADC
Select ADC to be reset.
Definition resets.h:30
resets_hw_t
Definition resets.h:59