beautypg.com

Figure 5-12 can timer interrupt control – FUJITSU CAN-Motor Board MB91F267N User Manual

Page 101

background image

AN07-00180-3E

- 101 -

As shown in “Figure 5-12 CAN timer interrupt control”, around Line 817 in MAIN.C, there is the timer

interrupt function IRQ_reload1. In it, motor rotation information transmit, temperature sensor information

transmit, and receive processing are handled.

Figure 5-12 CAN timer interrupt control

__interrupt void IRQ_reload1(void)
{
(omitted)

for (i = 0; i < 3; i++)
{
(omitted)

/* Cycle check */
if (counter[i] >= val)
{
switch (i)
{
case 0:
canSendTask01();
break;
case 1:
canSendTask02();
break;
case 2:
canRecvTask();
break;
default:
break;
}
}
}
(omitted)
}

←Motor rotation information transmit

←Temperature sensor information transmit

←Receive processing