Other Parts Discussed in Thread: TCAN1042DEVM
Dear TI,
I am debugging following example code "mcan_message_rx_LP_MSPM0G3507_nortos_ticlang" to receive the data from my python script.
(python script is interface with ST MCU connect with TJA1050 Transceiver to send the packet to other TJA1050 Transceiver which connected with MSPM0)
As, instead of TCAN1042DEVM I am using TJA1050 Transceiver, but I am not able to received the raw data on MSPM0 side , I able to debug it for some instant as I am getting the CAN interrupt
And the above following value is getting while interrupt then I go the register data sheet for the CAN
Check MCAN_IR (Offset = 7050h) [Reset = 80000000h] for more detail and found these bit getting high even not clearing after the interrupt function call.
Due to this , I am not able to enter the blow condition.
I attached my python code for reference please let me where is issues behind that,
import can
import time
import can.interfaces.serial
COMM_PORT_NAME = 'COM20'
data=[23, 25, 0, 1, 3, 1, 4, 1]
ID_FROM_PYTHON = 0x1
#ID_FROM_MCU = 0x36
def send_one():
"""Sends a single message."""
bus = can.interface.Bus(interface='serial', channel= COMM_PORT_NAME, bitrate=200000)
try:
while True:
msg_from_mcu = can.Message(
arbitration_id=ID_FROM_PYTHON, data=data, is_extended_id=True)
# Send the message to the MCU
bus.send(msg_from_mcu)
print(f"Message sent on {bus.channel_info}, Data: {data}, CAN ID: {ID_FROM_PYTHON}")
time.sleep(0.4)
except can.CanError:
print("Message NOT sent")
bus.shutdown()
if __name__ == "__main__":
send_one()