This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
不知您的具体步骤如何?建议您按照官网给出的步骤来操作,如
Hercules\HALCoGen\v04.07.01\examples\TMS570LS31x_21x
下的example_canCommunication.c内描述的类似步骤:
@b Step @b 1: * * Create a new project. * * Navigate: -> File -> New -> Project * * @image html example_createProject.jpg "Figure: Create a new Project" * * @b Step @b 2: * * Configure driver code generation: * - Enable can driver * - Disable others * * Navigate: -> TMS570LSxx /RM4 -> Enable Drivers * * @image html can_enabledriver.JPG "Figure: Enable CAN Driver" * * @b Step @b 3: * * Configure CAN Baudrate: * * Navigate: -> TMS570LSxx /RM4 -> CAN * * @image html can1baud.JPG "Figure: CAN1 BaudRate Configuration" * @image html can2baud.JPG "Figure: CAN2 BaudRate Configuration" * * @b Step @b 4: * * Configure CAN MessageBox: * * - Configure CAN1 , MessageBox 1 -- Activate and Enable TX * - Configure CAN2 , MessageBox 1 -- Activate and Enable RX * * Navigate: -> TMS570LSxx /RM4 -> CAN * * @image html canCommunication1.JPG "Figure: CAN1 MBox Configuration" * @image html canCommunication2.JPG "Figure: CAN2 MBox Configuration" * * @b Step @b 5: * * Copy the source code below into your sys_main.c or replace sys_main.c with this file. * * The example file can also be found in the examples folder: ../HALCoGen/examples * * @note HALCoGen generates an empty main function in sys_main.c, *