Code for CodeWarrior
void initCanHCS12 (void)
{
newline /Init the HCS12 microcontroler for CanOpen
12();

// Init the HCS12 driver
canBusInit bi0 = {

,
* no low power







*/

,
* no time stamp






&sstarf#star;/

,
* enable MSCAN







*/

,
* clock source : oscillator (In fact, it is not used)
*/

,
* no loop back







*/

,
* no listen only






*/

,
* no low pass filter for wk up */


{


1, /* clksrc */


3, /* brp
&sstarf#star;/


0, /* sjw
&sstarf#star;/


0, /* samp
*/


1, /* tseg2 &sstarf#star;/


12,/* tseg1 &sstarf#star;/


},


{


x00,
* Filter on 16 bits.








See Motorola Block Guide V02.14 fig 4-3 */


x00, 0xFF, /* filter 0 hight accept all msg

&sstarf#star;/


x00, 0xFF, /* filter 0 low accept all msg


&sstarf#star;/


x00, 0xFF, /* filter 1 hight filter all of &sstarf#star;/


x00, 0xFF, /* filter 1 low filter all of
&sstarf#star;/


x00, 0xFF, /* filter 2 hight filter most of */


x00, 0xFF, /* filter 2 low filter most of
*/


x00, 0xFF, /* filter 3 hight filter most of */


x00, 0xFF, /* filter 3 low filter most of
*/


}

};

epimerde 2007-06-06