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