1 // THIS HEADER FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT 2 3 /** 4 * Copyright (c) 2024 Raspberry Pi Ltd. 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 #ifndef _HARDWARE_STRUCTS_PSM_H 9 #define _HARDWARE_STRUCTS_PSM_H 10 11 /** 12 * \file rp2040/psm.h 13 */ 14 15 #include "hardware/address_mapped.h" 16 #include "hardware/regs/psm.h" 17 18 // Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_psm 19 // 20 // The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature) 21 // _REG_(x) will link to the corresponding register in hardware/regs/psm.h. 22 // 23 // Bit-field descriptions are of the form: 24 // BITMASK [BITRANGE] FIELDNAME (RESETVALUE) DESCRIPTION 25 26 typedef struct { 27 _REG_(PSM_FRCE_ON_OFFSET) // PSM_FRCE_ON 28 // Force block out of reset (i 29 // 0x00010000 [16] PROC1 (0) 30 // 0x00008000 [15] PROC0 (0) 31 // 0x00004000 [14] SIO (0) 32 // 0x00002000 [13] VREG_AND_CHIP_RESET (0) 33 // 0x00001000 [12] XIP (0) 34 // 0x00000800 [11] SRAM5 (0) 35 // 0x00000400 [10] SRAM4 (0) 36 // 0x00000200 [9] SRAM3 (0) 37 // 0x00000100 [8] SRAM2 (0) 38 // 0x00000080 [7] SRAM1 (0) 39 // 0x00000040 [6] SRAM0 (0) 40 // 0x00000020 [5] ROM (0) 41 // 0x00000010 [4] BUSFABRIC (0) 42 // 0x00000008 [3] RESETS (0) 43 // 0x00000004 [2] CLOCKS (0) 44 // 0x00000002 [1] XOSC (0) 45 // 0x00000001 [0] ROSC (0) 46 io_rw_32 frce_on; 47 48 _REG_(PSM_FRCE_OFF_OFFSET) // PSM_FRCE_OFF 49 // Force into reset (i 50 // 0x00010000 [16] PROC1 (0) 51 // 0x00008000 [15] PROC0 (0) 52 // 0x00004000 [14] SIO (0) 53 // 0x00002000 [13] VREG_AND_CHIP_RESET (0) 54 // 0x00001000 [12] XIP (0) 55 // 0x00000800 [11] SRAM5 (0) 56 // 0x00000400 [10] SRAM4 (0) 57 // 0x00000200 [9] SRAM3 (0) 58 // 0x00000100 [8] SRAM2 (0) 59 // 0x00000080 [7] SRAM1 (0) 60 // 0x00000040 [6] SRAM0 (0) 61 // 0x00000020 [5] ROM (0) 62 // 0x00000010 [4] BUSFABRIC (0) 63 // 0x00000008 [3] RESETS (0) 64 // 0x00000004 [2] CLOCKS (0) 65 // 0x00000002 [1] XOSC (0) 66 // 0x00000001 [0] ROSC (0) 67 io_rw_32 frce_off; 68 69 _REG_(PSM_WDSEL_OFFSET) // PSM_WDSEL 70 // Set to 1 if this peripheral should be reset when the watchdog fires 71 // 0x00010000 [16] PROC1 (0) 72 // 0x00008000 [15] PROC0 (0) 73 // 0x00004000 [14] SIO (0) 74 // 0x00002000 [13] VREG_AND_CHIP_RESET (0) 75 // 0x00001000 [12] XIP (0) 76 // 0x00000800 [11] SRAM5 (0) 77 // 0x00000400 [10] SRAM4 (0) 78 // 0x00000200 [9] SRAM3 (0) 79 // 0x00000100 [8] SRAM2 (0) 80 // 0x00000080 [7] SRAM1 (0) 81 // 0x00000040 [6] SRAM0 (0) 82 // 0x00000020 [5] ROM (0) 83 // 0x00000010 [4] BUSFABRIC (0) 84 // 0x00000008 [3] RESETS (0) 85 // 0x00000004 [2] CLOCKS (0) 86 // 0x00000002 [1] XOSC (0) 87 // 0x00000001 [0] ROSC (0) 88 io_rw_32 wdsel; 89 90 _REG_(PSM_DONE_OFFSET) // PSM_DONE 91 // Indicates the peripheral's registers are ready to access 92 // 0x00010000 [16] PROC1 (0) 93 // 0x00008000 [15] PROC0 (0) 94 // 0x00004000 [14] SIO (0) 95 // 0x00002000 [13] VREG_AND_CHIP_RESET (0) 96 // 0x00001000 [12] XIP (0) 97 // 0x00000800 [11] SRAM5 (0) 98 // 0x00000400 [10] SRAM4 (0) 99 // 0x00000200 [9] SRAM3 (0) 100 // 0x00000100 [8] SRAM2 (0) 101 // 0x00000080 [7] SRAM1 (0) 102 // 0x00000040 [6] SRAM0 (0) 103 // 0x00000020 [5] ROM (0) 104 // 0x00000010 [4] BUSFABRIC (0) 105 // 0x00000008 [3] RESETS (0) 106 // 0x00000004 [2] CLOCKS (0) 107 // 0x00000002 [1] XOSC (0) 108 // 0x00000001 [0] ROSC (0) 109 io_ro_32 done; 110 } psm_hw_t; 111 112 #define psm_hw ((psm_hw_t *)PSM_BASE) 113 static_assert(sizeof (psm_hw_t) == 0x0010, ""); 114 115 #endif // _HARDWARE_STRUCTS_PSM_H 116 117