CAN FD work do not work IDs bigger then 7FF

CAN FD Interface for High-Speed USB 2.0
Post Reply
Ales1000
Posts: 10
Joined: Fri 4. Oct 2019, 09:01

CAN FD work do not work IDs bigger then 7FF

Post by Ales1000 » Fri 4. Oct 2019, 09:11

Hello,

I am able to send CAN FD message until 0x7FF, send CAN messages with extended framr with 29 bit ID but I have troubles when sending IDs bigger then 11bit when sending CAN FD messages (type=PCAN_MESSAGE_FD). It returns this ERROR

(For sending I naturally USE FD methods CAN_InitializeFD,CAN_WriteFD)

Error number (dec):32768 (hex):8000
A parameter contains an invalid value

I found out that this is happens when I am trying to insert bigger ID than 0x7FF.


In PCANBasic.h I see, that message types are:

// PCAN message types
//
#define PCAN_MESSAGE_STANDARD 0x00U // The PCAN message is a CAN Standard Frame (11-bit identifier)
#define PCAN_MESSAGE_RTR 0x01U // The PCAN message is a CAN Remote-Transfer-Request Frame
#define PCAN_MESSAGE_EXTENDED 0x02U // The PCAN message is a CAN Extended Frame (29-bit identifier)
#define PCAN_MESSAGE_FD 0x04U // The PCAN message represents a FD frame in terms of CiA Specs
#define PCAN_MESSAGE_BRS 0x08U // The PCAN message represents a FD bit rate switch (CAN data at a higher bit rate)
#define PCAN_MESSAGE_ESI 0x10U // The PCAN message represents a FD error state indicator(CAN FD transmitter was error active)
#define PCAN_MESSAGE_ERRFRAME 0x40U // The PCAN message represents an error frame
#define PCAN_MESSAGE_STATUS 0x80U // The PCAN message represents a PCAN status message

I was trying to send message of type PCAN_MESSAGE_FD and that returned error above.

Thank you for your response.

G.Lang
Support
Support
Posts: 139
Joined: Wed 22. Sep 2010, 14:58

Re: CAN FD work do not work IDs bigger then 7FF

Post by G.Lang » Fri 4. Oct 2019, 11:32

Hi,

please use both message types

#define PCAN_MESSAGE_EXTENDED 0x02U // The PCAN message is a CAN Extended Frame (29-bit identifier)
#define PCAN_MESSAGE_FD 0x04U // The PCAN message represents a FD frame in terms of CiA Specs
pcanbasic_help.png
pcanbasic_help.png (90 KiB) Viewed 947 times
regards
Gunther

Post Reply