Page 1 of 1
BRS bit not set for routed CAN FD messages
Posted: Thu 6. Oct 2022, 18:50
by ugandham
I am able to route the messages from CAN to CAN FD but the BRS bit of my routed CAN to CAN FD messages are not set to 1.
Could you please help me with that?
Re: BRS bit not set for routed CAN FD messages
Posted: Fri 7. Oct 2022, 09:18
by PEAK-Support
If you want to send on the CAN-FD Bus Frames, that use
BRS, you need to setup the Device with two differnet Bitrates (Nominal and Data)
For example
Code: Select all
// timings for CAN1 and CAN2
static const CANTiming_t Timing_CANx[2] = {
_80M_500K_80____4M_80_ISO, // CAN1
_80M_500K_80____4M_80_ISO // CAN2
};
CAN_Initialize ( CAN_BUS1, &Timing_CANx[CAN_BUS1]);
CAN_Initialize ( CAN_BUS2, &Timing_CANx[CAN_BUS2]);
and set the MSG-Type Bit of the CAN Frame you want send, with the needed Flags (FD Frame Flag and Bit Rate Switch Flag):
Code: Select all
RxMsg.msgtype = CAN_MSGTYPE_FDF | CAN_MSGTYPE_BRS;
See Sample
..\Hardware\PCAN-Router_FD\Examples\10_CAN_FD\src\main.c
Re: BRS bit not set for routed CAN FD messages
Posted: Sat 8. Oct 2022, 18:02
by ugandham
I have made the changes and it's working now. Thank you so much for the quick response
Re: BRS bit not set for routed CAN FD messages
Posted: Sat 8. Oct 2022, 18:29
by PEAK-Support
solved - topic closed
