Hi,
the issue seems relative to the timer event.
If I program a transmist PDO every 100ms I can see at the beginning some PDO 
every 1 or 2 ms.
After that the CANNUS stacks and I cannot receive PDOs anymore up to a new uC 
master reset, so a new canbus initialization process.
Basically the  timer_AVR.c file is exactly equal to the original one (for the 
at90can128) except in the initTimer function where I use the timer1 because the 
ATmega64M1 doesn't have the timer3
void initTimer(void)
/******************************************************************************
Initializes the timer, turn on the interrupt and put the interrupt time to zero
INPUT    void
OUTPUT    void
******************************************************************************/
{
  TimerAlarm = 0;            // Set it back to the zero

  // Set timer 1 for CANopen operation tick 8us max, time is 524ms
  TCCR1B = (1 << CS11) | (1 << CS10);   // Timer 1 normal, mit CK/64
  TIMSK1 = 1 << OCIE1B;                 // Enable the interrupt
}
Any comment/suggestion?
Thanks in advance




  ----Messaggio originale----
 
Da: canfestival-devel@lists.sourceforge.net
 
Data: 6-dic-2018 21.04
 
A: <canfestival-devel@lists.sourceforge.net>
 
Ogg: Re: [Canfestival-devel] R: Re: CanFestival on ATmega64M1 in Arduino IDE
 

 
Hi,
 
I do not have access to a ATmega64M1, so there is no way AFIK for me
 
to run and debug your code.
 
Also near zero experience with Arduino, lots of experience with
 
at90can128 though.
 

 
I could always look at your code, but without knowing the general
 
place where the problem is, it is close to impossible... for me :)
 

 
When you say that only thing that is working is THE nmt message.
 
Is there only one nmt message?
 
What nmt state is the node in?
 
Have you tried to set it to operational state?
 

 
Best Regards
 
Lars
 
On Tue, Dec 4, 2018 at 5:26 PM <canfestival-devel@lists.sourceforge.net> wrote:
 
>
 
> The only thing which is working is the NMT message at the startup.
 
>
 
> No SDO response and I cannot able to make debug now.
 
>
 
> Can I attach the whole directory project which stay in the Arduino/libraries 
> folder to give you the whole files package?
 
>
 
> Thanks
 
>
 
> Bye
 
>
 
> Alessio
 
>
 
> ----Messaggio originale----
 
> Da: canfestival-devel@lists.sourceforge.net
 
> Data: 3-dic-2018 17.52
 
> A: <canfestival-devel@lists.sourceforge.net>
 
> Ogg: Re: [Canfestival-devel] CanFestival on ATmega64M1 in Arduino IDE
 
>
 
> Hi,
 
> Does anything work?
 
> Like heartbeat or sdo?
 
>
 
> could you check if the code reaches buildPDO?
 
>
 
> Best Regards
 
> Lars
 
>
 
> On Sat, Dec 1, 2018 at 6:02 PM <canfestival-devel@lists.sourceforge.net> 
> wrote:
 
> >
 
> >
 
> > Dear all,
 
> >
 
> > first of all many thanks to the developers and people in general that spent 
> > time on this project making it an affordable CanOpen platform for everyone.
 
> >
 
> > I'm new on this mailing list and here to explain my problem.
 
> >
 
> > I'm an electronic engineer and a researcher of University of Brescia 
> > (Italy) and I'm trying to make the canFestival working on Arduino using the 
> > Atmega64M1 uC.
 
> >
 
> > I know that there is the CanFestivino project that is the CanFestival 
> > porting for the Arduino IDE and the Atmega328p with the external controller 
> > MCP2515.
 
> >
 
> > It works but the guy that makes the porting cut several features to fit the 
> > code with the Atmega328 ROM and RAM.
 
> >
 
> > I reached it compilable in Arduino starting from the AVR example for the 
> > ATCAN90128. This uC is very similar to the ATmega64M1.
 
> >
 
> > The only things that I did was to change the timer, from timer3 to timer1 
> > (timer3 is not present on the ATmega64M1) and some tiny modifications in 
> > the CAN driver.
 
> >
 
> > Actually my project is compilable in Arduino where I created an example to 
> > read an analog input (A0) sending it through a PDO each 100ms.
 
> >
 
> > The only thing to need in order to compile it is the Arduino IDE support 
> > files for CAN enabled Amtel AVR chips: ATmega64M1, ATmega32M1, ...HERE.
 
> >
 
> > I cannot figure out why but actually the example doesn't work and I'm 
> > struggling on it....making me a bit crazy because I don't understand why.
 
> >
 
> >
 
> >
 
> > Hope that someone can help me in this....
 
> >
 
> > Thanks
 
> >
 
> > Alessio
 
> > _______________________________________________
 
> > Canfestival-devel mailing list
 
> > Canfestival-devel@lists.sourceforge.net
 
> > 
 https://lists.sourceforge.net/lists/listinfo/canfestival-devel
 
>
 
>
 
> _______________________________________________
 
> Canfestival-devel mailing list
 
> Canfestival-devel@lists.sourceforge.net
 
> 
 https://lists.sourceforge.net/lists/listinfo/canfestival-devel
 
>
 
>
 
> _______________________________________________
 
> Canfestival-devel mailing list
 
> Canfestival-devel@lists.sourceforge.net
 
> 
 https://lists.sourceforge.net/lists/listinfo/canfestival-devel
 

 

 
_______________________________________________
 
Canfestival-devel mailing list
 
Canfestival-devel@lists.sourceforge.net
 

 https://lists.sourceforge.net/lists/listinfo/canfestival-devel
 

 



_______________________________________________
Canfestival-devel mailing list
Canfestival-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/canfestival-devel

Reply via email to