Tool/software:
Hi,
I am using LAUNCHXL-F28379D for CAN communication .
I have used the example code - can_ex2_loopback_interrupts in which i have bypassed all the interrupts by commenting them and configuring CAN_setupMessageObject with CAN_MSG_OBJ_NO_FLAGS so that no interrupts are enabled.
I tried to send CANOpen SDO packet without using interrupts and probed CAN_H and CAN_L. I observed that the SDO packet is transmitted only after coming out of main function and also it is transmitted continuously although no while loop or infinite for loop is inside main function and no interrupts are being called and same behavior in other example codes also. Also on sending various other functions such as NMT handle and PDO configuring packets are transmitted multiple times which cause issue in CANOpen implementation .
I want to send packets one by one as I have to implement full CAN Open protocol and also why packets are sent only after coming out of main loop , why not immediately after function call and due to this there is issue in CANOpen implementation and why transmission is happening in contimous infinite loop even after receiving Acknowledgement from the motor drive .
Please provide clarification on these, is it a bug or why this behavior is observed . I am providing just the basic code .
Kindly make it a highest priority and I have posted earlier also.
Code screenshots are attached below for the reference .
HI Kumar,
I don't know how the CANOpen works in your setup.
According to the CAN spec, CAN provides a mechanism to automatically retransmit message that have lost arbitration or have been disturbed by errors during transmission.
By default, this automatic retransmission is enabled. It can be disabled by setting bit DAR (Disable Automatic Retransmission) in CAN Control Register.
Provide the specific register setting and details corresponding to LAUNCHPADXL-TMS28379D if automatic retransmission is enabled. Even after receiving acknowledgement from motor it was retransmitting data , that's the main issue. Please provide clarification .
Also i checked the simple transmit example by setting the DAR bit but it is retransmitting even after this . I also cleared Auto-Bus-On(ABO) bit.
Hi Kishor,
As Chirag mentioned in another thread, you may need to try canOpen stacks from the 4Ps recommended by TI, for example SIMMA SOFTWARE stacks.
OK i will try CANOpen stacks from the 4Ps recommended by TI. Also I was able to stop retransmission in loopback interrupt example by setting the DAR bit .
I have resolved the retransmit issue with setting of DAR Register but the issue is packet is transmitted only after coming out of main function. Also if I have to send multiple SDO,PDO packets then on CRO data is reflecting only after coming out of main loop . Also how to observe various packets and their acknowledgements if packet is not sent after function call when dealing with various indices. Kindly tell how to resolve this issue and why this arises.
I observed that the SDO,PDO,NMT any CANOpen packet is transmitted only after coming out of main function . Kindly clarify this.
What happens if you add a while(1) loop or big delay right after PDO_Config()?
Does PDO send a request and wait for response from other node before transmitting the message?