Hardware Reset API.
More...
|
| enum | reset_num_rp2350 {
RESET_ADC = 0
, RESET_BUSCTRL = 1
, RESET_DMA = 2
, RESET_HSTX = 3
,
RESET_I2C0 = 4
, RESET_I2C1 = 5
, RESET_IO_BANK0 = 6
, RESET_IO_QSPI = 7
,
RESET_JTAG = 8
, RESET_PADS_BANK0 = 9
, RESET_PADS_QSPI = 10
, RESET_PIO0 = 11
,
RESET_PIO1 = 12
, RESET_PIO2 = 13
, RESET_PLL_SYS = 14
, RESET_PLL_USB = 15
,
RESET_PWM = 16
, RESET_SHA256 = 17
, RESET_SPI0 = 18
, RESET_SPI1 = 19
,
RESET_SYSCFG = 20
, RESET_SYSINFO = 21
, RESET_TBMAN = 22
, RESET_TIMER0 = 23
,
RESET_TIMER1 = 24
, RESET_TRNG = 25
, RESET_UART0 = 26
, RESET_UART1 = 27
,
RESET_USBCTRL = 28
, RESET_COUNT
} |
| | Resettable component numbers on RP2350 (used as typedef reset_num_t) More...
|
| |
Hardware Reset API.
The reset controller allows software control of the resets to all of the peripherals that are not critical to boot the processor in the RP-series microcontroller.
reset_bitmask
Multiple blocks are referred to using a bitmask as follows:
For RP2350:
| Block to reset | Bit |
| USB | 28 |
| UART 1 | 27 |
| UART 0 | 26 |
| TRNG | 25 |
| Timer 1 | 24 |
| Timer 0 | 23 |
| TB Manager | 22 |
| SysInfo | 21 |
| System Config | 20 |
| SPI 1 | 19 |
| SPI 0 | 18 |
| SHA256 | 17 |
| PWM | 16 |
| PLL USB | 15 |
| PLL System | 14 |
| PIO 2 | 13 |
| PIO 1 | 12 |
| PIO 0 | 11 |
| Pads - QSPI | 10 |
| Pads - Bank 0 | 9 |
| JTAG | 8 |
| IO QSPI | 7 |
| IO Bank 0 | 6 |
| I2C 1 | 5 |
| I2C 0 | 4 |
| HSTX | 3 |
| DMA | 2 |
| Bus Control | 1 |
| ADC 0 | 0 |
Example
int main() {
printf("Hello, reset!\n");
return 0;
}
static void reset_block_num(reset_num_t block_num)
Reset the specified HW block.
Definition resets.h:179
static void unreset_block_num_wait_blocking(reset_num_t block_num)
Bring specified HW block out of reset and wait for completion.
Definition resets.h:199
static __force_inline void reset_block_mask(uint32_t bits)
Reset the specified HW blocks.
Definition resets.h:132
static __force_inline void unreset_block_mask_wait_blocking(uint32_t bits)
Bring specified HW blocks out of reset and wait for completion.
Definition resets.h:150
@ RESET_PWM
Select PWM to be reset.
Definition resets.h:46
@ RESET_ADC
Select ADC to be reset.
Definition resets.h:30
bool stdio_init_all(void)
Initialize all of the present standard stdio types that are linked into the binary.
Definition stdio.c:207
◆ reset_num_rp2350
Resettable component numbers on RP2350 (used as typedef reset_num_t)
| Enumerator |
|---|
| RESET_ADC | Select ADC to be reset.
|
| RESET_BUSCTRL | Select BUSCTRL to be reset.
|
| RESET_DMA | Select DMA to be reset.
|
| RESET_HSTX | Select HSTX to be reset.
|
| RESET_I2C0 | Select I2C0 to be reset.
|
| RESET_I2C1 | Select I2C1 to be reset.
|
| RESET_IO_BANK0 | Select IO_BANK0 to be reset.
|
| RESET_IO_QSPI | Select IO_QSPI to be reset.
|
| RESET_JTAG | Select JTAG to be reset.
|
| RESET_PADS_BANK0 | Select PADS_BANK0 to be reset.
|
| RESET_PADS_QSPI | Select PADS_QSPI to be reset.
|
| RESET_PIO0 | Select PIO0 to be reset.
|
| RESET_PIO1 | Select PIO1 to be reset.
|
| RESET_PIO2 | Select PIO2 to be reset.
|
| RESET_PLL_SYS | Select PLL_SYS to be reset.
|
| RESET_PLL_USB | Select PLL_USB to be reset.
|
| RESET_PWM | Select PWM to be reset.
|
| RESET_SHA256 | Select SHA256 to be reset.
|
| RESET_SPI0 | Select SPI0 to be reset.
|
| RESET_SPI1 | Select SPI1 to be reset.
|
| RESET_SYSCFG | Select SYSCFG to be reset.
|
| RESET_SYSINFO | Select SYSINFO to be reset.
|
| RESET_TBMAN | Select TBMAN to be reset.
|
| RESET_TIMER0 | Select TIMER0 to be reset.
|
| RESET_TIMER1 | Select TIMER1 to be reset.
|
| RESET_TRNG | Select TRNG to be reset.
|
| RESET_UART0 | Select UART0 to be reset.
|
| RESET_UART1 | Select UART1 to be reset.
|
| RESET_USBCTRL | Select USBCTRL to be reset.
|
◆ reset_block_mask()
Reset the specified HW blocks.
- Parameters
-
◆ reset_block_num()
Reset the specified HW block.
- Parameters
-
| block_num | the block number |
◆ reset_unreset_block_num_wait_blocking()
| static void reset_unreset_block_num_wait_blocking |
( |
reset_num_t |
block_num | ) |
|
|
inlinestatic |
Reset the specified HW block, and then bring at back out of reset and wait for completion.
- Parameters
-
| block_num | the block number |
◆ unreset_block_mask()
bring specified HW blocks out of reset
- Parameters
-
◆ unreset_block_mask_wait_blocking()
| static __force_inline void unreset_block_mask_wait_blocking |
( |
uint32_t |
bits | ) |
|
|
static |
Bring specified HW blocks out of reset and wait for completion.
- Parameters
-
◆ unreset_block_num()
bring specified HW block out of reset
- Parameters
-
| block_num | the block number |
◆ unreset_block_num_wait_blocking()
| static void unreset_block_num_wait_blocking |
( |
reset_num_t |
block_num | ) |
|
|
inlinestatic |
Bring specified HW block out of reset and wait for completion.
- Parameters
-
| block_num | the block number |