2025-09-18 5:18 AM - last edited on 2025-09-18 6:01 AM by mƎALLEm
STR73xx MCU's are old, but I think the CAN operation is similar to newer parts.
This part supports loopback and loopback with silent options. I am interested in the one called just 'loopback'.
In loopback, the TX pin is active, but RX pin is disconnected from the CAN bus. TX is looped back into the RX logic.
My question is about what happens when connected to a live CAN bus, one that has traffic from other nodes.
Clearly, my MCU will not hear any external traffic, the RX logic will only hear what my MCU is sending.
But, will my MCU still honor bus state detection and arbitration, so when I tell it to transmit (and the TX pin is active) it will not collide with external bus traffic?
mark
Solved! Go to Solution.
2025-09-18 11:20 AM - edited 2025-09-18 12:18 PM
@mafredette wrote:
thanks for the quick reply,
I did read and understand what you found.
My question is whether the CAN controller will still honor the bus state and activity so the loop back transmission will not collide with other bus traffic? Or, will the CAN controller will just activate the TX pin no matter what is happening on the CAN bus, and then possibly collide with bus traffic?
If the RX pin is completely disconnected from the bus, I guess the CAN controller will not see traffic and will just transmit when it wants. This will be a problem for me. But, if the RX pin remains connected to the collision and arbitration logic, all should be ok for me.
mark
Yes this is what I'm saying. There is no monitoring on the bus since the Rx is completely disconnected from the bus. So no matter what happens on the bus that node starts to send frames at any time and that induces a collision and may be erros. So I think, that mode needs to be used for debug mode and needs to be disconnected from the bus or at least no node is transmitting on the bus except the one in the loopback mode.
2025-09-18 5:58 AM
Hello,
This is what was said in the STR73x reference manual:
In loopback mode, Rx sees what was sent on Tx. It doesn't care about the bus state and the arbitration as well as what is available in Normal mode where the node monitors the bus state and start of frame on Rx. Since CAN_Rx pin is disconnected from the bus and it's looped back to Tx.
"The actual value of the CAN_RX input pin is disregarded by the CAN Core", that means neither the bus state nor the arbitration is monitored on Rx input.
2025-09-18 11:15 AM
thanks for the quick reply,
I did read and understand what you found.
My question is whether the CAN controller will still honor the bus state and activity so the loop back transmission will not collide with other bus traffic? Or, will the CAN controller will just activate the TX pin no matter what is happening on the CAN bus, and then possibly collide with bus traffic?
If the RX pin is completely disconnected from the bus, I guess the CAN controller will not see traffic and will just transmit when it wants. This will be a problem for me. But, if the RX pin remains connected to the collision and arbitration logic, all should be ok for me.
mark
2025-09-18 11:20 AM - edited 2025-09-18 12:18 PM
@mafredette wrote:
thanks for the quick reply,
I did read and understand what you found.
My question is whether the CAN controller will still honor the bus state and activity so the loop back transmission will not collide with other bus traffic? Or, will the CAN controller will just activate the TX pin no matter what is happening on the CAN bus, and then possibly collide with bus traffic?
If the RX pin is completely disconnected from the bus, I guess the CAN controller will not see traffic and will just transmit when it wants. This will be a problem for me. But, if the RX pin remains connected to the collision and arbitration logic, all should be ok for me.
mark
Yes this is what I'm saying. There is no monitoring on the bus since the Rx is completely disconnected from the bus. So no matter what happens on the bus that node starts to send frames at any time and that induces a collision and may be erros. So I think, that mode needs to be used for debug mode and needs to be disconnected from the bus or at least no node is transmitting on the bus except the one in the loopback mode.