fix: update prescaler and other configs to change CAN speed to 250kbps

stable
Rakshita 2024-12-30 16:57:18 +05:30
parent 668462eff5
commit bd226465f7
1 changed files with 35 additions and 18 deletions

View File

@ -146,26 +146,43 @@ static DL_MCAN_BitTimingParams gMCAN0BitTimes_500 = {
.dataSynchJumpWidth = 0, .dataSynchJumpWidth = 0,
}; };
static DL_MCAN_BitTimingParams gMCAN0BitTimes_250 = { //static DL_MCAN_BitTimingParams gMCAN0BitTimes_250 = {
/* Arbitration Baud Rate Pre-scaler. */ // /* Arbitration Baud Rate Pre-scaler. */
.nomRatePrescalar = 0, // .nomRatePrescalar = 0,
/* Arbitration Time segment before sample point. */ // /* Arbitration Time segment before sample point. */
.nomTimeSeg1 = 138, // .nomTimeSeg1 = 138,
/* Arbitration Time segment after sample point. */ // /* Arbitration Time segment after sample point. */
.nomTimeSeg2 = 19, // .nomTimeSeg2 = 19,
/* Arbitration (Re)Synchronization Jump Width Range. */ // /* Arbitration (Re)Synchronization Jump Width Range. */
.nomSynchJumpWidth = 19, // .nomSynchJumpWidth = 19,
/* Data Baud Rate Pre-scaler. */ // /* Data Baud Rate Pre-scaler. */
.dataRatePrescalar = 0, // .dataRatePrescalar = 0,
/* Data Time segment before sample point. */ // /* Data Time segment before sample point. */
.dataTimeSeg1 = 0, // .dataTimeSeg1 = 0,
/* Data Time segment after sample point. */ // /* Data Time segment after sample point. */
.dataTimeSeg2 = 0, // .dataTimeSeg2 = 0,
/* Data (Re)Synchronization Jump Width. */ // /* Data (Re)Synchronization Jump Width. */
.dataSynchJumpWidth = 0, // .dataSynchJumpWidth = 0,
//};
static const DL_MCAN_BitTimingParams gMCAN0BitTimes_250 = {
/* Arbitration Baud Rate Pre-scaler. */
.nomRatePrescalar = 0,
/* Arbitration Time segment before sample point. */
.nomTimeSeg1 = 82,
/* Arbitration Time segment after sample point. */
.nomTimeSeg2 = 11,
/* Arbitration (Re)Synchronization Jump Width Range. */
.nomSynchJumpWidth = 11,
/* Data Baud Rate Pre-scaler. */
.dataRatePrescalar = 0,
/* Data Time segment before sample point. */
.dataTimeSeg1 = 0,
/* Data Time segment after sample point. */
.dataTimeSeg2 = 0,
/* Data (Re)Synchronization Jump Width. */
.dataSynchJumpWidth = 0,
}; };
static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem1 = { static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem1 = {
.sfec = 001, .sfec = 001,
.sft = 0x00, .sft = 0x00,