Oct 08, 2013
05:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 08, 2013
05:11 AM
XMC4500F100K1024 AB:
I am a bit at a loss trying to set up a CAN RX FIFO.
DAVE App CAN001[1.0.8] have no setting for this, and none of the examples in the example library seems to provide an example.
I already have a CAN node running with 1 LMO for TX and 1 for RX, but we are experiencing packet loss, and would like to set up a RX FIFO of say 32 LMOs.
1 LMO for TX is fine.
Could you please provide some example code for this?
Cheers
I am a bit at a loss trying to set up a CAN RX FIFO.
DAVE App CAN001[1.0.8] have no setting for this, and none of the examples in the example library seems to provide an example.
I already have a CAN node running with 1 LMO for TX and 1 for RX, but we are experiencing packet loss, and would like to set up a RX FIFO of say 32 LMOs.
1 LMO for TX is fine.
Could you please provide some example code for this?
Cheers
- Tags:
- IFX
10 Replies
Oct 10, 2013
12:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
12:25 AM
Hi OMR,
you are right DAVE 3 CAN apps does not support receive FIFO at the moment but there is plan for it. I will check if someone can contribute to this application.
you are right DAVE 3 CAN apps does not support receive FIFO at the moment but there is plan for it. I will check if someone can contribute to this application.
Attachments are accessible only for community members.
Oct 10, 2013
09:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
09:17 PM
Oct 11, 2013
12:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 11, 2013
12:53 AM
Thank you! 😮
Oct 17, 2013
05:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 17, 2013
05:00 AM
The sample code in the attachment assumes that messages are to be read out on a FIFO full event.
FIFO full monitoring is nice, but an example of how to set up and read MO data on a regular RX interrupt from the base MO would be even nicer 🙂
How should the RX irq routine ensure that it reads all available data in the FIFO?
How should the FIFO be set up so that it produces interrupts for each messages received?
When keeping my RX ISR as it was for 1 RX MO, using that MO as the FIFO base, I only receive an interrupt when the CUR pointer matches the base MO.
Any pointers here would be greatly appreciated.
FIFO full monitoring is nice, but an example of how to set up and read MO data on a regular RX interrupt from the base MO would be even nicer 🙂
How should the RX irq routine ensure that it reads all available data in the FIFO?
How should the FIFO be set up so that it produces interrupts for each messages received?
When keeping my RX ISR as it was for 1 RX MO, using that MO as the FIFO base, I only receive an interrupt when the CUR pointer matches the base MO.
Any pointers here would be greatly appreciated.
Oct 22, 2013
05:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 22, 2013
05:27 AM
I now have a working solution for a RX ring-buffer using 31 MOs.
The multiCan HW solution to this is only partly implementing a FIFO as such. Its more like a ring buffer that needs a lot of administration in SW.
PM me if anyone is interested.
Cheers
The multiCan HW solution to this is only partly implementing a FIFO as such. Its more like a ring buffer that needs a lot of administration in SW.
PM me if anyone is interested.
Cheers
Not applicable
Dec 02, 2013
05:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 02, 2013
05:16 AM
Is there any example code for a CAN TX FIFO as well?
Not applicable
Jan 24, 2014
09:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 24, 2014
09:39 AM
Hello.
I'm very interested in a CAN RX-buffer to receive more than one message with one LMO. Is there a way to get this working? Or do I really need a MO for each CAN RX?
At the moment I'm trying to store about 3 RX messages into a 3x8 array but the NVIC-Eventhandler only stores the last one.
Thanks a lot!
UPDATE:
Here is a snipped out of my working solution:
I'm very interested in a CAN RX-buffer to receive more than one message with one LMO. Is there a way to get this working? Or do I really need a MO for each CAN RX?
At the moment I'm trying to store about 3 RX messages into a 3x8 array but the NVIC-Eventhandler only stores the last one.
Thanks a lot!
UPDATE:
Here is a snipped out of my working solution:
CAN001_MessageHandleType CanRecMsgObj;
uint8_t CanRecHeartbeatState[8];
uint8_t array_CanRec[30][8]; // 30 = messages that can be stored
int CAN_counter; // has to be set to "0" somewhere in the code after 30 messages have been received!!!
// NVIC-Interrupt für Message-Objekt LMO1 (Receive)
void EventHandlerCAN()
{
if(CAN001_GetMOFlagStatus(&CAN001_Handle0,1,RECEIVE_PENDING) == CAN_SET)
{
// Antwort erhalten, Flag löschen
CAN001_ClearMOFlagStatus(&CAN001_Handle0,1,RECEIVE_PENDING);
// Inhalt von LMO1 in CanRecMsgObj speichern
CAN001_ReadMsgObj(&CAN001_Handle0,&CanRecMsgObj,1);
if (CanRecMsgObj.Identifier==0xXXX) // Message mit ID XXX
{
// jede CAN-Antwort aus CanRecMsgObj ins array_CanRec kopieren
memmove(array_CanRec[CAN_counter],CanRecMsgObj.data,CanRecMsgObj.DataLength);
CAN_counter++; // Array wird nacheinander befüllt
IO003_TogglePort(IO003_Handle1,1); // Empfang einer CAN-Antwort: LED1 P1.1 an/aus
}
if(CanRecMsgObj.Identifier==0xYYY) // Message mit ID YYY
{
memmove(CanRecHeartbeatState,CanRecMsgObj.data,CanRecMsgObj.DataLength);
IO003_TogglePort(IO003_Handle2,1); // mit LED2 P1.0 an/aus quittieren
}
}
}
Not applicable
Mar 04, 2014
03:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 04, 2014
03:24 AM
Hello OMR
How can I have a look at it?
Grüße
OMR wrote:
I now have a working solution for a RX ring-buffer using 31 MOs.
The multiCan HW solution to this is only partly implementing a FIFO as such. Its more like a ring buffer that needs a lot of administration in SW.
PM me if anyone is interested.
Cheers
How can I have a look at it?
Grüße
Not applicable
Mar 22, 2015
11:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 22, 2015
11:39 PM
Hi..OMR,
May I get your Working RX FIFO ...source code...with 32 MOs..??
May I get your Working RX FIFO ...source code...with 32 MOs..??
Mar 23, 2015
12:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 23, 2015
12:35 AM