Select one of the symbols to view example projects that use it.
 
Outline
#define _HARDWARE_PLATFORM_DEFS_H
#define _u
#define _u
#define NUM_CORES
#define NUM_DMA_CHANNELS
#define NUM_DMA_TIMERS
#define NUM_DMA_MPU_REGIONS
#define NUM_DMA_IRQS
#define NUM_IRQS
#define NUM_USER_IRQS
#define NUM_PIOS
#define NUM_PIO_STATE_MACHINES
#define NUM_PIO_IRQS
#define NUM_PWM_SLICES
#define NUM_PWM_IRQS
#define NUM_SPIN_LOCKS
#define NUM_UARTS
#define NUM_I2CS
#define NUM_SPIS
#define NUM_GENERIC_TIMERS
#define NUM_ALARMS
#define NUM_ADC_CHANNELS
#define ADC_BASE_PIN
#define NUM_ADC_CHANNELS
#define ADC_BASE_PIN
#define NUM_RESETS
#define NUM_DOORBELLS
#define NUM_BANK0_GPIOS
#define NUM_BANK0_GPIOS
#define NUM_QSPI_GPIOS
#define NUM_OTP_PAGES
#define NUM_OTP_PAGE_ROWS
#define NUM_OTP_ROWS
#define PIO_INSTRUCTION_COUNT
#define NUM_MPU_REGIONS
#define NUM_SAU_REGIONS
#define NUM_BOOT_LOCKS
#define BOOTRAM_SIZE
#define USBCTRL_DPRAM_SIZE
#define HAS_GPIO_COPROCESSOR
#define HAS_DOUBLE_COPROCESSOR
#define HAS_REDUNDANCY_COPROCESSOR
#define HAS_POWMAN_TIMER
#define HAS_RP2350_TRNG
#define HAS_HSTX
#define XOSC_HZ
#define XOSC_HZ
#define XOSC_HZ
#define SYS_CLK_HZ
#define SYS_CLK_HZ
#define SYS_CLK_HZ
#define USB_CLK_HZ
#define USB_CLK_HZ
#define USB_CLK_HZ
#define XOSC_KHZ
#define XOSC_MHZ
#define SYS_CLK_KHZ
#define SYS_CLK_MHZ
#define USB_CLK_KHZ
#define USB_CLK_MHZ
#define ACCESSCTRL_PASSWORD_BITS
#define POWMAN_PASSWORD_BITS
#define VTABLE_FIRST_IRQ
#define VTABLE_FIRST_IRQ
#define VTABLE_FIRST_IRQ
#define FIRST_USER_IRQ
Files
loading...
SourceVuRaspberry Pi Pico SDK and ExamplesPicoSDKsrc/rp2350/hardware_regs/include/hardware/platform_defs.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * Copyright (c) 2024 Raspberry Pi Ltd. * * SPDX-License-Identifier: BSD-3-Clause *//* ... */ #ifndef _HARDWARE_PLATFORM_DEFS_H #define _HARDWARE_PLATFORM_DEFS_H // This header is included from C and assembler - intended mostly for #defines; guard other stuff with #ifdef __ASSEMBLER__ #ifndef _u #ifdef __ASSEMBLER__ #define _u(x) x #else #define _u(x) x ## u #endif/* ... */ #endif #define NUM_CORES _u(2) #define NUM_DMA_CHANNELS _u(16) #define NUM_DMA_TIMERS _u(4) #define NUM_DMA_MPU_REGIONS _u(8) #define NUM_DMA_IRQS _u(4) #define NUM_IRQS _u(52) #define NUM_USER_IRQS _u(6) #define NUM_PIOS _u(3) #define NUM_PIO_STATE_MACHINES _u(4) #define NUM_PIO_IRQS _u(2) #define NUM_PWM_SLICES _u(12) #define NUM_PWM_IRQS _u(2) #define NUM_SPIN_LOCKS _u(32) #define NUM_UARTS _u(2) #define NUM_I2CS _u(2) #define NUM_SPIS _u(2) #define NUM_GENERIC_TIMERS _u(2) #define NUM_ALARMS _u(4) 18 defines#if PICO_RP2350A #define NUM_ADC_CHANNELS _u(5) #define ADC_BASE_PIN _u(26) /* ... */#else #define NUM_ADC_CHANNELS _u(9) #define ADC_BASE_PIN _u(40) /* ... */#endif #define NUM_RESETS _u(28) #define NUM_DOORBELLS _u(8) #if PICO_RP2350A #define NUM_BANK0_GPIOS _u(30) #else #define NUM_BANK0_GPIOS _u(48) #endif #define NUM_QSPI_GPIOS _u(6) #define NUM_OTP_PAGES _u(64) #define NUM_OTP_PAGE_ROWS _u(64) #define NUM_OTP_ROWS (NUM_OTP_PAGES * NUM_OTP_PAGE_ROWS) #define PIO_INSTRUCTION_COUNT _u(32) #define NUM_MPU_REGIONS _u(8) #define NUM_SAU_REGIONS _u(8) #define NUM_BOOT_LOCKS _u(8) #define BOOTRAM_SIZE _u(0x400) #define USBCTRL_DPRAM_SIZE _u(4096) 10 defines #ifndef __riscv #define HAS_GPIO_COPROCESSOR 1 #define HAS_DOUBLE_COPROCESSOR 1 #define HAS_REDUNDANCY_COPROCESSOR 1 /* ... */#endif #define HAS_POWMAN_TIMER 1 #define HAS_RP2350_TRNG 1 #define HAS_HSTX 1 // PICO_CONFIG: XOSC_HZ, The crystal oscillator frequency in Hz, type=int, default=12000000, advanced=true, group=hardware_base // NOTE: The system and USB clocks are generated from the frequency using two PLLs. // If you override this define, or SYS_CLK_HZ/USB_CLK_HZ below, you will *also* need to add your own adjusted PLL set-up defines to // override the defaults which live in src/rp2_common/hardware_clocks/include/hardware/clocks.h // Please see the comments there about calculating the new PLL setting values. #ifndef XOSC_HZ #ifdef XOSC_KHZ #define XOSC_HZ ((XOSC_KHZ) * _u(1000)) #elif defined(XOSC_MHZ) #define XOSC_HZ ((XOSC_MHZ) * _u(1000000)) #else #define XOSC_HZ _u(12000000) #endif/* ... */ #endif // PICO_CONFIG: SYS_CLK_HZ, The system operating frequency in Hz, type=int, default=150000000, advanced=true, group=hardware_base #ifndef SYS_CLK_HZ #ifdef SYS_CLK_KHZ #define SYS_CLK_HZ ((SYS_CLK_KHZ) * _u(1000)) #elif defined(SYS_CLK_MHZ) #define SYS_CLK_HZ ((SYS_CLK_MHZ) * _u(1000000)) #else #define SYS_CLK_HZ _u(150000000) #endif/* ... */ #endif // PICO_CONFIG: USB_CLK_HZ, USB clock frequency. Must be 48MHz for the USB interface to operate correctly, type=int, default=48000000, advanced=true, group=hardware_base #ifndef USB_CLK_HZ #ifdef USB_CLK_KHZ #define USB_CLK_HZ ((USB_CLK_KHZ) * _u(1000)) #elif defined(USB_CLK_MHZ) #define USB_CLK_HZ ((USB_CLK_MHZ) * _u(1000000)) #else #define USB_CLK_HZ _u(48000000) #endif/* ... */ #endif // For backwards compatibility define XOSC_KHZ if the frequency is indeed an integer number of Khz. #if defined(XOSC_HZ) && !defined(XOSC_KHZ) && (XOSC_HZ % 1000 == 0) #define XOSC_KHZ (XOSC_HZ / 1000) #endif // For backwards compatibility define XOSC_MHZ if the frequency is indeed an integer number of Mhz. #if defined(XOSC_KHZ) && !defined(XOSC_MHZ) && (XOSC_KHZ % 1000 == 0) #define XOSC_MHZ (XOSC_KHZ / 1000) #endif // For backwards compatibility define SYS_CLK_KHZ if the frequency is indeed an integer number of Khz. #if defined(SYS_CLK_HZ) && !defined(SYS_CLK_KHZ) && (SYS_CLK_HZ % 1000 == 0) #define SYS_CLK_KHZ (SYS_CLK_HZ / 1000) #endif // For backwards compatibility define SYS_CLK_MHZ if the frequency is indeed an integer number of Mhz. #if defined(SYS_CLK_KHZ) && !defined(SYS_CLK_MHZ) && (SYS_CLK_KHZ % 1000 == 0) #define SYS_CLK_MHZ (SYS_CLK_KHZ / 1000) #endif // For backwards compatibility define USB_CLK_KHZ if the frequency is indeed an integer number of Khz. #if defined(USB_CLK_HZ) && !defined(USB_CLK_KHZ) && (USB_CLK_HZ % 1000 == 0) #define USB_CLK_KHZ (USB_CLK_HZ / 1000) #endif // For backwards compatibility define USB_CLK_MHZ if the frequency is indeed an integer number of Mhz. #if defined(USB_CLK_KHZ) && !defined(USB_CLK_MHZ) && (USB_CLK_KHZ % 1000 == 0) #define USB_CLK_MHZ (USB_CLK_KHZ / 1000) #endif #define ACCESSCTRL_PASSWORD_BITS _u(0xacce0000) #define POWMAN_PASSWORD_BITS _u(0x5afe0000) #ifdef __riscv // Note the soft-table dispatch code is between the hard and soft vector // tables, as it's inlined into the last slot of the hard table: #if defined(__riscv_c) || defined(__riscv_zca) // RISC-V with compressed instructions: NOTE that this is dependent on the size of the code in crt0_riscv.S #define VTABLE_FIRST_IRQ 0x34 /* ... */#else // RISC-V without compressed instructions: #define VTABLE_FIRST_IRQ 0x48 /* ... */#endif/* ... */ #else // Armv8-M: #define VTABLE_FIRST_IRQ 16 /* ... */#endif #define FIRST_USER_IRQ (NUM_IRQS - NUM_USER_IRQS) /* ... */ #endif
Details