sinai1
Junior Member

Posts: 65
|
CAN FD
Jan 25, 2021 13:53:03 GMT
Post by sinai1 on Jan 25, 2021 13:53:03 GMT
Can please share a example of CAN FD for arduino?
|
|
|
CAN FD
Jan 27, 2021 8:50:04 GMT
Post by Admin on Jan 27, 2021 8:50:04 GMT
Support for CAN FD is on the wish list. The ShieldBuddy TC375 hardware will support this and the ShieldBuddy TC275 with DC-step silicon is also compatible. The existing CAN driver for the Arduino IDE add-in is based on the Infineon iLLD driver. There is a CAN FD version of the iLLD driver so it would be possible to extend the existing Arduino-style basic CAN driver to support FD. MulticanFdDemo.zip (13.81 KB) MultiCAN.cpp (21.01 KB) MultiCAN.h (4.27 KB)
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Feb 12, 2021 18:31:22 GMT
Post by sinai1 on Feb 12, 2021 18:31:22 GMT
Hi. Me again
When i try to compile I get this error:
TC275-Base-Arduino:140: error: undefined reference to `g_MulticanFd'
//******************************************************************************************************************** //Setup for Core2, //******************************************************************************************************************** void setup2() { //Wait Serial debug to Init delay(200);
/* create module config */ IfxMultican_Can_Config canConfig; IfxMultican_Can_initModuleConfig(&canConfig, &MODULE_CAN);
/* initialize module */ IfxMultican_Can_initModule(&g_MulticanFd.drivers.can, &canConfig);
SerialASC.println("Prepare CAN Nodes\n");
/* create CAN node config */ IfxMultican_Can_NodeConfig canNodeConfig; IfxMultican_Can_Node_initConfig(&canNodeConfig, &g_MulticanFd.drivers.can); canNodeConfig.baudrate = 2000000; /* 2 MBaud */
/* Source Node */ { canNodeConfig.nodeId = IfxMultican_NodeId_0; canNodeConfig.rxPin = &IfxMultican_RXD0B_P20_7_IN; canNodeConfig.rxPinMode = IfxPort_InputMode_pullUp; canNodeConfig.txPin = &IfxMultican_TXD0_P20_8_OUT; canNodeConfig.txPinMode = IfxPort_OutputMode_pushPull;
canNodeConfig.flexibleDataRate = TRUE;
canNodeConfig.fdConfig.nominalBaudrate = 500000; canNodeConfig.fdConfig.nominalSynchJumpWidth = 8000; canNodeConfig.fdConfig.nominalSamplePoint = 2000; canNodeConfig.fdConfig.fastBaudrate = 2000000; canNodeConfig.fdConfig.fastSynchJumpWidth = 8000; canNodeConfig.fdConfig.fastSamplePoint = 2000; canNodeConfig.fdConfig.loopDelayOffset = 0;
IfxMultican_Can_Node_init(&g_MulticanFd.drivers.canSrcNode, &canNodeConfig); } //CAN Init ///CAN0_Init(500000); String_To_SerialDebug("CAN0 BUS init ok!"); //CAN3_Init(500000); String_To_SerialDebug("CAN3 BUS init ok!"); //TX CAN Messages CAN0_TxInit(0x100, 0x7FFFFFFFUL, 8, 11, 0); //RX CAN Messages //CAN3_RxInit(0x100, 0x7FFFFFFFUL, 8, 11, 1);
//Lin init lin0.begin(19200); String_To_SerialDebug("LIN0 BUS init ok!"); lin1.begin(19200); String_To_SerialDebug("LIN1 BUS init ok!");
}
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Feb 15, 2021 18:17:11 GMT
Post by sinai1 on Feb 15, 2021 18:17:11 GMT
My Mistake, I will use the example to add CANFD to the Global Library, it will take a while but please wait for it I will Share it in here.
|
|
|
CAN FD
Feb 16, 2021 8:42:27 GMT
Post by Admin on Feb 16, 2021 8:42:27 GMT
g_MulticanFd is something from the original iLLD demo program! It is not essential.
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Feb 24, 2021 22:39:42 GMT
Post by sinai1 on Feb 24, 2021 22:39:42 GMT
Questions:
1.- canMsgObjConfig.msgObjCount = 1; this is always 1?? 2.- canMsgObjConfig.control.topMsgObjId = 252; this ids need to be unique for each id msj like the msgObjId? canMsgObjConfig.control.bottomMsgObjId = 253; Same here and why 2 per message?
I find this on the coda so i understand that CANFD need 3 MsgObjts IDs. please confirm. IfxMultican_MsgObjId topMsgObjId; /**< \brief Specifies the ID of the message object with data byte 8 to 35. (CAN FD) */ IfxMultican_MsgObjId bottomMsgObjId; /**< \brief Specifies the ID of the message object with data byte 36 to 63. (CAN FD) */
Final Question in case my suspicion is rigth we are goind to need more IDs i can have more than 255 IDs on the NO_OFAVAILABLECANMESSAGESLOTS, wich is the maximun?
enum { MsgObject0, MsgObject1, MsgObject2, MsgObject3, MsgObject4, MsgObject5, MsgObject6, MsgObject7, MsgObject8, MsgObject9, MsgObject10, MsgObject11, MsgObject12, MsgObject13, MsgObject14, MsgObject15, MsgObject16, MsgObject17, MsgObject18, MsgObject19, MsgObject20, MsgObject21, MsgObject22, MsgObject23, MsgObject24, MsgObject25, MsgObject26, MsgObject27, MsgObject28, MsgObject29, MsgObject30, MsgObject31, MsgObject32, MsgObject33, MsgObject34, MsgObject35, MsgObject36, MsgObject37, MsgObject38, MsgObject39, MsgObject40, MsgObject41, MsgObject42, MsgObject43, MsgObject44, MsgObject45, MsgObject46, MsgObject47, MsgObject48, MsgObject49, MsgObject50, MsgObject51, MsgObject52, MsgObject53, MsgObject54, MsgObject55, MsgObject56, MsgObject57, MsgObject58, MsgObject59, MsgObject60, MsgObject61, MsgObject62, MsgObject63, MsgObject64, MsgObject65, MsgObject66, MsgObject67, MsgObject68, MsgObject69, MsgObject70, MsgObject71, MsgObject72, MsgObject73, MsgObject74, MsgObject75, MsgObject76, MsgObject77, MsgObject78, MsgObject79, MsgObject80, MsgObject81, MsgObject82, MsgObject83, MsgObject84, MsgObject85, MsgObject86, MsgObject87, MsgObject88, MsgObject89, MsgObject90, MsgObject91, MsgObject92, MsgObject93, MsgObject94, MsgObject95, MsgObject96, MsgObject97, MsgObject98, MsgObject99, MsgObject100, MsgObject101, MsgObject102, MsgObject103, MsgObject104, MsgObject105, MsgObject106, MsgObject107, MsgObject108, MsgObject109, MsgObject110, MsgObject111, MsgObject112, MsgObject113, MsgObject114, MsgObject115, MsgObject116, MsgObject117, MsgObject118, MsgObject119, MsgObject120, MsgObject121, MsgObject122, MsgObject123, MsgObject124, MsgObject125, MsgObject126, MsgObject127, NO_OFAVAILABLECANMESSAGESLOTS }; Example for Init:
void CAN0FD_RxInit(uint32 CAN_Id, uint32 AcceptanceMask, uint8 dlc, uint32 ExtFrame, IfxMultican_MsgObjId MsgObj_Id) { /* create CAN node config */ IfxMultican_Can_NodeConfig canNodeConfig; IfxMultican_Can_Node_initConfig(&canNodeConfig, &g_Multican.drivers.can); g_Multican.drivers.UserCanRxIds[MsgObj_Id] = CAN_Id; if (ExtFrame == 11) {
ExtFrame = FALSE;
} else {
ExtFrame = TRUE;
} /* create message object config */ canMsgObjConfig.msgObjCount = 1; canMsgObjConfig.control.topMsgObjId = 252; canMsgObjConfig.control.bottomMsgObjId = 253; /* Destination Message object */ { /* create message object config */ IfxMultican_Can_MsgObjConfig canMsgObjConfig; IfxMultican_Can_MsgObj_initConfig(&canMsgObjConfig, &g_Multican.drivers.canNode0); canMsgObjConfig.msgObjId = MsgObj_Id; canMsgObjConfig.messageId = CAN_Id; canMsgObjConfig.acceptanceMask = AcceptanceMask; canMsgObjConfig.frame = IfxMultican_Frame_receive; canMsgObjConfig.control.messageLen = IfxMultican_DataLengthCode_64; canMsgObjConfig.control.extendedFrame = ExtFrame; canMsgObjConfig.control.matchingId = TRUE;
canMsgObjConfig.control.fastBitRate = FALSE; /* fast bit rate enable/disable */ /* initialize message object */ IfxMultican_Can_MsgObj_init(&g_Multican.drivers.UserCanMessages[MsgObj_Id], &canMsgObjConfig); } }
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Feb 25, 2021 3:10:47 GMT
Post by sinai1 on Feb 25, 2021 3:10:47 GMT
I have a prebuilt of the library, please help me to review and answer the question of my previous post i assume some information but it compiles like a charm. regards Attachments:NewMultiCAN.rar (4.76 KB)
|
|
|
CAN FD
Feb 25, 2021 10:03:05 GMT
Post by dnicholls on Feb 25, 2021 10:03:05 GMT
Hi Sinai1, can you clarify which AURIX you are using, TC275 or TC375? The reason for asking is because the CAN module is completely different on the TC375.
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Feb 25, 2021 16:40:09 GMT
Post by sinai1 on Feb 25, 2021 16:40:09 GMT
Im Using TC275_Dx
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Mar 5, 2021 14:31:30 GMT
Post by sinai1 on Mar 5, 2021 14:31:30 GMT
Hi Admins any news about this, I have try it Connecting TX & RX pins but i have no signals on TC275 DC.
Regards.
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Apr 5, 2021 14:18:33 GMT
Post by sinai1 on Apr 5, 2021 14:18:33 GMT
Hello Admins. any news about this?
|
|
|
CAN FD
Apr 12, 2021 8:22:45 GMT
Post by Admin on Apr 12, 2021 8:22:45 GMT
We should soon have a tested example for this!
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Jun 24, 2021 13:08:26 GMT
Post by sinai1 on Jun 24, 2021 13:08:26 GMT
Dear Admins, do we have any news or example?
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Jul 12, 2021 14:11:32 GMT
Post by sinai1 on Jul 12, 2021 14:11:32 GMT
Hi Admins, any answer about this?
|
|
sinai1
Junior Member

Posts: 65
|
CAN FD
Sept 21, 2021 13:22:43 GMT
Post by sinai1 on Sept 21, 2021 13:22:43 GMT
Any news?
|
|