@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
hardware_resets

Hardware Reset API. More...

## Typedefs

typedef enum reset_num_rp2040 | reset_num_t
| Resettable component numbers on RP2040 (used as typedef reset_num_t).

## Enumerations

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
}

| Resettable component numbers on RP2040 (used as typedef reset_num_t). More...

## Functions

static __force_inline void | reset_block_mask (uint32_t bits)
| Reset the specified HW blocks.
static __force_inline void | unreset_block_mask (uint32_t bits)
| bring specified HW blocks out of reset
static __force_inline void | unreset_block_mask_wait_blocking (uint32_t bits)
| Bring specified HW blocks out of reset and wait for completion.
static void | reset_block_num (uint32_t block_num)
| Reset the specified HW block.
static void | unreset_block_num (uint block_num)
| bring specified HW block out of reset
static void | unreset_block_num_wait_blocking (uint block_num)
| Bring specified HW block out of reset and wait for completion.
static void | reset_unreset_block_num_wait_blocking (uint block_num)
| Reset the specified HW block, and then bring at back out of reset and wait for completion.

## Detailed Description

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 RP2040:

Block to reset | Bit
--- | ---
USB | 24
UART 1 | 23
UART 0 | 22
Timer | 21
TB Manager | 20
SysInfo | 19
System Config | 18
SPI 1 | 17
SPI 0 | 16
RTC | 15
PWM | 14
PLL USB | 13
PLL System | 12
PIO 1 | 11
PIO 0 | 10
Pads - QSPI | 9
Pads - Bank 0 | 8
JTAG | 7
IO QSPI | 6
IO Bank 0 | 5
I2C 1 | 4
I2C 0 | 3
DMA | 2
Bus Control | 1
ADC 0 | 0

## Example

## Enumeration Type Documentation

## reset_num_rp2040

enum reset_num_rp2040

Resettable component numbers on RP2040 (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_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_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_RTC | Select RTC 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_TIMER | Select TIMER to be reset.
RESET_UART0 | Select UART0 to be reset.
RESET_UART1 | Select UART1 to be reset.
RESET_USBCTRL | Select USBCTRL to be reset.

## Function Documentation

## reset_block_mask()

__force_inline void reset_block_mask | ( | uint32_t | bits | ) |

static

Reset the specified HW blocks.

Parameters

  bits | Bit pattern indicating blocks to reset. See reset_bitmask

## reset_block_num()

void reset_block_num | ( | uint32_t | block_num | ) |

inline static

Reset the specified HW block.

Parameters

  block_num | the block number

## reset_unreset_block_num_wait_blocking()

void reset_unreset_block_num_wait_blocking | ( | uint | block_num | ) |

inline static

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()

__force_inline void unreset_block_mask | ( | uint32_t | bits | ) |

static

bring specified HW blocks out of reset

Parameters

  bits | Bit pattern indicating blocks to unreset. See reset_bitmask

## unreset_block_mask_wait_blocking()

__force_inline void unreset_block_mask_wait_blocking | ( | uint32_t | bits | ) |

static

Bring specified HW blocks out of reset and wait for completion.

Parameters

  bits | Bit pattern indicating blocks to unreset. See reset_bitmask

## unreset_block_num()

void unreset_block_num | ( | uint | block_num | ) |

inline static

bring specified HW block out of reset

Parameters

  block_num | the block number

## unreset_block_num_wait_blocking()

void unreset_block_num_wait_blocking | ( | uint | block_num | ) |

inline static

Bring specified HW block out of reset and wait for completion.

Parameters

  block_num | the block number