File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
ports/atmel-samd/supervisor Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1020,8 +1020,12 @@ int __attribute__((used)) main(void) {
10201020 // initialise the cpu and peripherals
10211021 set_safe_mode (port_init ());
10221022
1023+ // All ports need pins reset, after never-reset pins are marked in port_init();
1024+ reset_all_pins ();
1025+
10231026 port_heap_init ();
10241027
1028+
10251029 // Turn on RX and TX LEDs if we have them.
10261030 init_rxtx_leds ();
10271031
Original file line number Diff line number Diff line change @@ -339,11 +339,9 @@ safe_mode_t port_init(void) {
339339 init_shared_dma ();
340340
341341 // Reset everything into a known state before board_init.
342+ // Pins are reset in main() after this routine returns.
342343 reset_port ();
343344
344- // Reset the pins too.
345- reset_all_pins ();
346-
347345 #ifdef SAMD21
348346 if (PM -> RCAUSE .bit .BOD33 == 1 || PM -> RCAUSE .bit .BOD12 == 1 ) {
349347 return SAFE_MODE_BROWNOUT ;
You can’t perform that action at this time.
0 commit comments