File tree Expand file tree Collapse file tree 4 files changed +16
-13
lines changed Expand file tree Collapse file tree 4 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 44
44
#define DEFAULT_UART_BUS_RX (&pin_PA01)
45
45
#define DEFAULT_UART_BUS_TX (&pin_PA00)
46
46
47
- #define BOARD_BROWNOUT_LEVEL (6)
47
+ #define SAMD21_BOD33_LEVEL (6)
Original file line number Diff line number Diff line change 41
41
#define IGNORE_PIN_PB10 1
42
42
#define IGNORE_PIN_PB11 1
43
43
44
- #define BOARD_BROWNOUT_LEVEL (6)
45
- // 1.6V
44
+ #define SAMD5x_E5x_BOD33_LEVEL (100)
Original file line number Diff line number Diff line change 112
112
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
113
113
#endif
114
114
115
- #ifndef BOARD_BROWNOUT_LEVEL (
116
- #define BOARD_BROWNLOUT_LEVEL (39)
115
+ #ifndef SAMD21_BOD33_LEVEL
116
+ // Set brownout detection to ~2.7V. Default from factory is 1.7V,
117
+ // which is too low for proper operation of external SPI flash chips
118
+ // (they are 2.7-3.6V).
119
+ #define SAMD21_BOD33_LEVEL (39)
117
120
// 2.77V with hysteresis off. Table 37.20 in datasheet.
118
121
#endif
119
122
134
137
#define CIRCUITPY_DEFAULT_STACK_SIZE (24*1024)
135
138
#endif
136
139
137
- #ifndef BOARD_BROWNOUT_LEVEL (
138
- #define BOARD_BROWNLOUT_LEVEL (200)
140
+ #ifndef SAMD5x_E5x_BOD33_LEVEL
141
+ // Set brownout detection to ~2.7V. Default from factory is 1.7V,
142
+ // which is too low for proper operation of external SPI flash chips
143
+ // (they are 2.7-3.6V).
144
+ #define SAMD5x_E5x_BOD33_LEVEL (200)
139
145
// 2.7V: 1.5V + LEVEL * 6mV.
140
146
#endif
141
147
Original file line number Diff line number Diff line change @@ -206,11 +206,10 @@ static void rtc_init(void) {
206
206
safe_mode_t port_init (void ) {
207
207
#if defined(SAMD21 )
208
208
209
- // Set brownout detection. Default from factory is 1.7V,
210
- // which is too low for proper operation of external SPI flash chips (they are 2.7-3.6V).
209
+ // Set brownout detection.
211
210
// Disable while changing level.
212
211
SYSCTRL -> BOD33 .bit .ENABLE = 0 ;
213
- SYSCTRL -> BOD33 .bit .LEVEL = BOARD_BROWNOUT_LEVEL ;
212
+ SYSCTRL -> BOD33 .bit .LEVEL = SAMD21_BOD33_LEVEL ;
214
213
SYSCTRL -> BOD33 .bit .ENABLE = 1 ;
215
214
216
215
#ifdef ENABLE_MICRO_TRACE_BUFFER
@@ -225,11 +224,10 @@ safe_mode_t port_init(void) {
225
224
#endif
226
225
227
226
#if defined(SAM_D5X_E5X )
228
- // Set brownout detection to ~2.7V. Default from factory is 1.7V,
229
- // which is too low for proper operation of external SPI flash chips (they are 2.7-3.6V).
227
+ // Set brownout detection.
230
228
// Disable while changing level.
231
229
SUPC -> BOD33 .bit .ENABLE = 0 ;
232
- SUPC -> BOD33 .bit .LEVEL = BOARD_BROWNOUT_LEVEL ;
230
+ SUPC -> BOD33 .bit .LEVEL = SAMD5x_E5x_BOD33_LEVEL ;
233
231
SUPC -> BOD33 .bit .ENABLE = 1 ;
234
232
235
233
// MPU (Memory Protection Unit) setup.
You can’t perform that action at this time.
0 commit comments