Closed
Description
An updated CAN-ID for a PDO that is setup in the defaults array does not stick even if the communication parameters are stored. This can be demonstrated using the example slave, with the addition of a long delay before exiting main, and the following test script:
# Start the node to see the TPDO, then reset again
cansend vcan0 000#0101
sleep 1
cansend vcan0 000#8101
sleep 1
# Reconfigure the TPDO with CAN-ID 0x456 and duplicate the mapping
sdowrite vcan0 1 0x1800 1 4 0x80000456
sdowrite vcan0 1 0x1A00 0 1 0
sdowrite vcan0 1 0x1A00 1 4 0x20010010
sdowrite vcan0 1 0x1A00 2 4 0x20010010
sdowrite vcan0 1 0x1A00 0 1 2
sdowrite vcan0 1 0x1800 1 4 0x00000456
# Store the communication parameters
sdowrite vcan0 1 0x1010 2 4 0x65766173
# Start the node to see the TPDO with updated CAN-ID and mapping
cansend vcan0 000#0101
sleep 1
# Reset the node, then start again and expect the PDO to be identical
cansend vcan0 000#8101
sleep 1
cansend vcan0 000#0101
candump
shows the following output:
vcan0 701 [1] 00
vcan0 081 [8] 00 10 81 00 00 00 00 00
vcan0 081 [8] 00 00 00 00 00 00 00 00
vcan0 000 [2] 01 01
vcan0 181 [2] AA 55
vcan0 000 [2] 81 01
vcan0 701 [1] 00
vcan0 601 [8] 23 00 18 01 56 04 00 80
vcan0 581 [8] 60 00 18 01 00 00 00 00
vcan0 601 [8] 2F 00 1A 00 00 00 00 00
vcan0 581 [8] 60 00 1A 00 00 00 00 00
vcan0 601 [8] 23 00 1A 01 10 00 01 20
vcan0 581 [8] 60 00 1A 01 00 00 00 00
vcan0 601 [8] 23 00 1A 02 10 00 01 20
vcan0 581 [8] 60 00 1A 02 00 00 00 00
vcan0 601 [8] 2F 00 1A 00 02 00 00 00
vcan0 581 [8] 60 00 1A 00 00 00 00 00
vcan0 601 [8] 23 00 18 01 56 04 00 00
vcan0 581 [8] 60 00 18 01 00 00 00 00
vcan0 601 [8] 23 10 10 02 73 61 76 65
vcan0 581 [8] 60 10 10 02 00 00 00 00
vcan0 000 [2] 01 01
vcan0 456 [4] AA 55 AA 55
vcan0 000 [2] 81 01
vcan0 701 [1] 00
vcan0 000 [2] 01 01
vcan0 181 [4] AA 55 AA 55
The last line shows that the TPDO COB-ID reverted to the default after an NMT reset. However, the updated mapping was correctly remembered.
Metadata
Metadata
Assignees
Labels
No labels