BRS bit not set for routed CAN FD messages

Universal Programmable Converter for CAN FD and CAN
Locked
ugandham
Posts: 3
Joined: Mon 13. Jun 2022, 17:41

BRS bit not set for routed CAN FD messages

Post by ugandham » Thu 6. Oct 2022, 18:50

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?

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: BRS bit not set for routed CAN FD messages

Post by PEAK-Support » Fri 7. Oct 2022, 09:18

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
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

ugandham
Posts: 3
Joined: Mon 13. Jun 2022, 17:41

Re: BRS bit not set for routed CAN FD messages

Post by ugandham » Sat 8. Oct 2022, 18:02

I have made the changes and it's working now. Thank you so much for the quick response

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: BRS bit not set for routed CAN FD messages

Post by PEAK-Support » Sat 8. Oct 2022, 18:29

solved - topic closed ;)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Locked