CAN implementation on S12XEP100 using code warrior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN implementation on S12XEP100 using code warrior

711 Views
Vijay1987
Contributor I

Hi all,

 

I've just started using the 9S12XEP100 evaluation board along with processor expert. I was able to access the basic I/O's ( using processor expert) and implement stateflow generated code into code warrior.

 

Now, I need to use the CAN of the board. I've referred to the documentation on MSCAN with register and bit level information on implementation of CAN. However, I was not able to find any documentation on implementing CAN using processor expert.

 

My basic task is to send and recieve CAN message to/from the device. Please help me with links for good documentation or  examples if any.

 

Thanks

Vijay.

Labels (1)
0 Kudos
4 Replies

383 Views
ProcessorExpert
Senior Contributor III

Hello,

 

you can find the documentation including some examples in the component´s help available through Help command from component´s pop-up menu.

 

Please also find it also attached.

 

best regards
Vojtech Filip
Processor Expert Support Team

 

0 Kudos

383 Views
Vijay1987
Contributor I

Hi Filip,

 

I have already gone through the PE documentation. I have also tried using the method:3 ( pollling method) of sending CAN messages. But unfortunately i see no success.

 

When I include the line "CAN1_SendFrame(0,0x512, DATA_FRAME, 8, data);  ", in the main program, it gives me a warning during compilation, which says 

 

Warning : C1420: Result of function-call is ignored

test_sflw.c line 57

 

Is there some more detailed explanation of sending and recieving CAN messages using PE, and integrating it with other codes?? If so, please help me with the links for the same.

 

Meanwhile, I'm trying it out from my end and would post if I succeed.

 

Regards,

Vijay.

 

0 Kudos

383 Views
kef
Specialist I

Warning : C1420: Result of function-call is ignored

 

^^ means that what function returns is ignored by you. To suppress the warning, either assign result of function call to variable, or typecast it to void.:

 

a = foo();

 

or

 

(void)foo();

0 Kudos

383 Views
Vijay1987
Contributor I

Hi kef,

 

Yes, I have done that. I have defined "temp" and modified the code as follows

 

temp=CAN1_SendFrame(0, 0x512, DATA_FRAME, 8, data);

 

There is no warning now. It is getting compiled. But, when I am trying toaccess the CAN bus via external device ( PAN), I see no messages being transmitted by the EVAL board!!

 

I wonder what the problem is.The code only has CAN_SendFrame in it! Hope I can debug this soon.

 

Regards

Vijay.

0 Kudos