};
- cmd_des_t const cmd_des_can_dump={
- 0, 0,
- "candump", "Dump all messages received over CAN",
- "### Command syntax ###\n"
- "\n"
- " candump <CONTROLLER>\n"
- "\n"
- "where `<CONTROLLER>` is a number in range 1-3.\n"
- "\n"
- "### Description ###\n"
- "\n"
- "This command prints out all CAN messages received via the specified\n"
- "controller.\n"
- "\n"
- "IDs are zero-filled to length 3 if a message in the standard frame\n"
- "format is received and to 8 for extended frame format messages.\n"
- "\n"
- "caninit must be called before using this command.\n"
- "\n"
- "### Example ###\n"
- "\n"
- " --> candump 2\n"
- "can2 0000FADE [2] 12 34\n",
- CMD_HANDLER(cmd_do_can_dump), (void *)&cmd_list_can
+ cmd_des_t const cmd_des_can_dump = {
+ 0, 0,
+ "candump", "Dump all messages received over CAN",
+ "### Command syntax ###\n"
+ "\n"
+ " candump <CONTROLLER>\n"
+ "\n"
+ "where `<CONTROLLER>` is a number in range 1-3.\n"
+ "\n"
+ "### Description ###\n"
+ "\n"
+ "This command prints out all CAN messages received via the specified\n"
+ "controller.\n"
+ "\n"
+ "IDs are zero-filled to length 3 if a message in the standard frame\n"
+ "format is received and to 8 for extended frame format messages.\n"
+ "\n"
+ "caninit must be called before using this command.\n"
+ "\n"
+ "### Example ###\n"
+ "\n"
+ " --> candump 2\n"
+ "can2 0000FADE [2] 12 34\n",
+ CMD_HANDLER(cmd_do_can_dump), (void *)&cmd_list_can
};
-cmd_des_t const cmd_des_can_test = {
- 0, 0,
- "canrpptest", "Test the CAN functions from the RPP library",
- "### Command syntax ###\n"
- "\n"
- " canrpptest\n"
- "\n"
- "### Description ###\n"
- "\n"
- "This command tests all CAN functions in the RPP library. It does those\n"
- "particular tests:\n"
- "\n"
- "1) Test of the rpp_can_init(), rpp_can_write() and rpp_can_read() functions.\n"
- " At the beginning, the CAN bus is initialized with manually specified and\n"
- " verified CAN bit timing parameters. Then a message is sent on the CAN1 and is\n"
- " received on the CAN2. Finally the received message is compared with the sent one.\n"
- " If the transmissions fails, reception exceeds a timeout or the sent and\n"
- " received messages do not match, the command prints the appropriate error\n"
- " code."
- "2) Test of the CAN bit timing parameters calculation.\n"
- " This test subsequently initializes the CAN bus to a baudrates 125k, 250k\n"
- " and 500k. For each one of them a message is sent on CAN1 and received on CAN2.\n"
- " Finally the received message is compared with the sent one like in a test (1).\n"
- " If the initialization, transmission, reception or comparison fails or\n"
- " if the reception timeout is reached, an appropriate error code is printed.\n"
- "3) Test of the behavior of transmission request overwriting.\n"
- " The CAN bus is initialized like in the test (1). A message A transmission\n"
- " request is posted on CAN1 by calling rpp_can_write() and right after that\n"
- " another message B transmission request is posted on CAN1 by another call of\n"
- " the rpp_can_write(). A message B is received on CAN2, because the second request\n"
- " came so quickly, that it overwrote the first one. The sent and received messages\n"
- " are compared to verify that the transmission was correct.\n"
- " If the initialization, transmission, reception or comparison fails or\n"
- " if the reception timeout is reached, an appropriate error code is printed.\n"
- "4) Test of the TX request pending flag detection.\n"
- " The CAN bus is initialized like in the test (1). A message is transmitted\n"
- " on the CAN1 and the test waits for the TX pending flag to be set, which\n"
- " signalizes that there is a message transmission request pending. After the\n"
- " flag has been set, the test waits for its clearance, which means that the\n"
- " message has been sent. The test measures, how many flag test cycles passed,\n"
- " until the flag has been cleared. This value is then presented as a time.\n"
- " At the end, the message is received on the CAN2 and is compared with the\n"
- " sent message for verification.\n"
- " If the initialization, transmission, reception or comparison fails or if\n"
- " timeout is reached while waiting for the flag set/clear or receive timeout\n"
- " is reached, an appropriate error code is printed.\n"
- "5) Test of the message received (RX) indicator.\n"
- " The CAN bus is initialized like in the test (1). A message is transmitted\n"
- " on the CAN1. The test then waits for the RX indicator to be set, which\n"
- " indicates that a message has been received. The message is picked up by\n"
- " the rpp_can_read(). This should clear the indicator, which is tested. Finally\n"
- " the received messages is compared with the sent one.\n"
- " If the initialization, transmission, reception, message comparison or indicator\n"
- " test fails or if timeout is reached while waiting for the flag set, the\n"
- " appropriate error code is printed.\n"
- "\n"
- "At the end the CAN bus is reset and left with the configuration from test (1).\n"
- "Those tests assumes the CAN1 and CAN2 to be connected in HW loopback.\n"
- "Any previous configuration is canceled, but is not deleted, so any following\n"
- "call of caninit command will restore the CAN bus to previous configuration.\n"
- "\n"
- "For error codes description refer please the API documentation for the rpp-test-sw.\n"
- "\n"
- "### Example ###\n"
- "\n"
- " --> canrpptest\n"
- "This is a test for RPP CAN library functions:"
- "Test of simple message transmission and reception."
- " CAN bus Initialization...OK"
- " Transmission and reception...OK"
- "---"
- "Test od automatic CAN bit timing calculation."
- " Baudrate: 125000: OK"
- " Baudrate: 250000: OK"
- " Baudrate: 500000: OK"
- "---"
- "Test of transmission request rewritting."
- " CAN bus Initialization...OK"
- " TX request rewritting...OK"
- "---"
- "Test of TX request pending flag detection."
- " CAN bus Initialization...OK"
- " TX request pending flag behavioral: OK, time: 256 cycles."
- "---"
- "Test of RX indicator."
- " CAN bus Initialization...OK"
- " RX indicator behavioral:"
- "OK, time: 0 cycles."
- "---"
- "Reset the CAN bus."
- " CAN bus Initialization...OK",
- CMD_HANDLER(cmd_do_can_test_functions), (void *)&cmd_list_can
+cmd_des_t const cmd_des_can_test={
+ 0, 0,
+ "canrpptest", "Test the CAN functions from the RPP library",
+ "### Command syntax ###\n"
+ "\n"
+ " canrpptest\n"
+ "\n"
+ "### Description ###\n"
+ "\n"
+ "This command tests all CAN functions in the RPP library. It does those\n"
+ "particular tests:\n"
+ "\n"
+ "1) Test of the rpp_can_init(), rpp_can_write() and rpp_can_read() functions.\n"
+ " At the beginning, the CAN bus is initialized with manually specified and\n"
+ " verified CAN bit timing parameters. Then a message is sent on the CAN1 and is\n"
+ " received on the CAN2. Finally the received message is compared with the sent one.\n"
+ " If the transmissions fails, reception exceeds a timeout or the sent and\n"
+ " received messages do not match, the command prints the appropriate error\n"
+ " code."
+ "2) Test of the CAN bit timing parameters calculation.\n"
+ " This test subsequently initializes the CAN bus to a baudrates 125k, 250k\n"
+ " and 500k. For each one of them a message is sent on CAN1 and received on CAN2.\n"
+ " Finally the received message is compared with the sent one like in a test (1).\n"
+ " If the initialization, transmission, reception or comparison fails or\n"
+ " if the reception timeout is reached, an appropriate error code is printed.\n"
+ "3) Test of the behavior of transmission request overwriting.\n"
+ " The CAN bus is initialized like in the test (1). A message A transmission\n"
+ " request is posted on CAN1 by calling rpp_can_write() and right after that\n"
+ " another message B transmission request is posted on CAN1 by another call of\n"
+ " the rpp_can_write(). A message B is received on CAN2, because the second request\n"
+ " came so quickly, that it overwrote the first one. The sent and received messages\n"
+ " are compared to verify that the transmission was correct.\n"
+ " If the initialization, transmission, reception or comparison fails or\n"
+ " if the reception timeout is reached, an appropriate error code is printed.\n"
+ "4) Test of the TX request pending flag detection.\n"
+ " The CAN bus is initialized like in the test (1). A message is transmitted\n"
+ " on the CAN1 and the test waits for the TX pending flag to be set, which\n"
+ " signalizes that there is a message transmission request pending. After the\n"
+ " flag has been set, the test waits for its clearance, which means that the\n"
+ " message has been sent. The test measures, how many flag test cycles passed,\n"
+ " until the flag has been cleared. This value is then presented as a time.\n"
+ " At the end, the message is received on the CAN2 and is compared with the\n"
+ " sent message for verification.\n"
+ " If the initialization, transmission, reception or comparison fails or if\n"
+ " timeout is reached while waiting for the flag set/clear or receive timeout\n"
+ " is reached, an appropriate error code is printed.\n"
+ "5) Test of the message received (RX) indicator.\n"
+ " The CAN bus is initialized like in the test (1). A message is transmitted\n"
+ " on the CAN1. The test then waits for the RX indicator to be set, which\n"
+ " indicates that a message has been received. The message is picked up by\n"
+ " the rpp_can_read(). This should clear the indicator, which is tested. Finally\n"
+ " the received messages is compared with the sent one.\n"
+ " If the initialization, transmission, reception, message comparison or indicator\n"
+ " test fails or if timeout is reached while waiting for the flag set, the\n"
+ " appropriate error code is printed.\n"
+ "\n"
+ "At the end the CAN bus is reset and left with the configuration from test (1).\n"
+ "Those tests assumes the CAN1 and CAN2 to be connected in HW loopback.\n"
+ "Any previous configuration is canceled, but is not deleted, so any following\n"
+ "call of caninit command will restore the CAN bus to previous configuration.\n"
+ "\n"
+ "For error codes description refer please the API documentation for the rpp-test-sw.\n"
+ "\n"
+ "### Example ###\n"
+ "\n"
+ " --> canrpptest\n"
+ "This is a test for RPP CAN library functions:\n"
+ "Test of simple message transmission and reception.\n"
+ " CAN bus Initialization...OK\n"
+ " Transmission and reception...OK\n"
+ "---\n"
+ "Test od automatic CAN bit timing calculation.\n"
+ " Baudrate: 125000: OK\n"
+ " Baudrate: 250000: OK\n"
+ " Baudrate: 500000: OK\n"
+ "---\n"
+ "Test of transmission request rewritting.\n"
+ " CAN bus Initialization...OK\n"
+ " TX request rewritting...OK\n"
+ "---\n"
+ "Test of TX request pending flag detection.\n"
+ " CAN bus Initialization...OK\n"
+ " TX request pending flag behavioral: OK, time: 256 cycles.\n"
+ "---\n"
+ "Test of RX indicator.\n"
+ " CAN bus Initialization...OK\n"
+ " RX indicator behavioral:\n"
+ "OK, time: 0 cycles.\n"
+ "---\n"
+ "Reset the CAN bus.\n"
+ " CAN bus Initialization...OK\n",
+ CMD_HANDLER(cmd_do_can_test_functions), (void *)&cmd_list_can
};