Jul 29, 2014
09:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2014
09:49 AM
I am testing the CAN001App using external transceiver. Using the example, I am running on Main every 50 ms:
CAN001_UpdateMODataRegisters(&CAN001_Handle0,1,8,Data);
/* Send Data frame with ID 0x255 on chip internal CAN bus (Loop-Back Mode) */
CAN001_SendDataFrame(&CAN001_Handle0,1); //
I am not able to see any activity on Pin 1.9 (TX).
Any suggestions how to check the CAN001App /?
Thanks
CAN001_UpdateMODataRegisters(&CAN001_Handle0,1,8,Data);
/* Send Data frame with ID 0x255 on chip internal CAN bus (Loop-Back Mode) */
CAN001_SendDataFrame(&CAN001_Handle0,1); //
I am not able to see any activity on Pin 1.9 (TX).
Any suggestions how to check the CAN001App /?
Thanks
- Tags:
- IFX
7 Replies
Not applicable
Jul 30, 2014
01:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 30, 2014
01:08 AM
Hi Jean Paul,
The simplest way to check the CAN001 App is just using CAN001_Example1. Un-check the "Enable Look Back mode" in CAN001_0 "CAN Configuration" tab. Generate code, compile, download and run. Make sure the external CAN Transceivers is connected. If you have XMC4500 CPU card and COM card, try it. The CAN_ Rx & Tx is assigned to P1.8 & 1.9.
BR,
Zain
The simplest way to check the CAN001 App is just using CAN001_Example1. Un-check the "Enable Look Back mode" in CAN001_0 "CAN Configuration" tab. Generate code, compile, download and run. Make sure the external CAN Transceivers is connected. If you have XMC4500 CPU card and COM card, try it. The CAN_ Rx & Tx is assigned to P1.8 & 1.9.
BR,
Zain
Jul 31, 2014
02:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 31, 2014
02:23 AM
Zain
Thanks for the suggestions. I was able to transmit data but I have another question which I had been reading in other posts about transmitting/receiving a CAN packet in the same LM0X. I changed the acceptance mask to 0 but it didn't work.
My ISR looks like:
void EventHandlerCAN001_0()
{
/* Check transmit pending status in LMO1 */
if(CAN001_GetMOFlagStatus(&CAN001_Handle0,1,TRANSMIT_PENDING) == CAN_SET)
{
/* Clear the flag */
CAN001_ClearMOFlagStatus(&CAN001_Handle0,1,TRANSMIT_PENDING);
}
if(CAN001_GetMOFlagStatus(&CAN001_Handle0,1,RECEIVE_PENDING) == CAN_SET)
{
/* Clear the flag */
CAN001_ClearMOFlagStatus(&CAN001_Handle0,1,RECEIVE_PENDING);
/* Read the received Message object and stores in variable CanRecMsgObj */
CAN001_ReadMsgObj(&CAN001_Handle0,&CanRecMsgObj,1);
}
}
I have connected the RX/TX Events to the NVC002 App for interrupt but I only got interrupts for the TX process. My CAN001 App looks like:
Thanks for the suggestions. I was able to transmit data but I have another question which I had been reading in other posts about transmitting/receiving a CAN packet in the same LM0X. I changed the acceptance mask to 0 but it didn't work.
My ISR looks like:
void EventHandlerCAN001_0()
{
/* Check transmit pending status in LMO1 */
if(CAN001_GetMOFlagStatus(&CAN001_Handle0,1,TRANSMIT_PENDING) == CAN_SET)
{
/* Clear the flag */
CAN001_ClearMOFlagStatus(&CAN001_Handle0,1,TRANSMIT_PENDING);
}
if(CAN001_GetMOFlagStatus(&CAN001_Handle0,1,RECEIVE_PENDING) == CAN_SET)
{
/* Clear the flag */
CAN001_ClearMOFlagStatus(&CAN001_Handle0,1,RECEIVE_PENDING);
/* Read the received Message object and stores in variable CanRecMsgObj */
CAN001_ReadMsgObj(&CAN001_Handle0,&CanRecMsgObj,1);
}
}
I have connected the RX/TX Events to the NVC002 App for interrupt but I only got interrupts for the TX process. My CAN001 App looks like:
Not applicable
Aug 03, 2014
10:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 03, 2014
10:13 PM
Hi Jean Paul,
With referring to Forum thread "CAN001 tx/rx LMO problems", the proper way to configure a single LMO to both transmit and receive is:
1) To receive a data frame <- configure LMO as a Rx object
2) To send a data frame <- configure LMO as a Tx object
BR,
Zain
With referring to Forum thread "CAN001 tx/rx LMO problems", the proper way to configure a single LMO to both transmit and receive is:
1) To receive a data frame <- configure LMO as a Rx object
2) To send a data frame <- configure LMO as a Tx object
BR,
Zain
Aug 04, 2014
12:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 04, 2014
12:39 AM
Zain
Thanks for your reply. I was able to get it working with your suggestion. Something I would like to know is the following :
Using CAN001 App in polling mode. Which register should I use to check if there is a new TX or Rx CAN message pending?
Is it possible to know how many CAN messages can be buffered using this app? Just in case if it takes some time to run the check on polling mode for a new message.
Thanks for your reply. I was able to get it working with your suggestion. Something I would like to know is the following :
Using CAN001 App in polling mode. Which register should I use to check if there is a new TX or Rx CAN message pending?
Is it possible to know how many CAN messages can be buffered using this app? Just in case if it takes some time to run the check on polling mode for a new message.
Not applicable
Aug 05, 2014
12:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 05, 2014
12:26 AM
Hi Jean Paul,
You can use CAN001_GetMOFlagStatus() API which is checking Message Object n Status Register MOSTATn.
Unfortunately there is no FIFO buffer function provided in the App.
BR,
Zain
You can use CAN001_GetMOFlagStatus() API which is checking Message Object n Status Register MOSTATn.
Unfortunately there is no FIFO buffer function provided in the App.
BR,
Zain
Aug 06, 2014
11:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 06, 2014
11:37 AM
Zain
Thanks for the feedback. Wondering if I should use the native CAN registers to setup a FIFO or create one abode CAN001 App. Were you able to setup a CAN fifo on the XMC4500 family MCU?
Thanks for the feedback. Wondering if I should use the native CAN registers to setup a FIFO or create one abode CAN001 App. Were you able to setup a CAN fifo on the XMC4500 family MCU?
Not applicable
Aug 07, 2014
01:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 07, 2014
01:15 AM
Hi Jean Paul,
From the RM (Reference Manual) I understand that you can combine message objects to setup a FIFO buffer. Sorry I didn't try it before. Perhaps you can make a try and share your results.
BR,
Zain
From the RM (Reference Manual) I understand that you can combine message objects to setup a FIFO buffer. Sorry I didn't try it before. Perhaps you can make a try and share your results.
BR,
Zain