Skip to content

Commit

Permalink
Teensy 4.1 boot speed optimisations
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed Nov 22, 2024
1 parent 95664ba commit 0898043
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ framework=arduino
lib_deps = EEPROM, FlexCAN_T4, Time, SimplyAtomic
test_build_src = yes
test_ignore = test_table3d_native
build_flags = -DTEENSY_INIT_USB_DELAY_AFTER=40

;STM32 Official core
[env:black_F407VE]
Expand Down
3 changes: 3 additions & 0 deletions speeduino/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ void initialiseAll(void)
if(configPage13.onboard_log_file_style) { initSD(); }
#endif

//Teensy 4.1 does not require .begin() to be called. This introduces a 700ms delay on startup time whilst USB is enumerated if it is called
#ifndef CORE_TEENSY41
Serial.begin(115200);
#endif
pPrimarySerial = &Serial; //Default to standard Serial interface
BIT_SET(currentStatus.status4, BIT_STATUS4_ALLOW_LEGACY_COMMS); //Flag legacy comms as being allowed on startup

Expand Down

0 comments on commit 0898043

Please sign in to comment.