Fixes for CAN init on T41
This commit is contained in:
parent
a4eed5f3e3
commit
2de331bb9c
|
@ -7,9 +7,12 @@
|
|||
#include "timers.h"
|
||||
#include "comms_secondary.h"
|
||||
|
||||
/*
|
||||
//These are declared locally in comms_CAN now due to this issue: https://github.com/tonton81/FlexCAN_T4/issues/67
|
||||
FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> Can0;
|
||||
FlexCAN_T4<CAN2, RX_SIZE_256, TX_SIZE_16> Can1;
|
||||
FlexCAN_T4<CAN3, RX_SIZE_256, TX_SIZE_16> Can2;
|
||||
*/
|
||||
|
||||
static void PIT_isr();
|
||||
static void TMR1_isr(void);
|
||||
|
|
|
@ -172,10 +172,13 @@
|
|||
#define SECONDARY_SERIAL_T HardwareSerial
|
||||
|
||||
#include <FlexCAN_T4.h>
|
||||
/*
|
||||
//These are declared locally in comms_CAN now due to this issue: https://github.com/tonton81/FlexCAN_T4/issues/67
|
||||
extern FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> Can0;
|
||||
extern FlexCAN_T4<CAN2, RX_SIZE_256, TX_SIZE_16> Can1;
|
||||
extern FlexCAN_T4<CAN3, RX_SIZE_256, TX_SIZE_16> Can2;
|
||||
//#define NATIVE_CAN_AVAILABLE //Disable for now as it causes lockup
|
||||
*/
|
||||
#define NATIVE_CAN_AVAILABLE //Disable for now as it causes lockup
|
||||
|
||||
#endif //CORE_TEENSY
|
||||
#endif //TEENSY41_H
|
||||
|
|
|
@ -17,11 +17,10 @@ CAN_message_t inMsg;
|
|||
CAN_message_t outMsg;
|
||||
|
||||
//These are declared locally for Teensy due to this issue: https://github.com/tonton81/FlexCAN_T4/issues/67
|
||||
#if defined(CORE_TEENSY35) // use for Teensy 3.5 only
|
||||
#if defined(CORE_TEENSY35) || defined(CORE_TEENSY36) // use for Teensy 3.5/3.6 only
|
||||
FlexCAN_T4<CAN0, RX_SIZE_256, TX_SIZE_16> Can0;
|
||||
#elif defined(CORE_TEENSY41) // use for Teensy 3.6 only
|
||||
FlexCAN_T4<CAN0, RX_SIZE_256, TX_SIZE_16> Can0;
|
||||
FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> Can1;
|
||||
#elif defined(CORE_TEENSY41) // use for Teensy 4.1 only
|
||||
FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> Can0;
|
||||
#endif
|
||||
|
||||
// Forward declare
|
||||
|
|
|
@ -1539,7 +1539,7 @@ void setPinMapping(byte boardID)
|
|||
|
||||
pinTrigger = 20; //The CAS pin
|
||||
pinTrigger2 = 21; //The Cam Sensor pin
|
||||
pinTrigger3 = 23;
|
||||
pinTrigger3 = 24;
|
||||
|
||||
pinStepperDir = 34;
|
||||
pinStepperStep = 35;
|
||||
|
|
Loading…
Reference in New Issue