Move Teensy35 CAN init. Fixes #456

This commit is contained in:
Josh Stewart 2020-09-18 12:42:24 +10:00
parent ffa6054e37
commit 05f6da9e4a
3 changed files with 11 additions and 11 deletions

View File

@ -3281,7 +3281,7 @@ menuDialog = main
dialog = serial3IO, "Secondary Serial IO interface"
topicHelp = "http://speeduino.com/wiki/index.php/Serial3_IO_interface"
field = "Enable Second Serial", enable_secondarySerial
field = "Enable Internal Canbus", enable_intcan {intcan_available}
field = "Enable Internal Canbus", enable_intcan
; field = "Speeduino TsCanId", speeduino_tsCanId
field = "True Canbus Address", true_address {enable_secondarySerial||enable_intcan}
field = "NOTE! Realtime Data Base Address MUST be at least 0x16 GREATER than the True Address as they are reserved for future expansion"

View File

@ -43,7 +43,16 @@ void initialiseAll()
//STM32 can not currently enabled
#endif
#if defined(CORE_TEENSY35)
configPage9.intcan_available = 1; // device has internal canbus
configPage9.intcan_available = 1; // device has internal canbus
//Teensy uses the Flexcan_T4 library to use the internal canbus
//enable local can interface
//setup can interface to 500k
//Can0.setTX(3);
//Can0.setRX(4);
Can0.begin();
Can0.setBaudRate(500000);
Can0.enableFIFO();
#endif
loadConfig();

View File

@ -83,15 +83,6 @@ void setup()
{
initialisationComplete = false; //Tracks whether the initialiseAll() function has run completely
initialiseAll();
#if defined(CORE_TEENSY35)
//Teensy uses the Flexcan_T4 library to use the internal canbus
//enable local can interface
//setup can interface to 500k
Can0.begin();
Can0.setBaudRate(500000);
Can0.enableFIFO();
#endif
}
void loop()