456
Chapter 13
FCAN Interface Function
Preliminary User’s Manual U14913EE1V0UM00
(3)
Setting a CAN Module into initialisation state
The following routine is required if a CAN module has to be set from normal operation into initialisa-
tion mode.
Please notice that all CAN modules are automatically set to initialisation mode after reset. There-
fore the sequence is only required if the CAN module is already in normal operation.
Figure 13-48: Setting CAN Module into Initialisation State
Note: In case of permanent bus activity the program loops for a long time. Therefore, a timeout mech-
anism should be provided in order to limit the runtime of the routine.
Remark:
x = 1 to 3
Example for C routine:
Yes
No
Note
Normal
Operation
Set INIT flag
(register CxCTRL)
Read ISTAT flag
(register CxCTRL)
ISTAT set?
INIT Mode
int CAN_ModuleStop (unsigned char module_no)
{
can_module_type *can_mod_ptr;
// define CAN module ptr
can_mod_ptr = &can_module[module_no];
// load CAN module ptr
if ((can_mod_ptr->CxCTRL & 0x0001)==0)
// if INIT flag not yet set:
can_mod_ptr->CxCTRL=0x0100;
// set INIT flag
while ((can_mod_ptr->CxCTRL & 0x0100)==0); // wait until initialisation state is confirmed
// (ISTAT bit = 1)
return 0;
}
Summary of Contents for V850E/CA1 ATOMIC
Page 6: ...6 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 52: ...52 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 144: ...144 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 162: ...162 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 224: ...224 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 308: ...308 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 512: ...512 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 564: ...564 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 566: ...566 Preliminary User s Manual U14913EE1V0UM00 MEMO ...
Page 584: ...584 Preliminary User s Manual U14913EE1V0UM00 MEMO ...