5.4.2
Sample program sequence
"Figure 5-9 CAN communication flowchart" shows the CAN communication sequence of the sample
program flow. First, the microcontroller is initialized. On the microcontroller initialization, the CAN
operation timer starts operating.
After that, the CAN driver is initialized. Then, the motor driving macro is initialized and then the program
goes into a loop.
Subsequently, motor rotation information transmit, temperature sensor information transmit, receive
processing are handled in the timer routine.
Microcontroller initialization
CAN operation timer running
CAN driver initialization
Motor macro initialization
Infinite loop
Start
Figure 5-9 CAN communication flowchart
- 99 -
AN07-00180-3E
Timer is running
Motor rotation info transmit
Receive processing
Receive processing