DSPRelated.com
Forums

CAN communication using interrupt

Started by "Hwang, Wen-Ruey" October 29, 2007
Hi Vishal,

Recently I modified a CAN example program from polling to interrupt and
running with the Dspace as an another node to communnicate with 2808.
The polling program is working fine for ever but the interrupt was
failed on the half way. I attached the two programs and need your input
to point me out where I have to pay attention of the interrupt
situations. In my program I generated three transmitters and one
receiver. The two transmitters send counting data all the time; while
one transmitter and one receiver update the Dspace node sending a number
each other. One was using polling and the other one was using interrupt.
Thanks,

Wen-Ruey Hwang
hi ,

I have some problmes in the CAN transmission.After my can initialization is done when i go for transmission and chek the TA bit I it not getting set. Also i chek the CANES register where i see that the SMA(suspend mode) bit is active. If i set the free mode bit in the CANMC the can module goes in error passive mode (indicated in CANES).

Hi Vishal,
>
>Recently I modified a CAN example program from polling to interrupt and
>running with the Dspace as an another node to communnicate with 2808.
>The polling program is working fine for ever but the interrupt was
>failed on the half way. I attached the two programs and need your input
>to point me out where I have to pay attention of the interrupt
>situations. In my program I generated three transmitters and one
>receiver. The two transmitters send counting data all the time; while
>one transmitter and one receiver update the Dspace node sending a number
>each other. One was using polling and the other one was using interrupt.
>Thanks,
>
>Wen-Ruey Hwang
>
Hi,

In order to bring the processor out of the error
passive mode automatically, set the ABO (Auto Bus ON)
bit in the CANMC register. This should solve most of
your problems.

ECanaShadow.CANMC.all = ECanaRegs.CANMC.all;
ECanaShadow.CANMC.bit.ABO = 1;
ECanaRegs.CANMC.all = ECanaShadow.CANMC.all;

Thanks,
Vishal

--- s...@yahoo.com wrote:

> hi ,
>
> I have some problmes in the CAN transmission.After
> my can initialization is done when i go for
> transmission and chek the TA bit I it not getting
> set. Also i chek the CANES register where i see that
> the SMA(suspend mode) bit is active. If i set the
> free mode bit in the CANMC the can module goes in
> error passive mode (indicated in CANES).
>
> Hi Vishal,
> >
> >Recently I modified a CAN example program from
> polling to interrupt and
> >running with the Dspace as an another node to
> communnicate with 2808.
> >The polling program is working fine for ever but
> the interrupt was
> >failed on the half way. I attached the two programs
> and need your input
> >to point me out where I have to pay attention of
> the interrupt
> >situations. In my program I generated three
> transmitters and one
> >receiver. The two transmitters send counting data
> all the time; while
> >one transmitter and one receiver update the Dspace
> node sending a number
> >each other. One was using polling and the other one
> was using interrupt.
> >Thanks,
> >
> >Wen-Ruey Hwang
>