2022-07-01 01:17:04 -07:00
|
|
|
#include "port_shared.h"
|
|
|
|
|
|
|
|
// board-specific stuff shared between bootloader and firmware
|
|
|
|
|
2023-03-15 18:07:31 -07:00
|
|
|
static const CANConfig canConfig500 =
|
2022-07-01 01:17:04 -07:00
|
|
|
{
|
|
|
|
CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP,
|
|
|
|
/*
|
2022-12-22 08:08:03 -08:00
|
|
|
For 32MHz http://www.bittiming.can-wiki.info/ gives us Pre-scaler=4, Seq 1=13 and Seq 2=2. Subtract '1' for register values
|
2022-07-01 01:17:04 -07:00
|
|
|
*/
|
2022-12-22 08:08:03 -08:00
|
|
|
CAN_BTR_SJW(0) | CAN_BTR_BRP(4 - 1) | CAN_BTR_TS1(13 - 1) | CAN_BTR_TS2(2 - 1),
|
2022-07-01 01:17:04 -07:00
|
|
|
};
|
2023-03-15 18:07:31 -07:00
|
|
|
|
|
|
|
const CANConfig& GetCanConfig() {
|
|
|
|
return canConfig500;
|
|
|
|
}
|