Hi ,
I have been developing code for CAN driver upon the Base SDK Code for my project ,I have configured my Reception through an interrupt and transmitting data outside through normal transfer function ,but when ever I send the data out of CAN I am receiving back again the same message as an interrupt to the Message buffer I configured for different Message ID ,and also whenever I send data to controller (Using PCAN) it is being received by only single MB(MB 2)which is configured for different Message ID .request to help me solving this .
Note: Configured for individual Mask ,Baud : 500K and Max MB 24 apart from Default Configuration .
CAN.C and CAN.h file attached below.
Hi,
I have configured to a Global filter ,i have found that CAN is having problem in syncing to the bus while operating only in RTOS Mode , CAN is absolutely working fine in normal mode ,
i have found that inside API FLEXCAN_Init ESR1 register value must be updated to value (262272),which indicates CAN synchronised to CAN bus and Bus state as IDLE,but in RTOS mode ESR1 value is absolutely ZERO(0). and DB1 register is also not updating for the same synchronisation issue.
i'm presuming this might be the issue of clock synchronisation.
Thank you .
Hi ,
Yes I am initialising it before the start of scheduler,
And I found while debugging comparing with the normal CAN driver code and freertos CAN driver code ,ESR1 and DBG1 register is not being updated after it leaves the freezemode in RTOs but updated in Normal driver code ,if you are willing can we connect through WebEx or skype call ?
Get Outlook for Android<https://aka.ms/ghei36>
L&T Technology Services Ltd
L&T Technology Services Limited (LTTS) is committed to safeguard your data privacy. For more information to view our commitment towards data privacy under GDPR, please visit the privacy policy on our website www.Ltts.com. This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
Hi,
I am using MIMXRT1020 EVK board .
Get Outlook for Android<https://aka.ms/ghei36>
Hello Dhanush,
In the files you sent, there aren't the Flexcan configurations but I think this could be to two of the next reasons:
In the FLEXCAN_GetDefaultConfig(&flexcanConfig) there are two fields that could cause this kind of behavior to be sure that is as the following ones:
flexcanConfig.enableLoopBack = false;
flexcanConfig.disableSelfReception = true;
Best Regards,
Alexis Andalon
Hi ,
Thank you for your kind response ,
I have disabled transmit and I am trying only for reception ,
i have configured for CAN individual Mask ,
configured Message buffer 2 for ID 0X01,MB3 for ID 0X02,MB4 for ID 0X03 but when ever i send message (using P-CAN)i am receiving it from MB2 irrespective of Message ID .
Attached P-CAN image for your reference .
I presume it may be because of Masking issue ?
Hi,
I have configured to a Global filter ,i have found that CAN is having problem in syncing to the bus while operating only in RTOS Mode , CAN is absolutely working fine in normal mode ,
i have found that inside API FLEXCAN_Init ESR1 register value must be updated to value (262272),which indicates CAN synchronised to CAN bus and Bus state as IDLE,but in RTOS mode ESR1 value is absolutely ZERO(0). and DB1 register is also not updating for the same synchronisation issue.
i'm presuming this might be the issue of clock synchronisation.
Thank you .