[Canfestival-devel] R: R: R: Re: R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Hi guys, the issue it that I was not able to go in sleep because the uC was stucked in the ISR because the transceiver has no power supply at the end solved resetting the CANBUS in the ISR when the power supply is taken off ( PINC0) file: can_AVR.c ISR(CAN_INT_vect)// edited for ATmegaxxM1 #endif// GCC /** CAN Interrupt **/ { unsigned char saved_page = CANPAGE; unsigned char i; if ( !(PINC (1< Ogg: [Canfestival-devel] R: R: Re: R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE if I debug the ISR(CAN_INT_vect) I can see the full activity during the PDO transmission, and a hole waiting for the next PDO timing. How can I know when the PDO is transmitted? In order to put the uC in sleep when the canbus is waiting for the next PDO to be transmitted. Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 24-dic-2018 12.13 A: Ogg: [Canfestival-devel] R: Re: R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE This is a serious problem/bug. Sometime, if I remove the main power supply and the uC try to go in sleep mode (power_down) happens that it is trapped inside the CAN interrupt (ISR(CAN_INT_vect)). The issue is that I cannot clear the CANIT General Interrupt Flag because it is a read only bit. What to you suggest to do in order to avoid that the uC stays trapped in the CAN_INT_vect? Thanks in advance Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 22-dic-2018 10.01 A: Ogg: Re: [Canfestival-devel] R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE is it possible to mask out interrupts to limit the number of interrupts that makes it wake up? just for debugging On Fri, 21 Dec 2018, 21:02 < canfestival-devel@lists.sourceforge.net wrote: Hi guys, I'm getting crazy on why I'm not able to go in sleep using the canFestival stack. Using the ISR(PCINT1_vect) sometime if I remove the power supply while the canbus is working the uC goes in a strange situation. Not in sleep but not in run as well. Anyway the power consumption is like in run. Basically, I'm using a pin to debug the situation DDRD |= (1< Ogg: [Canfestival-devel] R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE >>> can_disable was designed to work with at90can seriers so might not work with your uC looking the datasheet of ATmega64M1 the can register is the same. By the way the can_drv.h is rewritten for my uC. >>> Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. Already tried to put the node in stop mode. It doesn't work. What seems to happen is that the uC seems to miss the interrupt because it has a lower priority with can interrupts. Now I'm doing other tests to solve this issue. thanks anyway Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 20-dic-2018 16.54 A: < canfestival-devel@lists.sourceforge.net> Ogg: Re: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE first off can_disable was designed to work with at90can seriers so might not work with your uC Other than the timer, I'm not sure what canfestival can do to wake the controller up, but i have zero experience with sleep, so keep that in mind. Before sleep I think it is
[Canfestival-devel] R: R: Re: R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
if I debug the ISR(CAN_INT_vect) I can see the full activity during the PDO transmission, and a hole waiting for the next PDO timing. How can I know when the PDO is transmitted? In order to put the uC in sleep when the canbus is waiting for the next PDO to be transmitted. Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 24-dic-2018 12.13 A: Ogg: [Canfestival-devel] R: Re: R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE This is a serious problem/bug. Sometime, if I remove the main power supply and the uC try to go in sleep mode (power_down) happens that it is trapped inside the CAN interrupt (ISR(CAN_INT_vect)). The issue is that I cannot clear the CANIT General Interrupt Flag because it is a read only bit. What to you suggest to do in order to avoid that the uC stays trapped in the CAN_INT_vect? Thanks in advance Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 22-dic-2018 10.01 A: Ogg: Re: [Canfestival-devel] R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE is it possible to mask out interrupts to limit the number of interrupts that makes it wake up? just for debugging On Fri, 21 Dec 2018, 21:02 < canfestival-devel@lists.sourceforge.net wrote: Hi guys, I'm getting crazy on why I'm not able to go in sleep using the canFestival stack. Using the ISR(PCINT1_vect) sometime if I remove the power supply while the canbus is working the uC goes in a strange situation. Not in sleep but not in run as well. Anyway the power consumption is like in run. Basically, I'm using a pin to debug the situation DDRD |= (1< Ogg: [Canfestival-devel] R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE >>> can_disable was designed to work with at90can seriers so might not work with your uC looking the datasheet of ATmega64M1 the can register is the same. By the way the can_drv.h is rewritten for my uC. >>> Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. Already tried to put the node in stop mode. It doesn't work. What seems to happen is that the uC seems to miss the interrupt because it has a lower priority with can interrupts. Now I'm doing other tests to solve this issue. thanks anyway Messaggio originale---- Da: canfestival-devel@lists.sourceforge.net Data: 20-dic-2018 16.54 A: < canfestival-devel@lists.sourceforge.net> Ogg: Re: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE first off can_disable was designed to work with at90can seriers so might not work with your uC Other than the timer, I'm not sure what canfestival can do to wake the controller up, but i have zero experience with sleep, so keep that in mind. Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. On start, what you have done looks good to me. best regards Lars On Wed, 19 Dec 2018, 19:41 < canfestival-devel@lists.sourceforge.net wrote: Basically my question is what to do before to go in sleep mode and what to do just after the wake up. In the main I do: switch(baudrate) // 0=100KBaud, 1=125KBaud, 2=200KBaud, 3=250KBaud, 4=500KBaud, 5=1000KBaud { case 0: canInit(100
[Canfestival-devel] R: Re: R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
This is a serious problem/bug. Sometime, if I remove the main power supply and the uC try to go in sleep mode (power_down) happens that it is trapped inside the CAN interrupt (ISR(CAN_INT_vect)). The issue is that I cannot clear the CANIT General Interrupt Flag because it is a read only bit. What to you suggest to do in order to avoid that the uC stays trapped in the CAN_INT_vect? Thanks in advance Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 22-dic-2018 10.01 A: Ogg: Re: [Canfestival-devel] R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE is it possible to mask out interrupts to limit the number of interrupts that makes it wake up? just for debugging On Fri, 21 Dec 2018, 21:02 < canfestival-devel@lists.sourceforge.net wrote: Hi guys, I'm getting crazy on why I'm not able to go in sleep using the canFestival stack. Using the ISR(PCINT1_vect) sometime if I remove the power supply while the canbus is working the uC goes in a strange situation. Not in sleep but not in run as well. Anyway the power consumption is like in run. Basically, I'm using a pin to debug the situation DDRD |= (1< Ogg: [Canfestival-devel] R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE >>> can_disable was designed to work with at90can seriers so might not work with your uC looking the datasheet of ATmega64M1 the can register is the same. By the way the can_drv.h is rewritten for my uC. >>> Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. Already tried to put the node in stop mode. It doesn't work. What seems to happen is that the uC seems to miss the interrupt because it has a lower priority with can interrupts. Now I'm doing other tests to solve this issue. thanks anyway Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 20-dic-2018 16.54 A: < canfestival-devel@lists.sourceforge.net> Ogg: Re: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE first off can_disable was designed to work with at90can seriers so might not work with your uC Other than the timer, I'm not sure what canfestival can do to wake the controller up, but i have zero experience with sleep, so keep that in mind. Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. On start, what you have done looks good to me. best regards Lars On Wed, 19 Dec 2018, 19:41 < canfestival-devel@lists.sourceforge.net wrote: Basically my question is what to do before to go in sleep mode and what to do just after the wake up. In the main I do: switch(baudrate) // 0=100KBaud, 1=125KBaud, 2=200KBaud, 3=250KBaud, 4=500KBaud, 5=1000KBaud { case 0: canInit(100); break; case 1: canInit(125); break; case 2: canInit(200); break; case 3: canInit(250); break; case 4: canInit(500); break; case 5: canInit(1000); break; } initTimer(); // Start timer for the CANopen stack setNodeId(ObjDict_Data, nodeID); setState(ObjDict_Data, Pre_operational); // Init the state so, shall I have to do something before the sleep? and after at the wake up? Thanks
[Canfestival-devel] R: Re: R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
I tried to mask the CANGIE register with no success. I'll do other tests Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 22-dic-2018 10.01 A: Ogg: Re: [Canfestival-devel] R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE is it possible to mask out interrupts to limit the number of interrupts that makes it wake up? just for debugging On Fri, 21 Dec 2018, 21:02 < canfestival-devel@lists.sourceforge.net wrote: Hi guys, I'm getting crazy on why I'm not able to go in sleep using the canFestival stack. Using the ISR(PCINT1_vect) sometime if I remove the power supply while the canbus is working the uC goes in a strange situation. Not in sleep but not in run as well. Anyway the power consumption is like in run. Basically, I'm using a pin to debug the situation DDRD |= (1< Ogg: [Canfestival-devel] R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE >>> can_disable was designed to work with at90can seriers so might not work with your uC looking the datasheet of ATmega64M1 the can register is the same. By the way the can_drv.h is rewritten for my uC. >>> Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. Already tried to put the node in stop mode. It doesn't work. What seems to happen is that the uC seems to miss the interrupt because it has a lower priority with can interrupts. Now I'm doing other tests to solve this issue. thanks anyway Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 20-dic-2018 16.54 A: < canfestival-devel@lists.sourceforge.net> Ogg: Re: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE first off can_disable was designed to work with at90can seriers so might not work with your uC Other than the timer, I'm not sure what canfestival can do to wake the controller up, but i have zero experience with sleep, so keep that in mind. Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. On start, what you have done looks good to me. best regards Lars On Wed, 19 Dec 2018, 19:41 < canfestival-devel@lists.sourceforge.net wrote: Basically my question is what to do before to go in sleep mode and what to do just after the wake up. In the main I do: switch(baudrate) // 0=100KBaud, 1=125KBaud, 2=200KBaud, 3=250KBaud, 4=500KBaud, 5=1000KBaud { case 0: canInit(100); break; case 1: canInit(125); break; case 2: canInit(200); break; case 3: canInit(250); break; case 4: canInit(500); break; case 5: canInit(1000); break; } initTimer(); // Start timer for the CANopen stack setNodeId(ObjDict_Data, nodeID); setState(ObjDict_Data, Pre_operational); // Init the state so, shall I have to do something before the sleep? and after at the wake up? Thanks in advance to anyone spends time in this. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 19-dic-2018 18.52 A: < canfestival-devel@lists.sourceforge.net> Ogg: [Canfestival-dev
Re: [Canfestival-devel] R: R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
is it possible to mask out interrupts to limit the number of interrupts that makes it wake up? just for debugging On Fri, 21 Dec 2018, 21:02 Hi guys, > > I'm getting crazy on why I'm not able to go in sleep using the canFestival > stack. > > Using the ISR(PCINT1_vect) sometime if I remove the power supply while the > canbus is working the uC goes in a strange situation. > > Not in sleep but not in run as well. Anyway the power consumption is like > in run. > > Basically, I'm using a pin to debug the situation > DDRD |= (1< PORTD &= ~(1< but sometime happen that the uC try to goes in sleep but suddenly it comes > back in "run" > > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 20-dic-2018 17.10 > A: > Ogg: [Canfestival-devel] R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: > R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in > Arduino IDE > > >>> can_disable was designed to work with at90can seriers so might not > work with your uC > looking the datasheet of ATmega64M1 the can register is the same. By the > way the can_drv.h is rewritten for my uC. > > >>> Before sleep I think it is best to set the node in stop mode. It just > disable processing and making of almost every type of canopen message, and > it will also tell the network that is has stopped. > Already tried to put the node in stop mode. It doesn't work. What seems to > happen is that the uC seems to miss the interrupt because it has a lower > priority with can interrupts. > > Now I'm doing other tests to solve this issue. > > thanks anyway > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 20-dic-2018 16.54 > A: > Ogg: Re: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: > R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino > IDE > > first off > can_disable was designed to work with at90can seriers so might not work > with your uC > Other than the timer, I'm not sure what canfestival can do to wake the > controller up, but i have zero experience with sleep, so keep that in mind. > > Before sleep I think it is best to set the node in stop mode. It just > disable processing and making of almost every type of canopen message, and > it will also tell the network that is has stopped. > > On start, what you have done looks good to me. > > best regards > Lars > > On Wed, 19 Dec 2018, 19:41 < canfestival-devel@lists.sourceforge.net > <http://invalidurl.gif> wrote: > >> Basically my question is what to do before to go in sleep mode and what >> to do just after the wake up. >> >> In the main I do: >> >> switch(baudrate) // 0=100KBaud, 1=125KBaud, 2=200KBaud, 3=250KBaud, >> 4=500KBaud, 5=1000KBaud >> { >> case 0: canInit(100); break; >> case 1: canInit(125); break; >> case 2: canInit(200); break; >> case 3: canInit(250); break; >> case 4: canInit(500); break; >> case 5: canInit(1000); break; >> } >> initTimer(); // Start timer for the >> CANopen stack >> setNodeId(_Data, nodeID); >> setState(_Data, Pre_operational); // Init the state >> >> so, shall I have to do something before the sleep? >> >> and after at the wake up? >> >> Thanks in advance to anyone spends time in this. >> >> >> >> Messaggio originale >> Da: canfestival-devel@lists.sourceforge.net <http://invalidurl.gif> >> Data: 19-dic-2018 18.52 >> A: < canfestival-devel@lists.sourceforge.net <http://invalidurl.gif>> >> Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: >> R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE >> >> >> Another question: >> >> I've implemented the canFestival on a node which goes in sleep mode >> (POWER_DOWN) when there's no power supply. >> >> This device has a battery to keep the power supply on in OR with the main >> one. >> >> Of course when the battery is on I need to put everything in deep sleep >> mode with a consumption around 1.5uA @3V. >> >> The issue is that sometimes, if I receive something on the bus, the node >> suddendly wakes up from the sleep. >> >> Therefore I need to avoid this bad situation in order to avoid the >> battery discharge. >> >> How can I disable the canbus just before to go in sleep? >> >> Basically the sleep mode control is made in pin_change interrupt >> function. >> >&g
[Canfestival-devel] R: Re: R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
>>> can_disable was designed to work with at90can seriers so might not work with your uC looking the datasheet of ATmega64M1 the can register is the same. By the way the can_drv.h is rewritten for my uC. >>> Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. Already tried to put the node in stop mode. It doesn't work. What seems to happen is that the uC seems to miss the interrupt because it has a lower priority with can interrupts. Now I'm doing other tests to solve this issue. thanks anyway Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 20-dic-2018 16.54 A: Ogg: Re: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE first off can_disable was designed to work with at90can seriers so might not work with your uC Other than the timer, I'm not sure what canfestival can do to wake the controller up, but i have zero experience with sleep, so keep that in mind. Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. On start, what you have done looks good to me. best regards Lars On Wed, 19 Dec 2018, 19:41 < canfestival-devel@lists.sourceforge.net wrote: Basically my question is what to do before to go in sleep mode and what to do just after the wake up. In the main I do: switch(baudrate) // 0=100KBaud, 1=125KBaud, 2=200KBaud, 3=250KBaud, 4=500KBaud, 5=1000KBaud { case 0: canInit(100); break; case 1: canInit(125); break; case 2: canInit(200); break; case 3: canInit(250); break; case 4: canInit(500); break; case 5: canInit(1000); break; } initTimer(); // Start timer for the CANopen stack setNodeId(ObjDict_Data, nodeID); setState(ObjDict_Data, Pre_operational); // Init the state so, shall I have to do something before the sleep? and after at the wake up? Thanks in advance to anyone spends time in this. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 19-dic-2018 18.52 A: < canfestival-devel@lists.sourceforge.net> Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Another question: I've implemented the canFestival on a node which goes in sleep mode (POWER_DOWN) when there's no power supply. This device has a battery to keep the power supply on in OR with the main one. Of course when the battery is on I need to put everything in deep sleep mode with a consumption around 1.5uA @3V. The issue is that sometimes, if I receive something on the bus, the node suddendly wakes up from the sleep. Therefore I need to avoid this bad situation in order to avoid the battery discharge. How can I disable the canbus just before to go in sleep? Basically the sleep mode control is made in pin_change interrupt function. ISR(PCINT1_vect) // interrupt service routine called when the sensor is battery powered or not (LOWER PRIORITY THAN PCINT0_vect) { sleepMode = !digitalRead(V_supply); if ( sleepMode ) { Can_disable(); // doesn't work #ifdef SERIAL_DEBUG Serial.print('\0'); // print the NULL character to be sure that the TX port pin (PB0) is LOW #endif cli(); stopADC(); sleep(); } else turnedOn = true; } I'm quite sure that there is something in the canFestival framework which put the uC ON if something is received
Re: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
first off can_disable was designed to work with at90can seriers so might not work with your uC Other than the timer, I'm not sure what canfestival can do to wake the controller up, but i have zero experience with sleep, so keep that in mind. Before sleep I think it is best to set the node in stop mode. It just disable processing and making of almost every type of canopen message, and it will also tell the network that is has stopped. On start, what you have done looks good to me. best regards Lars On Wed, 19 Dec 2018, 19:41 Basically my question is what to do before to go in sleep mode and what to > do just after the wake up. > > In the main I do: > > switch(baudrate) // 0=100KBaud, 1=125KBaud, 2=200KBaud, 3=250KBaud, > 4=500KBaud, 5=1000KBaud > { > case 0: canInit(100); break; > case 1: canInit(125); break; > case 2: canInit(200); break; > case 3: canInit(250); break; > case 4: canInit(500); break; > case 5: canInit(1000); break; > } > initTimer(); // Start timer for the CANopen > stack > setNodeId(_Data, nodeID); > setState(_Data, Pre_operational); // Init the state > > so, shall I have to do something before the sleep? > > and after at the wake up? > > Thanks in advance to anyone spends time in this. > > > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 19-dic-2018 18.52 > A: > Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: > R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE > > > Another question: > > I've implemented the canFestival on a node which goes in sleep mode > (POWER_DOWN) when there's no power supply. > > This device has a battery to keep the power supply on in OR with the main > one. > > Of course when the battery is on I need to put everything in deep sleep > mode with a consumption around 1.5uA @3V. > > The issue is that sometimes, if I receive something on the bus, the node > suddendly wakes up from the sleep. > > Therefore I need to avoid this bad situation in order to avoid the battery > discharge. > > How can I disable the canbus just before to go in sleep? > > Basically the sleep mode control is made in pin_change interrupt function. > > ISR(PCINT1_vect) // interrupt service routine called when the sensor > is battery powered or not (LOWER PRIORITY THAN PCINT0_vect) > { > sleepMode = !digitalRead(V_supply); > > if ( sleepMode ) > { > Can_disable(); // doesn't work > > #ifdef SERIAL_DEBUG > Serial.print('\0'); // print the NULL character to be sure that > the TX port pin (PB0) is LOW > #endif > cli(); > stopADC(); > sleep(); > } > else > turnedOn = true; > } > > > I'm quite sure that there is something in the canFestival framework which > put the uC ON if something is received just before to go in sleep. > > Any suggestion? > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 18-dic-2018 10.24 > A: > Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: > R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE > > Sorry guys my fault. > > The default nodeID is 0x01. > > Everything works correctly > > Thanks and sorry > > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 18-dic-2018 10.17 > A: > Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: > R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE > > I've found the issue. > > It relative on how the objectdictionary .c file is created. > > If I leave the file as it is > > /* index 0x1200 : Server SDO Parameter. */ > UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of > subindex - 1*/ > UNS32 > ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x600;/* 1536 */ > > The canbus node doesn't reply to any SDO request. > > If I change it like this > > /* index 0x1200 : Server SDO Parameter. */ > UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of > subindex - 1*/ > UNS32 > ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x605;/* 1536 */ > > where 0x05 is the nodeID > > I get the right reply from my node > > Is this a bug on the object dictionary building procedure in the python > script? > > Waiting a kind reply > > Thanks > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 17-dic-2018 20.16 > A: > Ogg: [Can
[Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Basically my question is what to do before to go in sleep mode and what to do just after the wake up. In the main I do: switch(baudrate) // 0=100KBaud, 1=125KBaud, 2=200KBaud, 3=250KBaud, 4=500KBaud, 5=1000KBaud { case 0: canInit(100); break; case 1: canInit(125); break; case 2: canInit(200); break; case 3: canInit(250); break; case 4: canInit(500); break; case 5: canInit(1000); break; } initTimer(); // Start timer for the CANopen stack setNodeId(ObjDict_Data, nodeID); setState(ObjDict_Data, Pre_operational); // Init the state so, shall I have to do something before the sleep? and after at the wake up? Thanks in advance to anyone spends time in this. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 19-dic-2018 18.52 A: Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Another question: I've implemented the canFestival on a node which goes in sleep mode (POWER_DOWN) when there's no power supply. This device has a battery to keep the power supply on in OR with the main one. Of course when the battery is on I need to put everything in deep sleep mode with a consumption around 1.5uA @3V. The issue is that sometimes, if I receive something on the bus, the node suddendly wakes up from the sleep. Therefore I need to avoid this bad situation in order to avoid the battery discharge. How can I disable the canbus just before to go in sleep? Basically the sleep mode control is made in pin_change interrupt function. ISR(PCINT1_vect) // interrupt service routine called when the sensor is battery powered or not (LOWER PRIORITY THAN PCINT0_vect) { sleepMode = !digitalRead(V_supply); if ( sleepMode ) { Can_disable(); // doesn't work #ifdef SERIAL_DEBUG Serial.print('\0'); // print the NULL character to be sure that the TX port pin (PB0) is LOW #endif cli(); stopADC(); sleep(); } else turnedOn = true; } I'm quite sure that there is something in the canFestival framework which put the uC ON if something is received just before to go in sleep. Any suggestion? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 18-dic-2018 10.24 A: Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Sorry guys my fault. The default nodeID is 0x01. Everything works correctly Thanks and sorry Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 18-dic-2018 10.17 A: Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I've found the issue. It relative on how the objectdictionary .c file is created. If I leave the file as it is /* index 0x1200 : Server SDO Parameter. */ UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x600;/* 1536 */ The canbus node doesn't reply to any SDO request. If I change it like this /* index 0x1200 : Server SDO Parameter. */ UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x605;/* 1536 */ where 0x05 is the nodeID I get the right reply from my node Is this a bug on the object dictionary building procedure in the python script? Waiting a kind reply Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 17-dic-2018 20.16 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I did some other tests. The issue seems inside the canDispatch function in states.c. I'm using a pin as debug in order to understand if the code in some point is executed
[Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Another question: I've implemented the canFestival on a node which goes in sleep mode (POWER_DOWN) when there's no power supply. This device has a battery to keep the power supply on in OR with the main one. Of course when the battery is on I need to put everything in deep sleep mode with a consumption around 1.5uA @3V. The issue is that sometimes, if I receive something on the bus, the node suddendly wakes up from the sleep. Therefore I need to avoid this bad situation in order to avoid the battery discharge. How can I disable the canbus just before to go in sleep? Basically the sleep mode control is made in pin_change interrupt function. ISR(PCINT1_vect) // interrupt service routine called when the sensor is battery powered or not (LOWER PRIORITY THAN PCINT0_vect) { sleepMode = !digitalRead(V_supply); if ( sleepMode ) { Can_disable(); // doesn't work #ifdef SERIAL_DEBUG Serial.print('\0'); // print the NULL character to be sure that the TX port pin (PB0) is LOW #endif cli(); stopADC(); sleep(); } else turnedOn = true; } I'm quite sure that there is something in the canFestival framework which put the uC ON if something is received just before to go in sleep. Any suggestion? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 18-dic-2018 10.24 A: Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Sorry guys my fault. The default nodeID is 0x01. Everything works correctly Thanks and sorry Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 18-dic-2018 10.17 A: Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I've found the issue. It relative on how the objectdictionary .c file is created. If I leave the file as it is /* index 0x1200 : Server SDO Parameter. */ UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x600;/* 1536 */ The canbus node doesn't reply to any SDO request. If I change it like this /* index 0x1200 : Server SDO Parameter. */ UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x605;/* 1536 */ where 0x05 is the nodeID I get the right reply from my node Is this a bug on the object dictionary building procedure in the python script? Waiting a kind reply Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 17-dic-2018 20.16 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I did some other tests. The issue seems inside the canDispatch function in states.c. I'm using a pin as debug in order to understand if the code in some point is executed or not. basically this is done in the canDispatch: .. case SDOrx: if (d->CurrentCommunicationState.csSDO) { DDRB |= (1<CurrentCommunicationState.csLifeGuard) proceedNODE_GUARD(d,m); break; case NMT: if (*(d->iam_a_slave)) { DDRB |= (1< Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE symboles.c: dont know if it does any damage, but it does nothing good. it's for Linux kernel module usage you should not include it in Arduino build On Sat, 15 Dec 2018, 17:33 < canfestival-devel@lists.sourceforge.net wrote: Could this issue during compilation /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning:
[Canfestival-devel] R: R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Sorry guys my fault. The default nodeID is 0x01. Everything works correctly Thanks and sorry Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 18-dic-2018 10.17 A: Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I've found the issue. It relative on how the objectdictionary .c file is created. If I leave the file as it is /* index 0x1200 : Server SDO Parameter. */ UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x600;/* 1536 */ The canbus node doesn't reply to any SDO request. If I change it like this /* index 0x1200 : Server SDO Parameter. */ UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x605;/* 1536 */ where 0x05 is the nodeID I get the right reply from my node Is this a bug on the object dictionary building procedure in the python script? Waiting a kind reply Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 17-dic-2018 20.16 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I did some other tests. The issue seems inside the canDispatch function in states.c. I'm using a pin as debug in order to understand if the code in some point is executed or not. basically this is done in the canDispatch: .. case SDOrx: if (d->CurrentCommunicationState.csSDO) { DDRB |= (1<CurrentCommunicationState.csLifeGuard) proceedNODE_GUARD(d,m); break; case NMT: if (*(d->iam_a_slave)) { DDRB |= (1< Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE symboles.c: dont know if it does any damage, but it does nothing good. it's for Linux kernel module usage you should not include it in Arduino build On Sat, 15 Dec 2018, 17:33 < canfestival-devel@lists.sourceforge.net wrote: Could this issue during compilation /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: parameter names (without types) in function declaration [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:57:1: warning: data definition has no type or storage class [enabled by default] EXPORT_SYMBOL (_setODentry); ^ be an issue regarding the missing replies on the BUS. This kind of warning message is repeated for many symbols: honestly I don't think so but for completeness I give you this information Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 13-dic-2018 21.02 A: < canfestival-devel@lists.sourceforge.net> Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Do the can messages look okay in the canDispatch function (states.c) On Thu, Dec 13, 2018 at 7:30 PM < canfestival-devel@lists.sourceforge.net> wrote: > > That's the strange thing. > > The node doesn't react to any message sent > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 13-dic-2018 18.04 > A: < canfestival-devel@lists.sourceforge.net> > Ogg: Re: [Canfestival-devel] R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: > Re: CanFestival on ATmega64M1 in Arduino IDE > > Strange, > You should get a reply on "all&
[Canfestival-devel] R: R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
I've found the issue. It relative on how the objectdictionary .c file is created. If I leave the file as it is /* index 0x1200 : Server SDO Parameter. */ UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x600;/* 1536 */ The canbus node doesn't reply to any SDO request. If I change it like this /* index 0x1200 : Server SDO Parameter. */ UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x605;/* 1536 */ where 0x05 is the nodeID I get the right reply from my node Is this a bug on the object dictionary building procedure in the python script? Waiting a kind reply Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 17-dic-2018 20.16 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I did some other tests. The issue seems inside the canDispatch function in states.c. I'm using a pin as debug in order to understand if the code in some point is executed or not. basically this is done in the canDispatch: .. case SDOrx: if (d->CurrentCommunicationState.csSDO) { DDRB |= (1<CurrentCommunicationState.csLifeGuard) proceedNODE_GUARD(d,m); break; case NMT: if (*(d->iam_a_slave)) { DDRB |= (1< Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE symboles.c: dont know if it does any damage, but it does nothing good. it's for Linux kernel module usage you should not include it in Arduino build On Sat, 15 Dec 2018, 17:33 < canfestival-devel@lists.sourceforge.net wrote: Could this issue during compilation /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: parameter names (without types) in function declaration [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:57:1: warning: data definition has no type or storage class [enabled by default] EXPORT_SYMBOL (_setODentry); ^ be an issue regarding the missing replies on the BUS. This kind of warning message is repeated for many symbols: honestly I don't think so but for completeness I give you this information Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 13-dic-2018 21.02 A: < canfestival-devel@lists.sourceforge.net> Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Do the can messages look okay in the canDispatch function (states.c) On Thu, Dec 13, 2018 at 7:30 PM < canfestival-devel@lists.sourceforge.net> wrote: > > That's the strange thing. > > The node doesn't react to any message sent > > ----Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 13-dic-2018 18.04 > A: < canfestival-devel@lists.sourceforge.net> > Ogg: Re: [Canfestival-devel] R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: > Re: CanFestival on ATmega64M1 in Arduino IDE > > Strange, > You should get a reply on "all" sdo messages > Does the node react to any messages you send to the node? > > > > > > > On Thu, Dec 13, 2018 at 10:57 AM > < canfestival-devel@lists.sourceforge.net> wrote: > > > > PDOs every 100ms are running correctly. > > > > The issue remaining is the response from the node. > > > > For instance if I wish to change the event cycle for the PDO from 100ms to > > 70 ms I need to write on the bus: > > > > nodeID 2Bh 00h 18h 05h 46h 00h 00h 00h > > > > where nodeID
[Canfestival-devel] R: Re: R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
I did some other tests. The issue seems inside the canDispatch function in states.c. I'm using a pin as debug in order to understand if the code in some point is executed or not. basically this is done in the canDispatch: .. case SDOrx: if (d->CurrentCommunicationState.csSDO) { DDRB |= (1<CurrentCommunicationState.csLifeGuard) proceedNODE_GUARD(d,m); break; case NMT: if (*(d->iam_a_slave)) { DDRB |= (1< Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE symboles.c: dont know if it does any damage, but it does nothing good. it's for Linux kernel module usage you should not include it in Arduino build On Sat, 15 Dec 2018, 17:33 < canfestival-devel@lists.sourceforge.net wrote: Could this issue during compilation /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: parameter names (without types) in function declaration [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:57:1: warning: data definition has no type or storage class [enabled by default] EXPORT_SYMBOL (_setODentry); ^ be an issue regarding the missing replies on the BUS. This kind of warning message is repeated for many symbols: honestly I don't think so but for completeness I give you this information Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 13-dic-2018 21.02 A: < canfestival-devel@lists.sourceforge.net> Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Do the can messages look okay in the canDispatch function (states.c) On Thu, Dec 13, 2018 at 7:30 PM < canfestival-devel@lists.sourceforge.net> wrote: > > That's the strange thing. > > The node doesn't react to any message sent > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 13-dic-2018 18.04 > A: < canfestival-devel@lists.sourceforge.net> > Ogg: Re: [Canfestival-devel] R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: > Re: CanFestival on ATmega64M1 in Arduino IDE > > Strange, > You should get a reply on "all" sdo messages > Does the node react to any messages you send to the node? > > > > > > > On Thu, Dec 13, 2018 at 10:57 AM > < canfestival-devel@lists.sourceforge.net> wrote: > > > > PDOs every 100ms are running correctly. > > > > The issue remaining is the response from the node. > > > > For instance if I wish to change the event cycle for the PDO from 100ms to > > 70 ms I need to write on the bus: > > > > nodeID 2Bh 00h 18h 05h 46h 00h 00h 00h > > > > where nodeID is 600+ID and in my case is 601 > > > > Normally when you send something on the canbus you get a response from the > > node that depends if the object dictionary element is implemented in the > > dictionary. > > > > In my case I don't get any reply from the node. > > > > I don't know why > > > > > > Messaggio originale > > Da: canfestival-devel@lists.sourceforge.net > > Data: 13-dic-2018 10.07 > > A: < canfestival-devel@lists.sourceforge.net> > > Ogg: Re: [Canfestival-devel] R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: > > CanFestival on ATmega64M1 in Arduino IDE > > > > so, everything is up and running? > > > > On Wed, 12 Dec 2018, 16:17 < canfestival-devel@lists.sourceforge.net wrote: > >> > >> Ok, > >> > >> solved with > >> > >> // CANIE1 = 0x7F;// Enable the interrupts of all MObs (0..14) > >> // CANIE2 = 0xFF; > >> CANIE2 = 0x3F;// Enable the interrupts of all MObs (0..5) edited for >
Re: [Canfestival-devel] R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
symboles.c: dont know if it does any damage, but it does nothing good. it's for Linux kernel module usage you should not include it in Arduino build On Sat, 15 Dec 2018, 17:33 Could this issue during compilation > > /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: > warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [enabled > by default] > /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: > warning: parameter names (without types) in function declaration [enabled > by default] > /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:57:1: > warning: data definition has no type or storage class [enabled by default] > EXPORT_SYMBOL (_setODentry); > ^ > > be an issue regarding the missing replies on the BUS. > > This kind of warning message is repeated for many symbols: > > honestly I don't think so but for completeness I give you this information > > Thanks > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 13-dic-2018 21.02 > A: > Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: > R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE > > Do the can messages look okay in the canDispatch function (states.c) > On Thu, Dec 13, 2018 at 7:30 PM > wrote: > > > > That's the strange thing. > > > > The node doesn't react to any message sent > > > > Messaggio originale > > Da: canfestival-devel@lists.sourceforge.net > > Data: 13-dic-2018 18.04 > > A: > > Ogg: Re: [Canfestival-devel] R: Re: R: R: R: R: R: R: R: R: R: Re: R: > Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE > > > > Strange, > > You should get a reply on "all" sdo messages > > Does the node react to any messages you send to the node? > > > > > > > > > > > > > > On Thu, Dec 13, 2018 at 10:57 AM > > wrote: > > > > > > PDOs every 100ms are running correctly. > > > > > > The issue remaining is the response from the node. > > > > > > For instance if I wish to change the event cycle for the PDO from > 100ms to 70 ms I need to write on the bus: > > > > > > nodeID 2Bh 00h 18h 05h 46h 00h 00h 00h > > > > > > where nodeID is 600+ID and in my case is 601 > > > > > > Normally when you send something on the canbus you get a response from > the node that depends if the object dictionary element is implemented in > the dictionary. > > > > > > In my case I don't get any reply from the node. > > > > > > I don't know why > > > > > > > > > Messaggio originale > > > Da: canfestival-devel@lists.sourceforge.net > > > Data: 13-dic-2018 10.07 > > > A: > > > Ogg: Re: [Canfestival-devel] R: R: R: R: R: R: R: R: R: Re: R: Re: R: > Re: CanFestival on ATmega64M1 in Arduino IDE > > > > > > so, everything is up and running? > > > > > > On Wed, 12 Dec 2018, 16:17 < canfestival-devel@lists.sourceforge.net > wrote: > > >> > > >> Ok, > > >> > > >> solved with > > >> > > >> // CANIE1 = 0x7F;// Enable the interrupts of all MObs (0..14) > > >> // CANIE2 = 0xFF; > > >> CANIE2 = 0x3F;// Enable the interrupts of all MObs (0..5) > edited for ATmegaxxM1 > > >> > > >> in the can_AVR.c file > > >> > > >> Messaggio originale > > >> Da: canfestival-devel@lists.sourceforge.net > > >> Data: 12-dic-2018 11.49 > > >> A: < canfestival-devel@lists.sourceforge.net> > > >> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: R: Re: R: Re: R: Re: > CanFestival on ATmega64M1 in Arduino IDE > > >> > > >> > > >> the Atmega64M1 has only 6 Mobs instead of 15 of AT90CAN128. > > >> > > >> So I need to change some #define in the can_drv.h file > > >> > > >> // #define NB_MOB 15 > > >> #define NB_MOB 6 // edited for ATmegaxxM1 > > >> #define NB_DATA_MAX 8 > > >> #define LAST_MOB_NB (NB_MOB-1) > > >> #define NO_MOB 0xFF > > >> // -- > > >> //typedef enum { > > >> // MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, > MOB_7, > > >> //MOB_8, MOB_9, MOB_10, MOB_11, MOB_12, MOB_13, > MOB_14} can_mob_t; > > >> typedef enum {MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5} > can_mob_t;/
[Canfestival-devel] R: Re: R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Could this issue during compilation /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:56:1: warning: parameter names (without types) in function declaration [enabled by default] /home/alessio/Arduino/libraries/CanFestival_ATmega64M1_Arduino/symbols.c:57:1: warning: data definition has no type or storage class [enabled by default] EXPORT_SYMBOL (_setODentry); ^ be an issue regarding the missing replies on the BUS. This kind of warning message is repeated for many symbols: honestly I don't think so but for completeness I give you this information Thanks Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 13-dic-2018 21.02 A: Ogg: Re: [Canfestival-devel] R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Do the can messages look okay in the canDispatch function (states.c) On Thu, Dec 13, 2018 at 7:30 PM wrote: > > That's the strange thing. > > The node doesn't react to any message sent > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 13-dic-2018 18.04 > A: > Ogg: Re: [Canfestival-devel] R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: > Re: CanFestival on ATmega64M1 in Arduino IDE > > Strange, > You should get a reply on "all" sdo messages > Does the node react to any messages you send to the node? > > > > > > > On Thu, Dec 13, 2018 at 10:57 AM > wrote: > > > > PDOs every 100ms are running correctly. > > > > The issue remaining is the response from the node. > > > > For instance if I wish to change the event cycle for the PDO from 100ms to > > 70 ms I need to write on the bus: > > > > nodeID 2Bh 00h 18h 05h 46h 00h 00h 00h > > > > where nodeID is 600+ID and in my case is 601 > > > > Normally when you send something on the canbus you get a response from the > > node that depends if the object dictionary element is implemented in the > > dictionary. > > > > In my case I don't get any reply from the node. > > > > I don't know why > > > > > > Messaggio originale > > Da: canfestival-devel@lists.sourceforge.net > > Data: 13-dic-2018 10.07 > > A: > > Ogg: Re: [Canfestival-devel] R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: > > CanFestival on ATmega64M1 in Arduino IDE > > > > so, everything is up and running? > > > > On Wed, 12 Dec 2018, 16:17 < canfestival-devel@lists.sourceforge.net wrote: > >> > >> Ok, > >> > >> solved with > >> > >> // CANIE1 = 0x7F;// Enable the interrupts of all MObs (0..14) > >> // CANIE2 = 0xFF; > >> CANIE2 = 0x3F;// Enable the interrupts of all MObs (0..5) edited for > >> ATmegaxxM1 > >> > >> in the can_AVR.c file > >> > >> Messaggio originale > >> Da: canfestival-devel@lists.sourceforge.net > >> Data: 12-dic-2018 11.49 > >> A: < canfestival-devel@lists.sourceforge.net> > >> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: R: Re: R: Re: R: Re: > >> CanFestival on ATmega64M1 in Arduino IDE > >> > >> > >> the Atmega64M1 has only 6 Mobs instead of 15 of AT90CAN128. > >> > >> So I need to change some #define in the can_drv.h file > >> > >> // #define NB_MOB 15 > >> #define NB_MOB 6 // edited for ATmegaxxM1 > >> #define NB_DATA_MAX 8 > >> #define LAST_MOB_NB (NB_MOB-1) > >> #define NO_MOB 0xFF > >> // -- > >> //typedef enum { > >> //MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, MOB_7, > >> //MOB_8, MOB_9, MOB_10, MOB_11, MOB_12, MOB_13, MOB_14} > >> can_mob_t; > >> typedef enum {MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5} can_mob_t;// > >> edited for ATmegaxxM1 > >> > >> > >> > >> Messaggio originale > >> Da: canfestival-devel@lists.sourceforge.net > >> Data: 12-dic-2018 11.33 > >> A: < canfestival-devel@lists.sourceforge.net> > >> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: Re: R: Re: R: Re: > >> CanFestival on ATmega64M1 in Arduino IDE > >> > >> Sorry my mistake, > >>
Re: [Canfestival-devel] Heartbeat in multi master environment
thanks Lars > Sorry, but i have some problem understanding what you mean. > You have 2 nodes in a sample. > You want to have 20 samples (40 nodes) running on the same network, > exactly . > but when you get to 20 nodes, node number 20 and up does not send any > hearbeat or is it not registerd by canfestival? > I have an initialization , before calling StartTimerLoop() in a loop ,I set the consumer heartbeat value after StartTimerLoop() if the ProducerHeartBeatTimer had been set I get the heartbeat but otherwise no heartbeat handling done. in my case first node with any heartbeat number setting works, but the second node when the heartbeat sets for more than 15 items does not set the ProducerHeartBeatTimer and also no hearbeat for second node receives, in node number below this the program works properly ___________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Do the can messages look okay in the canDispatch function (states.c) On Thu, Dec 13, 2018 at 7:30 PM wrote: > > That's the strange thing. > > The node doesn't react to any message sent > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 13-dic-2018 18.04 > A: > Ogg: Re: [Canfestival-devel] R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: > Re: CanFestival on ATmega64M1 in Arduino IDE > > Strange, > You should get a reply on "all" sdo messages > Does the node react to any messages you send to the node? > > > > > > > On Thu, Dec 13, 2018 at 10:57 AM > wrote: > > > > PDOs every 100ms are running correctly. > > > > The issue remaining is the response from the node. > > > > For instance if I wish to change the event cycle for the PDO from 100ms to > > 70 ms I need to write on the bus: > > > > nodeID 2Bh 00h 18h 05h 46h 00h 00h 00h > > > > where nodeID is 600+ID and in my case is 601 > > > > Normally when you send something on the canbus you get a response from the > > node that depends if the object dictionary element is implemented in the > > dictionary. > > > > In my case I don't get any reply from the node. > > > > I don't know why > > > > > > Messaggio originale > > Da: canfestival-devel@lists.sourceforge.net > > Data: 13-dic-2018 10.07 > > A: > > Ogg: Re: [Canfestival-devel] R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: > > CanFestival on ATmega64M1 in Arduino IDE > > > > so, everything is up and running? > > > > On Wed, 12 Dec 2018, 16:17 < canfestival-devel@lists.sourceforge.net wrote: > >> > >> Ok, > >> > >> solved with > >> > >> // CANIE1 = 0x7F;// Enable the interrupts of all MObs (0..14) > >> // CANIE2 = 0xFF; > >> CANIE2 = 0x3F;// Enable the interrupts of all MObs (0..5) edited for > >> ATmegaxxM1 > >> > >> in the can_AVR.c file > >> > >> Messaggio originale > >> Da: canfestival-devel@lists.sourceforge.net > >> Data: 12-dic-2018 11.49 > >> A: < canfestival-devel@lists.sourceforge.net> > >> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: R: Re: R: Re: R: Re: > >> CanFestival on ATmega64M1 in Arduino IDE > >> > >> > >> the Atmega64M1 has only 6 Mobs instead of 15 of AT90CAN128. > >> > >> So I need to change some #define in the can_drv.h file > >> > >> // #define NB_MOB 15 > >> #define NB_MOB 6 // edited for ATmegaxxM1 > >> #define NB_DATA_MAX 8 > >> #define LAST_MOB_NB (NB_MOB-1) > >> #define NO_MOB 0xFF > >> // -- > >> //typedef enum { > >> //MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, MOB_7, > >> //MOB_8, MOB_9, MOB_10, MOB_11, MOB_12, MOB_13, MOB_14} > >> can_mob_t; > >> typedef enum {MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5} can_mob_t;// > >> edited for ATmegaxxM1 > >> > >> > >> > >> Messaggio originale > >> Da: canfestival-devel@lists.sourceforge.net > >> Data: 12-dic-2018 11.33 > >> A: < canfestival-devel@lists.sourceforge.net> > >> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: Re: R: Re: R: Re: > >> CanFestival on ATmega64M1 in Arduino IDE > >> > >> Sorry my mistake, > >> > >> the number of PDO sent after the operational mode is, of course, equal to > >> NB_TX_MOB = (NB_MOB - NB_RX_MOB) > >> > >> Messaggio originale > >> Da: canfestival-devel@lists.sourceforge.net > >> Data: 12-dic-2018 10.58 > >> A: < canfestival-devel@lists.sourceforge.net> > >> Ogg: [Canfestival-devel] R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival > >> on ATmega64M1 in Arduino IDE > >> > >> Hi, > >> after some proofs I found another issue on the ATmega64M1. > >> > >> Basically and actually I'm able to receive only some PDOs at the beginning > >> (after the operational mode). > >> The number of PDOs receive is based on the NB_RX_MOB define. > >> So if I define NB_RX_MOB = 3 I receive only 3 PDO after the operational > >> mode, if I define it = 6 I receive only 6 PDOs. > >> > >> After that the canbus goes in a sort of stuck mode and I need a master > >> reset to resume the node. > >> > >> The timer1 works properly just adding these instructi
[Canfestival-devel] R: Re: R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
That's the strange thing. The node doesn't react to any message sent Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 13-dic-2018 18.04 A: Ogg: Re: [Canfestival-devel] R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Strange, You should get a reply on "all" sdo messages Does the node react to any messages you send to the node? On Thu, Dec 13, 2018 at 10:57 AM wrote: > > PDOs every 100ms are running correctly. > > The issue remaining is the response from the node. > > For instance if I wish to change the event cycle for the PDO from 100ms to 70 > ms I need to write on the bus: > > nodeID 2Bh 00h 18h 05h 46h 00h 00h 00h > > where nodeID is 600+ID and in my case is 601 > > Normally when you send something on the canbus you get a response from the > node that depends if the object dictionary element is implemented in the > dictionary. > > In my case I don't get any reply from the node. > > I don't know why > > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 13-dic-2018 10.07 > A: > Ogg: Re: [Canfestival-devel] R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: > CanFestival on ATmega64M1 in Arduino IDE > > so, everything is up and running? > > On Wed, 12 Dec 2018, 16:17 < canfestival-devel@lists.sourceforge.net wrote: >> >> Ok, >> >> solved with >> >> // CANIE1 = 0x7F;// Enable the interrupts of all MObs (0..14) >> // CANIE2 = 0xFF; >> CANIE2 = 0x3F;// Enable the interrupts of all MObs (0..5) edited for >> ATmegaxxM1 >> >> in the can_AVR.c file >> >> ----Messaggio originale >> Da: canfestival-devel@lists.sourceforge.net >> Data: 12-dic-2018 11.49 >> A: < canfestival-devel@lists.sourceforge.net> >> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: R: Re: R: Re: R: Re: >> CanFestival on ATmega64M1 in Arduino IDE >> >> >> the Atmega64M1 has only 6 Mobs instead of 15 of AT90CAN128. >> >> So I need to change some #define in the can_drv.h file >> >> // #define NB_MOB 15 >> #define NB_MOB 6 // edited for ATmegaxxM1 >> #define NB_DATA_MAX 8 >> #define LAST_MOB_NB (NB_MOB-1) >> #define NO_MOB 0xFF >> // -- >> //typedef enum { >> //MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, MOB_7, >> //MOB_8, MOB_9, MOB_10, MOB_11, MOB_12, MOB_13, MOB_14 } >> can_mob_t; >> typedef enum {MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5} can_mob_t;// >> edited for ATmegaxxM1 >> >> >> >> Messaggio originale >> Da: canfestival-devel@lists.sourceforge.net >> Data: 12-dic-2018 11.33 >> A: < canfestival-devel@lists.sourceforge.net> >> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival >> on ATmega64M1 in Arduino IDE >> >> Sorry my mistake, >> >> the number of PDO sent after the operational mode is, of course, equal to >> NB_TX_MOB = (NB_MOB - NB_RX_MOB) >> >> Messaggio originale >> Da: canfestival-devel@lists.sourceforge.net >> Data: 12-dic-2018 10.58 >> A: < canfestival-devel@lists.sourceforge.net> >> Ogg: [Canfestival-devel] R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on >> ATmega64M1 in Arduino IDE >> >> Hi, >> after some proofs I found another issue on the ATmega64M1. >> >> Basically and actually I'm able to receive only some PDOs at the beginning >> (after the operational mode). >> The number of PDOs receive is based on the NB_RX_MOB define. >> So if I define NB_RX_MOB = 3 I receive only 3 PDO after the operational >> mode, if I define it = 6 I receive only 6 PDOs. >> >> After that the canbus goes in a sort of stuck mode and I need a master reset >> to resume the node. >> >> The timer1 works properly just adding these instructions: >> >> /* Added by me for Arduino compliance */ >> TCCR1A = 0; >> TCCR1B = 0; >> TIMSK1 = 0; >> /**/ >> >> in the timer_AVR.c >> >> Any suggestion? >> >> Thanks in advance >> >> Messaggio originale >> Da: canfestival-devel@lists.sourceforge.net >> Data: 11-dic-2018 16.01 >> A: < canfestival-devel@lists.sourceforge.net
[Canfestival-devel] R: Re: R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
PDOs every 100ms are running correctly. The issue remaining is the response from the node. For instance if I wish to change the event cycle for the PDO from 100ms to 70 ms I need to write on the bus: nodeID 2Bh 00h 18h 05h 46h 00h 00h 00h where nodeID is 600+ID and in my case is 601 Normally when you send something on the canbus you get a response from the node that depends if the object dictionary element is implemented in the dictionary. In my case I don't get any reply from the node. I don't know why Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 13-dic-2018 10.07 A: Ogg: Re: [Canfestival-devel] R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE so, everything is up and running? On Wed, 12 Dec 2018, 16:17 < canfestival-devel@lists.sourceforge.net wrote: Ok, solved with // CANIE1 = 0x7F;// Enable the interrupts of all MObs (0..14) // CANIE2 = 0xFF; CANIE2 = 0x3F;// Enable the interrupts of all MObs (0..5) edited for ATmegaxxM1 in the can_AVR.c file Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 12-dic-2018 11.49 A: < canfestival-devel@lists.sourceforge.net> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE the Atmega64M1 has only 6 Mobs instead of 15 of AT90CAN128. So I need to change some #define in the can_drv.h file // #define NB_MOB 15 #define NB_MOB 6 // edited for ATmegaxxM1 #define NB_DATA_MAX 8 #define LAST_MOB_NB (NB_MOB-1) #define NO_MOB 0xFF // -- //typedef enum { //MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, MOB_7, //MOB_8, MOB_9, MOB_10, MOB_11, MOB_12, MOB_13, MOB_14} can_mob_t; typedef enum {MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5} can_mob_t;// edited for ATmegaxxM1 Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 12-dic-2018 11.33 A: < canfestival-devel@lists.sourceforge.net> Ogg: [Canfestival-devel] R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Sorry my mistake, the number of PDO sent after the operational mode is, of course, equal to NB_TX_MOB = (NB_MOB - NB_RX_MOB) Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 12-dic-2018 10.58 A: < canfestival-devel@lists.sourceforge.net> Ogg: [Canfestival-devel] R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, after some proofs I found another issue on the ATmega64M1. Basically and actually I'm able to receive only some PDOs at the beginning (after the operational mode). The number of PDOs receive is based on the NB_RX_MOB define. So if I define NB_RX_MOB = 3 I receive only 3 PDO after the operational mode, if I define it = 6 I receive only 6 PDOs. After that the canbus goes in a sort of stuck mode and I need a master reset to resume the node. The timer1 works properly just adding these instructions: /* Added by me for Arduino compliance */ TCCR1A = 0; TCCR1B = 0; TIMSK1 = 0; /**/ in the timer_AVR.c Any suggestion? Thanks in advance Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 16.01 A: < canfestival-devel@lists.sourceforge.net> Ogg: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re:
Re: [Canfestival-devel] R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
so, everything is up and running? On Wed, 12 Dec 2018, 16:17 Ok, > > solved with > > // CANIE1 = 0x7F;// Enable the interrupts of all MObs (0..14) > // CANIE2 = 0xFF; > CANIE2 = 0x3F;// Enable the interrupts of all MObs (0..5) edited for > ATmegaxxM1 > > in the can_AVR.c file > > ----Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 12-dic-2018 11.49 > A: > Ogg: [Canfestival-devel] R: R: R: R: R: R: R: R: Re: R: Re: R: Re: > CanFestival on ATmega64M1 in Arduino IDE > > > the Atmega64M1 has only 6 Mobs instead of 15 of AT90CAN128. > > So I need to change some #define in the can_drv.h file > > // #define NB_MOB 15 > #define NB_MOB 6 // edited for ATmegaxxM1 > #define NB_DATA_MAX 8 > #define LAST_MOB_NB (NB_MOB-1) > #define NO_MOB 0xFF > // -- > //typedef enum { > //MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, MOB_7, > //MOB_8, MOB_9, MOB_10, MOB_11, MOB_12, MOB_13, MOB_14} > can_mob_t; > typedef enum {MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5} can_mob_t;// > edited for ATmegaxxM1 > > > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 12-dic-2018 11.33 > A: > Ogg: [Canfestival-devel] R: R: R: R: R: R: R: Re: R: Re: R: Re: > CanFestival on ATmega64M1 in Arduino IDE > > Sorry my mistake, > > the number of PDO sent after the operational mode is, of course, equal to > NB_TX_MOB = (NB_MOB - NB_RX_MOB) > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 12-dic-2018 10.58 > A: > Ogg: [Canfestival-devel] R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival > on ATmega64M1 in Arduino IDE > > Hi, > after some proofs I found another issue on the ATmega64M1. > > Basically and actually I'm able to receive only some PDOs at the beginning > (after the operational mode). > The number of PDOs receive is based on the NB_RX_MOB define. > So if I define NB_RX_MOB = 3 I receive only 3 PDO after the operational > mode, if I define it = 6 I receive only 6 PDOs. > > After that the canbus goes in a sort of stuck mode and I need a master > reset to resume the node. > > The timer1 works properly just adding these instructions: > > /* Added by me for Arduino compliance */ > TCCR1A = 0; > TCCR1B = 0; > TIMSK1 = 0; > /******/ > > in the timer_AVR.c > > Any suggestion? > > Thanks in advance > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 11-dic-2018 16.01 > A: > Ogg: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: CanFestival on > ATmega64M1 in Arduino IDE > > I've found the issue and it was relative to the TCCR1A value. > > Arduino touches this timer at the beginning in the wiring.c file. > > Then actually the timer works but I can receive only five PDO after the > startup. > > After that the CANBUS seems stuck and I don't receive PDO anymore. > > The only way is to make a master reset in order to receive other 5 PDO. > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 11-dic-2018 12.21 > A: > Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: CanFestival on > ATmega64M1 in Arduino IDE > > hello, > I found a strange bug with setting 16bit registers. > > I tried to set 16 bit register OCR1B, but only the lower 8 bits were > applied. > > The datasheet says that for OCR1B you have to first set the upper byte as > documented, and afterwards commit with the lower byte. > this however does not work for me. > > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 11-dic-2018 11.30 > A: > Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: CanFestival on > ATmega64M1 in Arduino IDE > > Hi, > something strange compare if I try to debug the TCNT1 and OCR1B values. > > Why I get only values from 0 to 255? > > The timer1 is a 16bit timer > > ??? > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 11-dic-2018 10.04 > A: > Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 > in Arduino IDE > > Hi, > > probably the issue is that for the ATmega64M1 I have to use the TIMER1 in > CTC mode up to OCR1A as top value? > > Messaggio originale > Da: canfestival-devel@lists.sourceforge.net > Data: 11-dic-2018 9.12 > A: > Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in > Arduino IDE > > I'm using 8MHz external clock. > > Timer should be 8us per tick since that I'
[Canfestival-devel] R: R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Ok, solved with // CANIE1 = 0x7F;// Enable the interrupts of all MObs (0..14) // CANIE2 = 0xFF; CANIE2 = 0x3F;// Enable the interrupts of all MObs (0..5) edited for ATmegaxxM1 in the can_AVR.c file Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 12-dic-2018 11.49 A: Ogg: [Canfestival-devel] R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE the Atmega64M1 has only 6 Mobs instead of 15 of AT90CAN128. So I need to change some #define in the can_drv.h file // #define NB_MOB 15 #define NB_MOB 6 // edited for ATmegaxxM1 #define NB_DATA_MAX 8 #define LAST_MOB_NB (NB_MOB-1) #define NO_MOB 0xFF // -- //typedef enum { //MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, MOB_7, //MOB_8, MOB_9, MOB_10, MOB_11, MOB_12, MOB_13, MOB_14} can_mob_t; typedef enum {MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5} can_mob_t;// edited for ATmegaxxM1 Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 12-dic-2018 11.33 A: Ogg: [Canfestival-devel] R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Sorry my mistake, the number of PDO sent after the operational mode is, of course, equal to NB_TX_MOB = (NB_MOB - NB_RX_MOB) Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 12-dic-2018 10.58 A: Ogg: [Canfestival-devel] R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, after some proofs I found another issue on the ATmega64M1. Basically and actually I'm able to receive only some PDOs at the beginning (after the operational mode). The number of PDOs receive is based on the NB_RX_MOB define. So if I define NB_RX_MOB = 3 I receive only 3 PDO after the operational mode, if I define it = 6 I receive only 6 PDOs. After that the canbus goes in a sort of stuck mode and I need a master reset to resume the node. The timer1 works properly just adding these instructions: /* Added by me for Arduino compliance */ TCCR1A = 0; TCCR1B = 0; TIMSK1 = 0; /**/ in the timer_AVR.c Any suggestion? Thanks in advance Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 16.01 A: Ogg: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I've found the issue and it was relative to the TCCR1A value. Arduino touches this timer at the beginning in the wiring.c file. Then actually the timer works but I can receive only five PDO after the startup. After that the CANBUS seems stuck and I don't receive PDO anymore. The only way is to make a master reset in order to receive other 5 PDO. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 12.21 A: Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE hello, I found a strange bug with setting 16bit registers. I tried to set 16 bit register OCR1B, but only the lower 8 bits were applied. The datasheet says that for OCR1B you have to first set the upper byte as documented, and afterwards commit with the lower byte. this however does not work for me. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 11.30 A: Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, something strange compare if I try to debug the TCNT1 and OCR1B values. Why I get only values from 0 to 255? The timer1 is a 16bit timer ??? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 10.04
[Canfestival-devel] R: R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
the Atmega64M1 has only 6 Mobs instead of 15 of AT90CAN128. So I need to change some #define in the can_drv.h file // #define NB_MOB 15 #define NB_MOB 6 // edited for ATmegaxxM1 #define NB_DATA_MAX 8 #define LAST_MOB_NB (NB_MOB-1) #define NO_MOB 0xFF // -- //typedef enum { //MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, MOB_7, //MOB_8, MOB_9, MOB_10, MOB_11, MOB_12, MOB_13, MOB_14} can_mob_t; typedef enum {MOB_0, MOB_1, MOB_2, MOB_3, MOB_4, MOB_5} can_mob_t;// edited for ATmegaxxM1 Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 12-dic-2018 11.33 A: Ogg: [Canfestival-devel] R: R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Sorry my mistake, the number of PDO sent after the operational mode is, of course, equal to NB_TX_MOB = (NB_MOB - NB_RX_MOB) Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 12-dic-2018 10.58 A: Ogg: [Canfestival-devel] R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, after some proofs I found another issue on the ATmega64M1. Basically and actually I'm able to receive only some PDOs at the beginning (after the operational mode). The number of PDOs receive is based on the NB_RX_MOB define. So if I define NB_RX_MOB = 3 I receive only 3 PDO after the operational mode, if I define it = 6 I receive only 6 PDOs. After that the canbus goes in a sort of stuck mode and I need a master reset to resume the node. The timer1 works properly just adding these instructions: /* Added by me for Arduino compliance */ TCCR1A = 0; TCCR1B = 0; TIMSK1 = 0; /**/ in the timer_AVR.c Any suggestion? Thanks in advance Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 16.01 A: Ogg: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I've found the issue and it was relative to the TCCR1A value. Arduino touches this timer at the beginning in the wiring.c file. Then actually the timer works but I can receive only five PDO after the startup. After that the CANBUS seems stuck and I don't receive PDO anymore. The only way is to make a master reset in order to receive other 5 PDO. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 12.21 A: Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE hello, I found a strange bug with setting 16bit registers. I tried to set 16 bit register OCR1B, but only the lower 8 bits were applied. The datasheet says that for OCR1B you have to first set the upper byte as documented, and afterwards commit with the lower byte. this however does not work for me. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 11.30 A: Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, something strange compare if I try to debug the TCNT1 and OCR1B values. Why I get only values from 0 to 255? The timer1 is a 16bit timer ??? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 10.04 A: Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, probably the issue is that for the ATmega64M1 I have to use the TIMER1 in CTC mode up to OCR1A as top value? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 9.12 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I'm using 8MHz external clock. Timer should be 8us per tick since that I'm
[Canfestival-devel] R: R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Hi,after some proofs I found another issue on the ATmega64M1. Basically and actually I'm able to receive only some PDOs at the beginning (after the operational mode). The number of PDOs receive is based on the NB_RX_MOB define.So if I define NB_RX_MOB = 3 I receive only 3 PDO after the operational mode, if I define it = 6 I receive only 6 PDOs. After that the canbus goes in a sort of stuck mode and I need a master reset to resume the node. The timer1 works properly just adding these instructions: /* Added by me for Arduino compliance */ TCCR1A = 0; TCCR1B = 0; TIMSK1 = 0; /**/ in the timer_AVR.c Any suggestion? Thanks in advance Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 16.01 A: Ogg: [Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I've found the issue and it was relative to the TCCR1A value. Arduino touches this timer at the beginning in the wiring.c file. Then actually the timer works but I can receive only five PDO after the startup. After that the CANBUS seems stuck and I don't receive PDO anymore. The only way is to make a master reset in order to receive other 5 PDO. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 12.21 A: Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE hello, I found a strange bug with setting 16bit registers. I tried to set 16 bit register OCR1B, but only the lower 8 bits were applied. The datasheet says that for OCR1B you have to first set the upper byte as documented, and afterwards commit with the lower byte. this however does not work for me. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 11.30 A: Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, something strange compare if I try to debug the TCNT1 and OCR1B values. Why I get only values from 0 to 255? The timer1 is a 16bit timer ??? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 10.04 A: Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, probably the issue is that for the ATmega64M1 I have to use the TIMER1 in CTC mode up to OCR1A as top value? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 9.12 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I'm using 8MHz external clock. Timer should be 8us per tick since that I'm using the clkio/64 prescaler. So the timing frequency is, or I suppose, 125Khz --> 8us. // The timer is incrementing every 8 us. #define MS_TO_TIMEVAL(ms) ((ms) * 125) #define US_TO_TIMEVAL(us) ((us)>>3) This definition seems to be correct because each timer tick = 8us. In order to have us we have to divide the tick count value by 8 (>>3) instead to have ms we have to multiply by 125. It seems exact. Why you told me that this define are incorrect? Messaggio originale---- Da: canfestival-devel@lists.sourceforge.net Data: 10-dic-2018 20.58 A: Ogg: Re: [Canfestival-devel] R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE This I should be able to help you with in timerscfg.h there are two macros that need to be correct MS_TO_TIMEVAL and US_TO_TIMEVAL They are used to convert ms and us to timer ticks (TIMEVAL) What clock frequency are you using? On Mon, Dec 10, 2018 at 3:13 PM wrote: > > 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
[Canfestival-devel] R: R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
I've found the issue and it was relative to the TCCR1A value. Arduino touches this timer at the beginning in the wiring.c file. Then actually the timer works but I can receive only five PDO after the startup. After that the CANBUS seems stuck and I don't receive PDO anymore. The only way is to make a master reset in order to receive other 5 PDO. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 12.21 A: Ogg: [Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE hello, I found a strange bug with setting 16bit registers. I tried to set 16 bit register OCR1B, but only the lower 8 bits were applied. The datasheet says that for OCR1B you have to first set the upper byte as documented, and afterwards commit with the lower byte. this however does not work for me. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 11.30 A: Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, something strange compare if I try to debug the TCNT1 and OCR1B values. Why I get only values from 0 to 255? The timer1 is a 16bit timer ??? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 10.04 A: Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, probably the issue is that for the ATmega64M1 I have to use the TIMER1 in CTC mode up to OCR1A as top value? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 9.12 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I'm using 8MHz external clock. Timer should be 8us per tick since that I'm using the clkio/64 prescaler. So the timing frequency is, or I suppose, 125Khz --> 8us. // The timer is incrementing every 8 us. #define MS_TO_TIMEVAL(ms) ((ms) * 125) #define US_TO_TIMEVAL(us) ((us)>>3) This definition seems to be correct because each timer tick = 8us. In order to have us we have to divide the tick count value by 8 (>>3) instead to have ms we have to multiply by 125. It seems exact. Why you told me that this define are incorrect? Messaggio originale---- Da: canfestival-devel@lists.sourceforge.net Data: 10-dic-2018 20.58 A: Ogg: Re: [Canfestival-devel] R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE This I should be able to help you with in timerscfg.h there are two macros that need to be correct MS_TO_TIMEVAL and US_TO_TIMEVAL They are used to convert ms and us to timer ticks (TIMEVAL) What clock frequency are you using? On Mon, Dec 10, 2018 at 3:13 PM wrote: > > 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 > INPUTvoid > OUTPUTvoid > **/ > > { > 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
[Canfestival-devel] R: R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
hello, I found a strange bug with setting 16bit registers. I tried to set 16 bit register OCR1B, but only the lower 8 bits were applied. The datasheet says that for OCR1B you have to first set the upper byte as documented, and afterwards commit with the lower byte. this however does not work for me. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 11.30 A: Ogg: [Canfestival-devel] R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, something strange compare if I try to debug the TCNT1 and OCR1B values. Why I get only values from 0 to 255? The timer1 is a 16bit timer ??? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 10.04 A: Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, probably the issue is that for the ATmega64M1 I have to use the TIMER1 in CTC mode up to OCR1A as top value? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 9.12 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I'm using 8MHz external clock. Timer should be 8us per tick since that I'm using the clkio/64 prescaler. So the timing frequency is, or I suppose, 125Khz --> 8us. // The timer is incrementing every 8 us. #define MS_TO_TIMEVAL(ms) ((ms) * 125) #define US_TO_TIMEVAL(us) ((us)>>3) This definition seems to be correct because each timer tick = 8us. In order to have us we have to divide the tick count value by 8 (>>3) instead to have ms we have to multiply by 125. It seems exact. Why you told me that this define are incorrect? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 10-dic-2018 20.58 A: Ogg: Re: [Canfestival-devel] R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE This I should be able to help you with in timerscfg.h there are two macros that need to be correct MS_TO_TIMEVAL and US_TO_TIMEVAL They are used to convert ms and us to timer ticks (TIMEVAL) What clock frequency are you using? On Mon, Dec 10, 2018 at 3:13 PM wrote: > > 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 > INPUTvoid > OUTPUTvoid > **/ > > { > 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: > 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 m
[Canfestival-devel] R: R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Hi,something strange compare if I try to debug the TCNT1 and OCR1B values. Why I get only values from 0 to 255? The timer1 is a 16bit timer ??? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 10.04 A: Ogg: [Canfestival-devel] R: R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE Hi, probably the issue is that for the ATmega64M1 I have to use the TIMER1 in CTC mode up to OCR1A as top value? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 11-dic-2018 9.12 A: Ogg: [Canfestival-devel] R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE I'm using 8MHz external clock. Timer should be 8us per tick since that I'm using the clkio/64 prescaler. So the timing frequency is, or I suppose, 125Khz --> 8us. // The timer is incrementing every 8 us. #define MS_TO_TIMEVAL(ms) ((ms) * 125) #define US_TO_TIMEVAL(us) ((us)>>3) This definition seems to be correct because each timer tick = 8us. In order to have us we have to divide the tick count value by 8 (>>3) instead to have ms we have to multiply by 125. It seems exact. Why you told me that this define are incorrect? Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 10-dic-2018 20.58 A: Ogg: Re: [Canfestival-devel] R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE This I should be able to help you with in timerscfg.h there are two macros that need to be correct MS_TO_TIMEVAL and US_TO_TIMEVAL They are used to convert ms and us to timer ticks (TIMEVAL) What clock frequency are you using? On Mon, Dec 10, 2018 at 3:13 PM wrote: > > 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 > INPUTvoid > OUTPUTvoid > **/ > > { > 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: > 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 > 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] Heartbeat in multi master environment
Hi everyone I want to use the heartbeat feature of can open. My 'sample' contains 2 node which both of them are master, every node produces heartbeat too, I want to have a network of 20 'sample's untill 10 sample everything is okay( by assigning 10 consumer id, obj1016), But on 20 consumer id ,heartbeat for second node doesn't produce and producerheartbeartimer is -1 . Could you help me in handing this problem? ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] R: Re: R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
I'm using 8MHz external clock. Timer should be 8us per tick since that I'm using the clkio/64 prescaler. So the timing frequency is, or I suppose, 125Khz --> 8us. In this way the timer overflow is around 500ms Isn't it? Inviato dal mio dispositivo Samsung Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 10/12/18 20:58 (GMT+01:00) A: canfestival-devel@lists.sourceforge.net Oggetto: Re: [Canfestival-devel] R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE This I should be able to help you with in timerscfg.h there are two macros that need to be correct MS_TO_TIMEVAL and US_TO_TIMEVAL They are used to convert ms and us to timer ticks (TIMEVAL) What clock frequency are you using? On Mon, Dec 10, 2018 at 3:13 PM wrote: > > 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: > 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 > 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: > > 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 > > 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, f
[Canfestival-devel] R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
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 INPUTvoid OUTPUTvoid **/ { 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: 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 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: > 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 > 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 itmaking 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 >
[Canfestival-devel] R: Re: R: Re: CanFestival on ATmega64M1 in Arduino IDE
Hi, the ATmega64M1 is really very similar to the at90can128 watching the datasheet. The Arduino project that I made starting from the CanFestival AVR example is not in the Arduino philosophy but it's just a project to compile using the gcc compiler. So there's no difference comparated to the ATstudio example which is in the CanFestival package. The issue is that I cannot attach any files otherwise I would give the whole folder to put in the Arduino libraries directory. Anyway I'll try to do some other proofs soon. Messaggio originale Da: canfestival-devel@lists.sourceforge.net Data: 6-dic-2018 21.04 A: 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 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: > 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 > 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 itmaking 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
[Canfestival-devel] R: Re: CanFestival on ATmega64M1 in Arduino IDE
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: 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 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 itmaking 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] SDO block transfer
Hi everyone Where can I find example of using SDO block transfer using canfestival library ? ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] CanFestival on ATmega64M1 in Arduino IDE
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 itmaking 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
Re: [Canfestival-devel] Making multiple nodes with one node.c and node.h
What you want to do is not supported at all by canFestival. It can be done with lots hacking, but Francois Beaulier has a branch that is able to dynamically build the OD https://bitbucket.org/Mongo/canfestival-3-asc maybe that is a easyer way for your project On Sat, Nov 17, 2018 at 1:10 PM wrote: > > Many thanks for your response > Yes , I want to use multiple ids in a program > Actually my program connect to multiple bus and may their ids be different. > I want for example make a class which handle a can opennode and use it in > multiple project, > Some of my project have about 70 node ids and making .c and .h for each node > makes the code so messy. > > Waiting for your response, thanks > _______ > 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
Re: [Canfestival-devel] Making multiple nodes with one node.c and node.h
Many thanks for your response Yes , I want to use multiple ids in a program Actually my program connect to multiple bus and may their ids be different. I want for example make a class which handle a can opennode and use it in multiple project, Some of my project have about 70 node ids and making .c and .h for each node makes the code so messy. Waiting for your response, thanks ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Making multiple nodes with one node.c and node.h
Hi, So you want to use the same co_data for multiple IDs inside one program? That is not possible without a loot of hacking the code. CanFestival uses a loot of global variables and hardcoded functions node.c files. Yes you can fix it, but you will need to change a loot. A simpler fix would be to make a script that makes multiple individual node.c files by doing search and replace of the nodename. But, why do you want/need to use multiple IDs, pr. node? On Sat, Nov 17, 2018 at 7:25 AM wrote: > > Hi all > I have a problem using canopen node > I have a series of nodes that they communicate through canopen. > Each node may have multiple ids for communicate with different nodes , but I > want to use same node.c and node.h for all of them. > I try > 1. To copy the value of co_data but it failed because it was unable to copy > the index table variable. > 2. To put multiple co_ data variables but because all them use same > initializer and their values are equal > > What can I do to solve this problem, > Many thanks > > ___________ > 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] Making multiple nodes with one node.c and node.h
Hi all I have a problem using canopen node I have a series of nodes that they communicate through canopen. Each node may have multiple ids for communicate with different nodes , but I want to use same node.c and node.h for all of them. I try 1. To copy the value of co_data but it failed because it was unable to copy the index table variable. 2. To put multiple co_ data variables but because all them use same initializer and their values are equal What can I do to solve this problem, Many thanks ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Raising Event from slave to master
Hi, so sdo write slave->master it is working, but sdo write master->slave is not? afik there is no reason that should not work. best regards Lars On Thu, Nov 1, 2018, 06:24 Hi all > I have a problem in using canopen > I have a master and a slave node. > When I want to write slave from master and get the event of that in slave > everything is okay (with SDO) > But I need a event in opposite direction . Is that possible? > I need to change some variables value is master from slave and get event > for that in master. > > Waiting for your guides > Thanks for your help > ___________ > 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] Raising event on uploading master data in slave
Hi all I have a master and a slave which communicate through Ethernet link, they only use SDO without any PDO enabling option. I want to know if I can have event on slave when master sends an upload request and gets back the successful upload result. Many thanks -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] CAN Festival device stop on Windows is even much more worse - here is my final fix
Hi folks, I has been solved a problem why CAN Festival unload takes too much time cca 10s - 15s. I have read this article: https://blogs.msdn.microsoft.com/oldnewthing/20070904-00/?p=25283/ The main problem becomes when "int canClose(CO_Data *d)" is called from DllMain() function that needs to unload CanFestival.dll. This function is serialised and the thread never reach signalled state until the current thread will exit DllMain. So I propose a new fix that pools 100ms thread exit flag and also signalled state. During normal conditions the thread ends below 100ms and performance is not affected. Whole fix is stored here with prebuilt DLLs for windows: http://78.108.103.11/~fojtik/CAN_Festival/CanFestival-3.patch.zip * /** Wait one second to thread exit, otherwise kill it. *The current application is somehow tricky. When called from DllMain(), the thread end will never * be signalised as far as the thread wants to call same DllMain() and waits for serialisator. * The workaround is to pool used flag and when thread reports its end, let OS to finish is. * See: https://blogs.msdn.microsoft.com/oldnewthing/20070904-00/?p=25283/ */ void WaitReceiveTaskEnd(TASK_HANDLE *Thread, volatile signed char *used) { int i; for(i=0; i<10; i++) { if(WaitForSingleObject(*Thread,100) != WAIT_TIMEOUT) break; // Thread exit is signalised properly from system if(*used<0) break; // Thread finished properly } if(*used >= 0)// We are in trouble and thread must be killed. { TerminateThread(*Thread, -1); } CloseHandle(*Thread); } * regards Jara -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me in finding time difference in canopen
Hi, There is no builtin timemarking mechanism in CAN Festival. Use regular Linux or Windows timers - like GetTickCount(). > > I want to get time difference between current time and when last update > happened on master object dictionary using PDO protocol. how can I do this? > You can add callbacks to the dictionary elements. When callback is called > you run your own code that saves the timedate. > > > Also is there a way to understand the last time of updation of data > (that is received via SDO server(master) ) on client(slave). > I do not understand this question regards Jara -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] Device stopping flaw in CAN Festival
Dears, Where is the latest CanFestival repository? https://hg.beremiz.org/CanFestival-3/ here? My current snapshot is here: http://78.108.103.11/~fojtik/CAN_Festival/CanFestival-3.patch.zip I have found a following defect when you want to stop device on Windows: "canReceiveLoop" is endless loop until the used flag is unset. When a handle is closed, the loop is still looping without any problem. The "used" flag should be cleared before. Before several years I have implemented timeout but it seems that without flag clearing only timeout works and kills the thread. Also the "used" variable should be volatile to prevent compiler optimisation. The result is that application hangs for several seconds before it finally ends. Full patched win32.c is in attachment of this mail. /***/ DWORD WINAPI canReceiveLoop(CAN_PORT port) { Message m; while(((CANPort*)port)->used) /* Loop while used flagis set != 0 */ { if(m_canReceive(((CANPort*)port)->fd, ) != 0) continue; EnterMutex(); canDispatch(((CANPort*)port)->d, ); LeaveMutex(); } return 0; } /***/ int canClose(CO_Data * d) { UNS8 res; CANPort* tmp; tmp = (CANPort*)d->canHandle; if(tmp) { d->canHandle = NULL; // signalise waiting thtread that it should exit now. tmp->used = 0; ///<<<<<<<<<<<<< PROPOSED FIX <<<<<<<<< // close CAN port res = m_canClose(tmp->fd); // kill receiver task WaitReceiveTaskEnd(>receiveTask); // final cleanup used flag as a last step. tmp->used = 0; } else res = 255; return res; } /***/ /* CAN port structure */ typedef struct { volatile char used; /**< flag indicating CAN port usage, will be used to abort Receiver task*/ CAN_HANDLE fd;/**< CAN port file descriptor*/ TASK_HANDLE receiveTask; /**< CAN Receiver task*/ CO_Data* d; /**< CAN object data*/ }CANPort; regards Jara win32.c Description: Binary data -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me in finding time difference in canopen
> I want to get time difference between current time and when last update happened on master object dictionary using PDO protocol. how can I do this? You can add callbacks to the dictionary elements. When callback is called you run your own code that saves the timedate. > Also is there a way to understand the last time of updation of data (that is received via SDO server(master) ) on client(slave). I do not understand this question Lars -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me to run my own can virtual driver
> > Hi My problem is solved it was because of not handling receive request before send I added my edited codes (candev.cpp and candev.h ) > #ifndef CANDEV_H #define CANDEV_H #include #include #include #include #include #include #include "canBus.h" #include "definition.h" using namespace std; class canBus; class canDev { public: canDev(const int ); virtual ~canDev(); UNS8 canReceive_driver(Message_ *m); UNS8 canSend_driver(const Message_ *m); int TranslateBaudRate(char* optarg); UNS8 canChangeBaudRate_driver(CAN_HANDLE fd0, char *baud); CAN_HANDLE canOpen_driver(s_BOARD_ *board); int canClose_driver(CAN_HANDLE fd0); void canSetBus(canBus *Bus); int getNodeID()const; void setMsgBuffer(Message_ *m); void AddNewBus(char *baudrate, canBus* cBus); bool IsBusPresent(char *baudrate); canBus * GetBusAddress(char *baudrate); static map BusesMap; static int ID; pthread_mutex_t mutex; pthread_cond_t cond; protected: private: canBus *Bus; int nodeID; s_BOARD_ *board; queuebuffer; }; #endif // CANDEV_H #include "candev.h" std::map canDev::BusesMap; int canDev::ID = 0; canDev::canDev(const int ) { this->nodeID = ID; pthread_cond_init(, NULL); pthread_mutex_init(, NULL); ID++; //ctor } canDev::~canDev() { pthread_cond_destroy(); pthread_mutex_destroy(); //dtor } void canDev::canSetBus(canBus *Bus) { if(this->Bus != Bus && this->Bus != NULL) { this->Bus->removeDev(this); } this->Bus = Bus; this->Bus->registerDev(this); this->board->busname = this->Bus->GetBusName(); this->board->baudrate = this->Bus->GetBuadRate(); } UNS8 canDev::canReceive_driver(Message_ *m) { pthread_mutex_lock(); if (buffer.empty()) { pthread_cond_wait(, ); pthread_mutex_unlock(); } Message_ * temp = buffer.front(); m->cob_id = (temp)->cob_id; memcpy(m->data, (temp)->data,8); m->len = (temp)->len; m->rtr = (temp)->rtr; buffer.pop(); delete temp; return 0; } UNS8 canDev::canSend_driver(const Message_ *m) { this->Bus->sendMessage(this, m); return 0; } int canDev::TranslateBaudRate(char *optarg) { if (!strcmp(optarg, "1M")) return (int)1000; if (!strcmp(optarg, "500K")) return (int)500; if (!strcmp(optarg, "250K")) return (int)250; if (!strcmp(optarg, "125K")) return (int)125; if (!strcmp(optarg, "100K")) return (int)100; if (!strcmp(optarg, "50K")) return (int)50; if (!strcmp(optarg, "20K")) return (int)20; if (!strcmp(optarg, "10K")) return (int)10; if (!strcmp(optarg, "5K")) return (int)5; if (!strcmp(optarg, "none")) return 0; return 0x; } UNS8 canDev::canChangeBaudRate_driver( CAN_HANDLE fd0, char *baud) { printf("Faked changing to baud rate %s[%d]\n", baud, TranslateBaudRate(baud)); return 0; } CAN_HANDLE canDev::canOpen_driver(s_BOARD_ *board) { Bus = new canBus(); Bus = NULL; this->board = new s_BOARD_; this->board->baudrate = board->baudrate; this->board->busname = board->busname; return NULL; } int canDev::canClose_driver(CAN_HANDLE fd0) { this->Bus->removeDev(this); return 0; } int canDev::getNodeID()const { return nodeID; } void canDev::setMsgBuffer(Message_ *m) { Message_ * temp = new Message_; temp->cob_id = m->cob_id; memcpy(temp->data, m->data, 8); temp->len = m->len; temp->rtr = m->rtr; buffer.push(temp); pthread_cond_signal(); } void canDev::AddNewBus(char * baudrate, canBus * cBus) { BusesMap[baudrate] = cBus; } bool canDev::IsBusPresent(char * baudrate) { if (BusesMap.empty()) return false; map::iterator it; it = BusesMap.find(baudrate); if (it == BusesMap.end()) { return false; } return true; } canBus * canDev::GetBusAddress(char *baudrate) { map::iterator it; it = BusesMap.find(baudrate); return (*it).second; }------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me to run my own can virtual driver
> > Hi Lars Many thanks for your answer. Interestingly sygwin didn't show me any error and warning. I solved that error but my code have previous problem yet, I added my edited can-New.cpp Looking for you Many thanks // can_new_win32.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" /* This file is part of CanFestival, a library implementing CanOpen Stack. Copyright (C): Edouard TISSERANT See COPYING file for copyrights details. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "candev.h" #include using namespace std; extern "C" { #include "can_driver.h" // UNS8 LIBAPI canReceive_driver(CAN_HANDLE fd0, Message *m) { Message_ * m1 = new Message_; cout << "in recv "; char s[1024]; int res = reinterpret_cast<canDev*>(fd0)->canReceive_driver(m1); if (res == 1) return 1; m->cob_id = m1->cob_id; m->rtr = m1->rtr; m->len = m1->len; m->data[0] = m1->data[0]; m->data[1] = m1->data[1]; m->data[2] = m1->data[2]; m->data[3] = m1->data[3]; m->data[4] = m1->data[4]; m->data[5] = m1->data[5]; m->data[6] = m1->data[6]; m->data[7] = m1->data[7]; printf("{0x%3.3x,%1d,%1d,{0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x}}", m->cob_id, m->rtr, m->len, m->data[0], m->data[1], m->data[2], m->data[3], m->data[4], m->data[5], m->data[6], m->data[7] ); delete m1; cout << "error test4" << endl; #if defined DEBUG_MSG_CONSOLE_ON printf("in : "); print_message(m); #endif return 0; } UNS8 LIBAPI canSend_driver(CAN_HANDLE fd0, Message const *m) { cout << "in send "; char s[1024]; printf("{0x%3.3x,%1d,%1d,{0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x}}", m->cob_id, m->rtr, m->len, m->data[0], m->data[1], m->data[2], m->data[3], m->data[4], m->data[5], m->data[6], m->data[7] ); Message_ * m1 = new Message_; m1->cob_id = m->cob_id; m1->rtr = m->rtr; m1->len = m->len; m1->data[0] = m->data[0]; m1->data[1] = m->data[1]; m1->data[2] = m->data[2]; m1->data[3] = m->data[3]; m1->data[4] = m->data[4]; m1->data[5] = m->data[5]; m1->data[6] = m->data[6]; m1->data[7] = m->data[7]; reinterpret_cast<canDev*>(fd0)->canSend_driver(m1); #if defined DEBUG_MSG_CONSOLE_ON printf("out : "); print_message(m); #endif return 0; } CAN_HANDLE LIBAPI canOpen_driver(s_BOARD *board) { try { cout << "Open \n"; s_BOARD_ temp1; temp1.baudrate = board->baudrate; temp1.busname = board->busname; CAN_HANDLE res = (CAN_HANDLE) new canDev(0); canBus * temp = new canBus(); if (!reinterpret_cast<canDev*>(res)->IsBusPresent(board->baudrate)) { temp = new canBus(board->busname, board->baudrate); reinterpret_cast<canDev*>(res)->AddNewBus(board->baudrate, temp); } else temp = reinterpret_cast<canDev*>(res)->GetBusAddress(board->baudrate); reinterpret_cast<canDev*>(res)->canOpen_driver(); reinterpret_cast<canDev*>(res)->canSetBus(temp); temp->ConnectedDevID(); return res; } catch (...) { cerr << "can_new: couldn't open" << endl; return NULL; } } int LIBAPI canClose_driver(CAN_HANDLE inst) { delete reinterpret_cast<canDev*>(inst); return 1; } UNS8 LIBAPI canChangeBaudRate_driver(CAN_HANDLE fd, char* baud) { cerr << "canChangeBaudRate not yet supported by this driver\n"; return 0; } } -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me to run my own can virtual driver
Hi, I do not have cygwin installed so i am using visual studio, it gave a error while compiling 'uninitialized local variable 'm1' used' That should be fixed. If you did not get a segfault, it is pure luck :) UNS8 LIBAPI canReceive_driver(CAN_HANDLE fd0, Message *m) { Message_ * m1; int res = reinterpret_cast<canDev*>(fd0)->canReceive_driver(m1); You might want to turn on a loot of the compiler warnings as it will help finding bugs. As soon as you have fixed the bug i can take a new look. Happy coding! Best Regards Lars On Tue, Apr 17, 2018 at 2:32 PM, <canfestival-devel@lists.sourceforge.net> wrote: > hi all > I need your help. > I added my source for my_virtual_can driver. > I want to run TestMasterSlave with that. > Its dll is built okay, but when I run it the nodes go to initial state and > then pre operational, > Then the master node goes to post_sync and stuck on that. > please look in my codes and guide me why my program doesn't go to slave boot > up state and other states, > I'll be grateful for any help > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___________ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me using Read and Write SDO with canfestival function.
4. If you are still using windows, could you try to remove config.h from the include folder. It is causing some trubble on my setup. What have you tried av what does the MSG_WAR print out when you try to use sdo On Wed, Apr 4, 2018 at 8:08 AM, <canfestival-devel@lists.sourceforge.net> wrote: > Hi everyone > I found out some of my questions answer, > 1.In virtual serial port we can't have more than one slave. > 2.OD of each node is unique, and we don't force to have slave variables in > master OD. > 3.Virtual driver only works for testmasterslave because it has both sides, > For using canopenshell and win32test we should use a driver , I use serial > and tcp one. As follows: > tcp in windows: > run tcp_server then: > ./CANOpenShell.exe load#libcanfestival_can_tcp_win32.dll,12,125K,8,1 > ./TestMasterSlave.exe -l libcanfestival_can_tcp_win32.dll > > serial in linux: > socat -d -d pty,raw,echo=0 pty,raw,echo=0 > socat[2546] N PTY is /dev/pts/2 > socat[2546] N PTY is /dev/pts/3 > socat[2546] N starting data transfer loop with FDs [3,3] and [5,5] > ./CANOpenShell load#libcanfestival_can_serial.so,/dev/pts/2,125K,8,1 > ./TestMasterSlave -llibcanfestival_can_serial.so -s /dev/pts/3 > > 4.I could not use segment transfer yet, > > Seems this mail list is not alive :) > > Samini > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me using Read and Write SDO with canfestival function.
Hi everyone I found out some of my questions answer, 1.In virtual serial port we can't have more than one slave. 2.OD of each node is unique, and we don't force to have slave variables in master OD. 3.Virtual driver only works for testmasterslave because it has both sides, For using canopenshell and win32test we should use a driver , I use serial and tcp one. As follows: tcp in windows: run tcp_server then: ./CANOpenShell.exe load#libcanfestival_can_tcp_win32.dll,12,125K,8,1 ./TestMasterSlave.exe -l libcanfestival_can_tcp_win32.dll serial in linux: socat -d -d pty,raw,echo=0 pty,raw,echo=0 socat[2546] N PTY is /dev/pts/2 socat[2546] N PTY is /dev/pts/3 socat[2546] N starting data transfer loop with FDs [3,3] and [5,5] ./CANOpenShell load#libcanfestival_can_serial.so,/dev/pts/2,125K,8,1 ./TestMasterSlave -llibcanfestival_can_serial.so -s /dev/pts/3 4.I could not use segment transfer yet, Seems this mail list is not alive :) Samini -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Multi salves at the same time
And using the same port, On 11 Mar 2018 11:11 a.m., "saeedeh amini" <saeedeh.amini3...@gmail.com> wrote: > Hi > I am still waiting for my previous question guideline, I 'll be very > grateful. > I decided to connect my devices using serial port. > A question came to my mind. could I use multiple slaves with only one > object dictionary at the same time or I have to use an object dictionary > for each of them in master? > > Looking for your responses, > Many thanks > Samini > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me using Read and Write SDO with canfestival function.
Hi Lars Many thanks , 1. I am using ubuntu 12.04 2. My configuration command for now ./configure --can=virtual 3.You are right I changed it to 0x1000 4. My load and ssta command load#../../drivers/can-virtual/lib... , 32,10k,8,0 ssta#8 I printed the data.NMTable value , its value is 15, means unknown state. I see initiate upload request and after that abort transfer request on terminal. Many thanks for your response Samini On 27 Feb 2018 7:41 p.m., <canfestival-devel@lists.sourceforge.net> wrote: > Hi Samini, > > Have a few questions > 1. What linux distro and version are you using? > 2. What parameter do you use with ./configure? > 3. In the line 'ReadSDO(nodeId, 1000, 0x00, unit32, data, > sizeof(data))' index is not hex, but decimal, is that intentional? > 4. Could you give the exact command you use to start canOpenShell and > the ssta command > > Best regards > Lars > > > > > > On Sat, Feb 24, 2018 at 5:58 PM, > <canfestival-devel@lists.sourceforge.net> wrote: > > Hi > > I am beginer in using can festival, > > finally i decided to switch to linux, > > I can change value in PDO mapping and access that in both master and > slave, > > But when I use SDO with this method:(this method is in win32test example) > > UNS8 ReadSDO(UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType, > void* > > data, UNS32* size) > > { > >UNS32 abortCode = 0; > >UNS8 res = SDO_UPLOAD_IN_PROGRESS; > >// Read SDO > >UNS8 err = readNetworkDict (_Data, nodeId, index, subIndex, > > dataType, 0); > >if (err) > > return 0xFF; > >for(;;) > > { > > res = getReadResultNetworkDict (_Data, nodeId, data, > size, > > ); > > if (res != SDO_UPLOAD_IN_PROGRESS) > > break; > > sleep_proc(1); > > continue; > > } > >closeSDOtransfer(_Data, nodeId, SDO_CLIENT); > >if (res == SDO_FINISHED) > > return 0; > >return 0xFF; > > } > > and this call: > > > > unit32 data; > > > > ReadSDO(nodeId, 1000, 0x00, unit32, data, sizeof(data)) > > > > I cant get any value as data > > I checked edit .od file and the address I used, the value exists for > them. > > it is same as .od file of TestMasterSlave > > > > I used canOpenShell but on calling funtion ssta,etc I got Segmentation > fault > > and core dump error > > > > many thanks for your help > > > > Samini > > > > > > > > -------- > -- > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > ___ > > Canfestival-devel mailing list > > Canfestival-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___________ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Signifficant improvement of CAN Festival timing on Windows
AD_PRIORITY_HIGHEST); // JFO: Make timer thread wit highest priority. } /* Set the next alarm */ void setTimer(TIMEVAL value) { if(value == TIMEVAL_MAX) CancelWaitableTimer(timer); else { LARGE_INTEGER liDueTime; /* arg 2 of SetWaitableTimer take 100 ns interval */ liDueTime.QuadPart = -value; //printf("SetTimer(%llu)\n", value); if(!SetWaitableTimer(timer, , 0, NULL, NULL, FALSE)) { printf("SetWaitableTimer failed (%d)\n", GetLastError()); } } } /* Get the elapsed time since the last occured alarm. * Callibrated in 100ns quantum. */ TIMEVAL getElapsedTime(void) { LARGE_INTEGER CurrentTime; // struct _timeb timetmp; // _ftime(); // return (timetmp.time - timebuffer.time) * 1000 + (timetmp.millitm - timebuffer.millitm) * 1; if(pFrequency.QuadPart==0) return (TIMEVAL)(timeGetTime()-timebuffer) * 1; QueryPerformanceCounter(); return (TIMEVAL)(1000*(CurrentTime.QuadPart-timebufferXL.QuadPart)/pFrequency.QuadPart); } -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Help me using Read and Write SDO with canfestival function.
Hi Samini, Have a few questions 1. What linux distro and version are you using? 2. What parameter do you use with ./configure? 3. In the line 'ReadSDO(nodeId, 1000, 0x00, unit32, data, sizeof(data))' index is not hex, but decimal, is that intentional? 4. Could you give the exact command you use to start canOpenShell and the ssta command Best regards Lars On Sat, Feb 24, 2018 at 5:58 PM, <canfestival-devel@lists.sourceforge.net> wrote: > Hi > I am beginer in using can festival, > finally i decided to switch to linux, > I can change value in PDO mapping and access that in both master and slave, > But when I use SDO with this method:(this method is in win32test example) > UNS8 ReadSDO(UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType, void* > data, UNS32* size) > { >UNS32 abortCode = 0; >UNS8 res = SDO_UPLOAD_IN_PROGRESS; >// Read SDO >UNS8 err = readNetworkDict (_Data, nodeId, index, subIndex, > dataType, 0); >if (err) > return 0xFF; >for(;;) > { > res = getReadResultNetworkDict (_Data, nodeId, data, size, > ); > if (res != SDO_UPLOAD_IN_PROGRESS) > break; > sleep_proc(1); > continue; > } >closeSDOtransfer(_Data, nodeId, SDO_CLIENT); >if (res == SDO_FINISHED) > return 0; >return 0xFF; > } > and this call: > > unit32 data; > > ReadSDO(nodeId, 1000, 0x00, unit32, data, sizeof(data)) > > I cant get any value as data > I checked edit .od file and the address I used, the value exists for them. > it is same as .od file of TestMasterSlave > > I used canOpenShell but on calling funtion ssta,etc I got Segmentation fault > and core dump error > > many thanks for your help > > Samini > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Signifficant improvement of CAN Festival timing on Windows
Hi J.Fojtik, Great that you have time to debug,fix and provide patches. I have not testet the code, but I have a question: When you use DllMain, would that not create problems if you link static? Would it not be better to move the code in DllMain to initTimer Best regards Lars On Tue, Feb 27, 2018 at 11:36 AM, <canfestival-devel@lists.sourceforge.net> wrote: > Dears, > > I has been fixed: > CanFestival\drivers\timers_win32\timers_win32.c > see attachment. > > The function timeGetTime() is not granted to have better granularity than > 5ms. > It causes big jitter. > > After my fix, the timing jitter will signifficantly drop. > > > And more, when "QueryPerformanceCounter()" is not available, the older > timing mechanism > is used instead. It is granted on WindowsXP that performance counter is > always available. > > > > The new think is to add DllMain() function. The whole CanFestival DLL does > not have this > function, so adding it to timers_win32.c would not hurt anybody. > > best regards >J.Fojtik > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] Signifficant improvement of CAN Festival timing on Windows
Dears, I has been fixed: CanFestival\drivers\timers_win32\timers_win32.c see attachment. The function timeGetTime() is not granted to have better granularity than 5ms. It causes big jitter. After my fix, the timing jitter will signifficantly drop. And more, when "QueryPerformanceCounter()" is not available, the older timing mechanism is used instead. It is granted on WindowsXP that performance counter is always available. The new think is to add DllMain() function. The whole CanFestival DLL does not have this function, so adding it to timers_win32.c would not hurt anybody. best regards J.Fojtik timers_win32.c Description: Binary data -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] Help me using Read and Write SDO with canfestival function.
Hi I am beginer in using can festival, finally i decided to switch to linux, I can change value in PDO mapping and access that in both master and slave, But when I use SDO with this method:(this method is in win32test example) UNS8 ReadSDO(UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType, void* data, UNS32* size) { UNS32 abortCode = 0; UNS8 res = SDO_UPLOAD_IN_PROGRESS; // Read SDO UNS8 err = readNetworkDict (_Data, nodeId, index, subIndex, dataType, 0); if (err) return 0xFF; for(;;) { res = getReadResultNetworkDict (_Data, nodeId, data, size, ); if (res != SDO_UPLOAD_IN_PROGRESS) break; sleep_proc(1); continue; } closeSDOtransfer(_Data, nodeId, SDO_CLIENT); if (res == SDO_FINISHED) return 0; return 0xFF; } and this call: unit32 data; ReadSDO(nodeId, 1000, 0x00, unit32, data, sizeof(data)) I cant get any value as data I checked edit .od file and the address I used, the value exists for them. it is same as .od file of TestMasterSlave I used canOpenShell but on calling funtion ssta,etc I got Segmentation fault and core dump error many thanks for your help Samini -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] help me configuring canfestival in windows
Hi all Thanks for your answers. I found out how make .c and .h file using .od file This line on cygwin In root of canfestival: python ../objectdictgen/objective.py examples/TestMasterSlave/TestMaster.od TestMaster.c python ../objectdictgen/objective.py examples/TestMasterSlave/TestSlave.od TestSlave.c Finally I found out that because of deleting -mno-cygwin flag :(( Then I decided to switch to linux On 22 Feb 2018 12:12 p.m., <canfestival-devel@lists.sourceforge.net> wrote: > Hi, > Those missing file are generated from the .od files. > > See link below to learn how to do that. > https://canfestival.org/doc > > > On Feb 13, 2018 09:57, <canfestival-devel@lists.sourceforge.net> wrote: > >> Hi >> I want to use only vs, but it seems impossibly! >> Whenever I open canfestival root project, I can build canfestival library >> successfully but when I want to build other projects , I find out that some >> source files don't exist. >> For example in nimrof-canfestival (source you are >> using)/examples/testmasterslave there isn't any testmaster.c or >> testslave.c and I don't know what should I do! >> Then I force to build these files using cygwin and make file . >> Thanks for your patience and answers >> On 13 Feb 2018 3:22 a.m., <canfestival-devel@lists.sourceforge.net> >> wrote: >> >>> Il Mon, 12 Feb 2018 12:08:26 +0330 canfestival-devel@lists.source >>> forge.net scrisse: >>> >>> > Yes, my callsatck: >>> > >>> > cygwin1.dll!610dda44() Unknown >>> > >>> > [Frames below may be incorrect and/or missing, no symbols loaded for >>> > cygwin1.dll] >>> > >>> > CanFestival-3.dll!scanIndexOD(struct_CO_Data * d, unsigned short >>> wIndex, >>> > unsigned long * errorCode, unsigned long (struct_CO_Data *, const >>> > td_indextable *, unsigned char) * * * Callback) Line 267 C >>> > On 12 Feb 2018 11:17 a.m., <canfestival-devel@lists.sourceforge.net> >>> wrote: >>> >>> I do not have first hand experience with CANfestival but I have >>> cross-built and built natively many open source projects on >>> windows in different ways. >>> >>> Here are a couple of quick notes to avoid losing time on a dead >>> horse. >>> >>> 1. Cygwin and the typical windows environment are a lot different, >>>to the point that cygwin is more similar to a POSIX system than >>>to a native windows system. This is the reason you'll see a lot >>>of snippets like `if unix or cygwin ... elseif windows ...`. >>> >>> 2. Do not mix runtime libraries! In your specific case you are >>>mixing cygwin with msvcrt: this is a recipe for disaster. >>>Although it could happen to work on hello word programs, >>>anything more complex will likely crash. See e.g.: >>> >>>https://stackoverflow.com/questions/1926311/cygwin-in-visual-studio >>> >>> Just build everything with VS or with cygwin. >>> >>> Ciao. >>> -- >>> Nicola >>> >>> >>> -- >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______ >>> Canfestival-devel mailing list >>> Canfestival-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/canfestival-devel >>> >> >> ---- >> ------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Canfestival-devel mailing list >> Canfestival-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/canfestival-devel >> >> > ---- > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] help me configuring canfestival in windows
Hi, Those missing file are generated from the .od files. See link below to learn how to do that. https://canfestival.org/doc On Feb 13, 2018 09:57, <canfestival-devel@lists.sourceforge.net> wrote: > Hi > I want to use only vs, but it seems impossibly! > Whenever I open canfestival root project, I can build canfestival library > successfully but when I want to build other projects , I find out that some > source files don't exist. > For example in nimrof-canfestival (source you are > using)/examples/testmasterslave there isn't any testmaster.c or > testslave.c and I don't know what should I do! > Then I force to build these files using cygwin and make file . > Thanks for your patience and answers > On 13 Feb 2018 3:22 a.m., <canfestival-devel@lists.sourceforge.net> wrote: > >> Il Mon, 12 Feb 2018 12:08:26 +0330 canfestival-devel@lists.source >> forge.net scrisse: >> >> > Yes, my callsatck: >> > >> > cygwin1.dll!610dda44() Unknown >> > >> > [Frames below may be incorrect and/or missing, no symbols loaded for >> > cygwin1.dll] >> > >> > CanFestival-3.dll!scanIndexOD(struct_CO_Data * d, unsigned short >> wIndex, >> > unsigned long * errorCode, unsigned long (struct_CO_Data *, const >> > td_indextable *, unsigned char) * * * Callback) Line 267 C >> > On 12 Feb 2018 11:17 a.m., <canfestival-devel@lists.sourceforge.net> >> wrote: >> >> I do not have first hand experience with CANfestival but I have >> cross-built and built natively many open source projects on >> windows in different ways. >> >> Here are a couple of quick notes to avoid losing time on a dead >> horse. >> >> 1. Cygwin and the typical windows environment are a lot different, >>to the point that cygwin is more similar to a POSIX system than >>to a native windows system. This is the reason you'll see a lot >>of snippets like `if unix or cygwin ... elseif windows ...`. >> >> 2. Do not mix runtime libraries! In your specific case you are >>mixing cygwin with msvcrt: this is a recipe for disaster. >>Although it could happen to work on hello word programs, >>anything more complex will likely crash. See e.g.: >> >>https://stackoverflow.com/questions/1926311/cygwin-in-visual-studio >> >>Just build everything with VS or with cygwin. >> >> Ciao. >> -- >> Nicola >> >> ---- >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Canfestival-devel mailing list >> Canfestival-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/canfestival-devel >> > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] help me configuring canfestival in windows
Hi I want to use only vs, but it seems impossibly! Whenever I open canfestival root project, I can build canfestival library successfully but when I want to build other projects , I find out that some source files don't exist. For example in nimrof-canfestival (source you are using)/examples/testmasterslave there isn't any testmaster.c or testslave.c and I don't know what should I do! Then I force to build these files using cygwin and make file . Thanks for your patience and answers On 13 Feb 2018 3:22 a.m., <canfestival-devel@lists.sourceforge.net> wrote: > Il Mon, 12 Feb 2018 12:08:26 +0330 canfestival-devel@lists.sourceforge.net > scrisse: > > > Yes, my callsatck: > > > > cygwin1.dll!610dda44() Unknown > > > > [Frames below may be incorrect and/or missing, no symbols loaded for > > cygwin1.dll] > > > > CanFestival-3.dll!scanIndexOD(struct_CO_Data * d, unsigned short wIndex, > > unsigned long * errorCode, unsigned long (struct_CO_Data *, const > > td_indextable *, unsigned char) * * * Callback) Line 267 C > > On 12 Feb 2018 11:17 a.m., <canfestival-devel@lists.sourceforge.net> > wrote: > > I do not have first hand experience with CANfestival but I have > cross-built and built natively many open source projects on > windows in different ways. > > Here are a couple of quick notes to avoid losing time on a dead > horse. > > 1. Cygwin and the typical windows environment are a lot different, >to the point that cygwin is more similar to a POSIX system than >to a native windows system. This is the reason you'll see a lot >of snippets like `if unix or cygwin ... elseif windows ...`. > > 2. Do not mix runtime libraries! In your specific case you are >mixing cygwin with msvcrt: this is a recipe for disaster. >Although it could happen to work on hello word programs, >anything more complex will likely crash. See e.g.: > >https://stackoverflow.com/questions/1926311/cygwin-in-visual-studio > >Just build everything with VS or with cygwin. > > Ciao. > -- > Nicola > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > ---------- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] help me configuring canfestival in windows
Il Mon, 12 Feb 2018 12:08:26 +0330 canfestival-devel@lists.sourceforge.net scrisse: > Yes, my callsatck: > > cygwin1.dll!610dda44() Unknown > > [Frames below may be incorrect and/or missing, no symbols loaded for > cygwin1.dll] > > CanFestival-3.dll!scanIndexOD(struct_CO_Data * d, unsigned short wIndex, > unsigned long * errorCode, unsigned long (struct_CO_Data *, const > td_indextable *, unsigned char) * * * Callback) Line 267 C > On 12 Feb 2018 11:17 a.m., <canfestival-devel@lists.sourceforge.net> wrote: I do not have first hand experience with CANfestival but I have cross-built and built natively many open source projects on windows in different ways. Here are a couple of quick notes to avoid losing time on a dead horse. 1. Cygwin and the typical windows environment are a lot different, to the point that cygwin is more similar to a POSIX system than to a native windows system. This is the reason you'll see a lot of snippets like `if unix or cygwin ... elseif windows ...`. 2. Do not mix runtime libraries! In your specific case you are mixing cygwin with msvcrt: this is a recipe for disaster. Although it could happen to work on hello word programs, anything more complex will likely crash. See e.g.: https://stackoverflow.com/questions/1926311/cygwin-in-visual-studio Just build everything with VS or with cygwin. Ciao. -- Nicola -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] help me configuring canfestival in windows
Yes, my callsatck: cygwin1.dll!610dda44() Unknown [Frames below may be incorrect and/or missing, no symbols loaded for cygwin1.dll] CanFestival-3.dll!scanIndexOD(struct_CO_Data * d, unsigned short wIndex, unsigned long * errorCode, unsigned long (struct_CO_Data *, const td_indextable *, unsigned char) * * * Callback) Line 267 C On 12 Feb 2018 11:17 a.m., <canfestival-devel@lists.sourceforge.net> wrote: > Okay, > But, could you print out the stack? > > > On Mon, Feb 12, 2018 at 2:54 PM, <canfestival-devel@lists.sourceforge.net> > wrote: > >> Hi >> This exception thrown at 0x610DDA44 (cygwin.dll ) in TestMasterSlave.exe >> : 0xc005 Access violation writing location 0 >> This exception occur >> On 11 Feb 2018 12:16 p.m., <canfestival-devel@lists.sourceforge.net> >> wrote: >> >>> Hi >>> when I clone the files and then open the project I need driver, >>> Do your folder contained dll files. >>> without dll I can't see output for program. >>> >>> I can bulid project in visual stdio but in runnig >>> for example for TestMasterSlave I get exception on canOpen(s_BOARD >>> *board, CO_Data * d) function >>> at this line fd0 = m_canOpen(board); >>> I haven't access to it now but I will send exception detail to you >>> tommorrow. >>> >>> following is my steps >>> In cygwin in root of canfestival: >>> *)run ./configure --target=win32 --can=tcp_win32 >>> *)change make file in these directories (\drivers\can_tcp_win32(I used >>> --can=tcp_win32), drivers\timers_win32, drivers\win32, \src) and delete >>> $(PROG_CFLAGS) file from them >>> *)then run make and make install >>> *)open vs file on root of can festival compile canfestival >>> *)then compile any of projects TestMasterSlave, .. and build it >>> *)go to Debug folder in cygwin and run exe with suitable input >>> *)for testing in tcp mode I first run server.exe >>> *) then for TestMasterSlave : TestMasterSlave.exe -s 0 -S 10K -m 1 _M >>> 10K -l ../../drivers/can_tcp_win32/libcanfestival_can_tcp_win32.dll >>> for TestMasterMicro Mode: TestMasteMicroMod.exe -i 8 -l >>> ../../drivers/can_tcp_win32/libcanfestival_can_tcp_win32.dll >>> >>> On Sat, Feb 10, 2018 at 5:24 PM, <canfestival-devel@lists.sourc >>> eforge.net> wrote: >>> >>>> Hi, >>>> >>>> On windows i mainly develope using vs community 2017 v 15.5.5 (latest) >>>> I have not switch compiler or anything like that. >>>> Just clean installed. >>>> >>>> i have just cloned my can festival repository. >>>> Any build the project from scratch. >>>> >>>> Open CanFestival-3.vc15.sln >>>> switch to x86 debug >>>> build canfestival >>>> build CANOpenShell.exe >>>> run CANOpenShell.exe >>>> >>>> In addition i am working on unit-testing so i have loaded and testet >>>> the tcp driver and server so that i am 100% sure that works with visual >>>> studio >>>> >>>> Questions: >>>> >>>> 1. So everything is now working with cygwin? >>>> 2. Please write a few lines about how you mix cygwin with vs. >>>> 2. If you can do some simple debuging to find out where the exceptions >>>> is raised. >>>> 3. What exception is raised? >>>> >>>> On Sat, Feb 10, 2018 at 8:44 PM, <canfestival-devel@lists.sourc >>>> eforge.net> wrote: >>>> >>>>> Hi Again >>>>> You are right, testmasterslave and testmastermicromode run okey >>>>> But for me only on cygwin not on vs. >>>>> Did you run your code .exe on vs? >>>>> On vs I'm still getting exception >>>>> Many thanks for your response. >>>>> On 10 Feb 2018 12:00 p.m., <canfestival-devel@lists.sourceforge.net> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I compile it from command line and do use visual studio together with >>>>>> cygwin >>>>>> >>>>>> when I stand in the project root in cmd: >>>>>> set PATH=C:\cygwin\bin;%PATH% >>>>>> bash -c ./configure >>>>>> make >>>>>> >>>>>> to run: >>>>>> set PATH=C:\cygwin\bin;%PATH% >>>>>> then run the exes >>>>>> >>>>>> I have tested
Re: [Canfestival-devel] help me configuring canfestival in windows
Okay, But, could you print out the stack? On Mon, Feb 12, 2018 at 2:54 PM, <canfestival-devel@lists.sourceforge.net> wrote: > Hi > This exception thrown at 0x610DDA44 (cygwin.dll ) in TestMasterSlave.exe : > 0xc005 Access violation writing location 0 > This exception occur > On 11 Feb 2018 12:16 p.m., <canfestival-devel@lists.sourceforge.net> > wrote: > >> Hi >> when I clone the files and then open the project I need driver, >> Do your folder contained dll files. >> without dll I can't see output for program. >> >> I can bulid project in visual stdio but in runnig >> for example for TestMasterSlave I get exception on canOpen(s_BOARD >> *board, CO_Data * d) function >> at this line fd0 = m_canOpen(board); >> I haven't access to it now but I will send exception detail to you >> tommorrow. >> >> following is my steps >> In cygwin in root of canfestival: >> *)run ./configure --target=win32 --can=tcp_win32 >> *)change make file in these directories (\drivers\can_tcp_win32(I used >> --can=tcp_win32), drivers\timers_win32, drivers\win32, \src) and delete >> $(PROG_CFLAGS) file from them >> *)then run make and make install >> *)open vs file on root of can festival compile canfestival >> *)then compile any of projects TestMasterSlave, .. and build it >> *)go to Debug folder in cygwin and run exe with suitable input >> *)for testing in tcp mode I first run server.exe >> *) then for TestMasterSlave : TestMasterSlave.exe -s 0 -S 10K -m 1 _M >> 10K -l ../../drivers/can_tcp_win32/libcanfestival_can_tcp_win32.dll >> for TestMasterMicro Mode: TestMasteMicroMod.exe -i 8 -l >> ../../drivers/can_tcp_win32/libcanfestival_can_tcp_win32.dll >> >> On Sat, Feb 10, 2018 at 5:24 PM, <canfestival-devel@lists.sourceforge.net >> > wrote: >> >>> Hi, >>> >>> On windows i mainly develope using vs community 2017 v 15.5.5 (latest) >>> I have not switch compiler or anything like that. >>> Just clean installed. >>> >>> i have just cloned my can festival repository. >>> Any build the project from scratch. >>> >>> Open CanFestival-3.vc15.sln >>> switch to x86 debug >>> build canfestival >>> build CANOpenShell.exe >>> run CANOpenShell.exe >>> >>> In addition i am working on unit-testing so i have loaded and testet the >>> tcp driver and server so that i am 100% sure that works with visual studio >>> >>> Questions: >>> >>> 1. So everything is now working with cygwin? >>> 2. Please write a few lines about how you mix cygwin with vs. >>> 2. If you can do some simple debuging to find out where the exceptions >>> is raised. >>> 3. What exception is raised? >>> >>> On Sat, Feb 10, 2018 at 8:44 PM, <canfestival-devel@lists.sourc >>> eforge.net> wrote: >>> >>>> Hi Again >>>> You are right, testmasterslave and testmastermicromode run okey >>>> But for me only on cygwin not on vs. >>>> Did you run your code .exe on vs? >>>> On vs I'm still getting exception >>>> Many thanks for your response. >>>> On 10 Feb 2018 12:00 p.m., <canfestival-devel@lists.sourceforge.net> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I compile it from command line and do use visual studio together with >>>>> cygwin >>>>> >>>>> when I stand in the project root in cmd: >>>>> set PATH=C:\cygwin\bin;%PATH% >>>>> bash -c ./configure >>>>> make >>>>> >>>>> to run: >>>>> set PATH=C:\cygwin\bin;%PATH% >>>>> then run the exes >>>>> >>>>> I have tested CANOpenShell, TestMasterMicroMod and TestMasterSlave, >>>>> but i have not loaded any driver. >>>>> It all runs fine >>>>> >>>>> >>>>> >>>>> On Sat, Feb 10, 2018 at 12:59 AM, <canfestival-devel@lists.sourc >>>>> eforge.net> wrote: >>>>> >>>>>> Hi >>>>>> Could you please tell me your steps? >>>>>> I do the configure steps and then I open the visual studio project to >>>>>> run it, >>>>>> >>>>>> I test the ./configure --target=win32 --can=tcp_wi32 --timers=unix >>>>>> but I got the same error "Segmentation fault and Exception on loading >>>>>&
Re: [Canfestival-devel] help me configuring canfestival in windows
Hi Again You are right, testmasterslave and testmastermicromode run okey But for me only on cygwin not on vs. Did you run your code .exe on vs? On vs I'm still getting exception Many thanks for your response. On 10 Feb 2018 12:00 p.m., <canfestival-devel@lists.sourceforge.net> wrote: > Hi, > > I compile it from command line and do use visual studio together with > cygwin > > when I stand in the project root in cmd: > set PATH=C:\cygwin\bin;%PATH% > bash -c ./configure > make > > to run: > set PATH=C:\cygwin\bin;%PATH% > then run the exes > > I have tested CANOpenShell, TestMasterMicroMod and TestMasterSlave, but i > have not loaded any driver. > It all runs fine > > > > On Sat, Feb 10, 2018 at 12:59 AM, <canfestival-devel@lists.sourceforge.net > > wrote: > >> Hi >> Could you please tell me your steps? >> I do the configure steps and then I open the visual studio project to run >> it, >> >> I test the ./configure --target=win32 --can=tcp_wi32 --timers=unix >> but I got the same error "Segmentation fault and Exception on loading dll >> function" >> >> I saw this link https://ci.appveyor.com/project/nimrof/canfestival-3-asc- >> clean-rrna1 >> I had same output for my cygwin and for --can=virtual. >> but I have the same error on vs. >> >> On Thu, Feb 8, 2018 at 4:48 PM, <canfestival-devel@lists.sourceforge.net> >> wrote: >> >>> Hi, >>> >>> Sorry for the short reply today, i have only found out that my cygwin >>> setup does not build win32_timer, but unix_timer. >>> Not sure why unix is detected, but will try with target=win32 later >>> >>> I have very limited experience with cygwin, so if you could check by >>> buildlog to se if you see something wrong that will help you and me >>> my buildlog: >>> https://ci.appveyor.com/project/nimrof/canfestival-3-asc-clean-rrna1 >>> >>> Hopfully i will have more time in the weekend to debug. >>> >>> btw: Gnosis_Utils-1.2.2 is used by python to read/write the .od xml file >>> >>> About your errors: >>> * missing scanIndexOD is proberbly a missing files generated from the >>> .od file, but my vs project should generate it as part of the build prosess >>> and should give a missing file error :( >>> >>> * unrecognized command line option ‘-mno-cygwin’ >>> Just googled it, and can you try to remove it in the config file or just >>> make file? >>> >>> >>> On Thu, Feb 8, 2018 at 3:16 PM, <canfestival-devel@lists.sourceforge.net >>> > wrote: >>> >>>> Hi >>>> Many thanks for your response. >>>> I attached my makefile. >>>> I downloaded your file and try to build it but it wasn't successful, I >>>> got some linker errors. >>>> "LNK2001 unresolved external symbol scanIndexOD" >>>> I don't know why you use "Gnosis_Utils-1.2.2" >>>> for now, I want to run an example similar to "TestMasterSlave" on >>>> visual studio. >>>> In these last 2 days, I work more on configure command. >>>> and at first I commented these lines from configure file : >>>> ** >>>> echo "Using ${CXX} as a C++ compiler" >>>> if [ "$SUB_TARGET" = "win32" ]; then >>>> # on cygwin/mingw, choose g++ as a linker for native target >>>> if [ "$LD" = "" ]; then >>>> LD=$CXX >>>> fi >>>> if [ "$SUB_OS_NAME" = "CYGWIN" ]; then >>>> SUB_PROG_CFLAGS="-mno-cygwin" >>>> fi >>>> fi >>>> if [ "$SUB_TARGET" = "unix" ]; then >>>> if [ "$LD" = "" ]; then >>>> LD=$CXX >>>> fi >>>> fi >>>> ** >>>> when I configure with ./configure --target=win32 >>>> in build successfully but in using any function in canfestival.dll I >>>> got Segmentation fault and exception >>>> when configure with ./configure --target=win32 --can=tcp_win32 >>>> in "make" and "make install" steps I got " >>>> _beginthreadex; : undeclared identifier" >>>> but I can build .exe and In running I got Segmentation fault and >>>> exception. >>>> I really want your guidance. >>>> looking for your respones >>>> On 8 Feb 2
Re: [Canfestival-devel] help me configuring canfestival in windows
Hi Could you please tell me your steps? I do the configure steps and then I open the visual studio project to run it, I test the ./configure --target=win32 --can=tcp_wi32 --timers=unix but I got the same error "Segmentation fault and Exception on loading dll function" I saw this link https://ci.appveyor.com/project/nimrof/canfestival-3-asc-clean-rrna1 I had same output for my cygwin and for --can=virtual. but I have the same error on vs. On Thu, Feb 8, 2018 at 4:48 PM, <canfestival-devel@lists.sourceforge.net> wrote: > Hi, > > Sorry for the short reply today, i have only found out that my cygwin > setup does not build win32_timer, but unix_timer. > Not sure why unix is detected, but will try with target=win32 later > > I have very limited experience with cygwin, so if you could check by > buildlog to se if you see something wrong that will help you and me > my buildlog: > https://ci.appveyor.com/project/nimrof/canfestival-3-asc-clean-rrna1 > > Hopfully i will have more time in the weekend to debug. > > btw: Gnosis_Utils-1.2.2 is used by python to read/write the .od xml file > > About your errors: > * missing scanIndexOD is proberbly a missing files generated from the .od > file, but my vs project should generate it as part of the build prosess and > should give a missing file error :( > > * unrecognized command line option ‘-mno-cygwin’ > Just googled it, and can you try to remove it in the config file or just > make file? > > > On Thu, Feb 8, 2018 at 3:16 PM, <canfestival-devel@lists.sourceforge.net> > wrote: > >> Hi >> Many thanks for your response. >> I attached my makefile. >> I downloaded your file and try to build it but it wasn't successful, I >> got some linker errors. >> "LNK2001 unresolved external symbol scanIndexOD" >> I don't know why you use "Gnosis_Utils-1.2.2" >> for now, I want to run an example similar to "TestMasterSlave" on visual >> studio. >> In these last 2 days, I work more on configure command. >> and at first I commented these lines from configure file : >> ** >> echo "Using ${CXX} as a C++ compiler" >> if [ "$SUB_TARGET" = "win32" ]; then >> # on cygwin/mingw, choose g++ as a linker for native target >> if [ "$LD" = "" ]; then >> LD=$CXX >> fi >> if [ "$SUB_OS_NAME" = "CYGWIN" ]; then >> SUB_PROG_CFLAGS="-mno-cygwin" >> fi >> fi >> if [ "$SUB_TARGET" = "unix" ]; then >> if [ "$LD" = "" ]; then >> LD=$CXX >> fi >> fi >> ** >> when I configure with ./configure --target=win32 >> in build successfully but in using any function in canfestival.dll I got >> Segmentation fault and exception >> when configure with ./configure --target=win32 --can=tcp_win32 >> in "make" and "make install" steps I got " >> _beginthreadex; : undeclared identifier" >> but I can build .exe and In running I got Segmentation fault and >> exception. >> I really want your guidance. >> looking for your respones >> On 8 Feb 2018 1:27 a.m., <canfestival-devel@lists.sourceforge.net> wrote: >> >>> Hi, >>> >>> could you post the makefile from your win32_timer director? >>> >>> Also would you mind trying to build this repository? >>> https://bitbucket.org/nimrof/canfestival-3-asc >>> >>> I have continues build for latest visual studio and cygwin working. >>> I remember there was one or more a makefile problem to get cygwin >>> working, but I can not remember seeing your error. >>> >>> I do not build with cygwin from vs so might be a problem there. Could >>> you write a few lines about your setup? >>> >>> If you do not want to use hw you can also use the TCP driver, you need >>> to have the tcp server running for it to work. >>> >>> In my repo you might want to have a look at the appveyor file, it is the >>> file I use for VS and cygwin build. So all the build commands are there. >>> >>> On Feb 6, 2018 02:11, <canfestival-devel@lists.sourceforge.net> wrote: >>> >>> Hi >>> I want to use canopen of canfestival. >>> And to run at least one of the examples on visual stdio, I got this 2 >>> errors:C2065: 'TestSlave_obj100C': Undeclared Identifier >>> C2065: 'TestSlave_obj100D': Undeclared Identifier >>> I searched and found this link >>> :https://sourceforge.ne
Re: [Canfestival-devel] help me configuring canfestival in windows
Hi, Sorry for the short reply today, i have only found out that my cygwin setup does not build win32_timer, but unix_timer. Not sure why unix is detected, but will try with target=win32 later I have very limited experience with cygwin, so if you could check by buildlog to se if you see something wrong that will help you and me my buildlog: https://ci.appveyor.com/project/nimrof/canfestival-3-asc-clean-rrna1 Hopfully i will have more time in the weekend to debug. btw: Gnosis_Utils-1.2.2 is used by python to read/write the .od xml file About your errors: * missing scanIndexOD is proberbly a missing files generated from the .od file, but my vs project should generate it as part of the build prosess and should give a missing file error :( * unrecognized command line option ‘-mno-cygwin’ Just googled it, and can you try to remove it in the config file or just make file? On Thu, Feb 8, 2018 at 3:16 PM, <canfestival-devel@lists.sourceforge.net> wrote: > Hi > Many thanks for your response. > I attached my makefile. > I downloaded your file and try to build it but it wasn't successful, I got > some linker errors. > "LNK2001 unresolved external symbol scanIndexOD" > I don't know why you use "Gnosis_Utils-1.2.2" > for now, I want to run an example similar to "TestMasterSlave" on visual > studio. > In these last 2 days, I work more on configure command. > and at first I commented these lines from configure file : > ** > echo "Using ${CXX} as a C++ compiler" > if [ "$SUB_TARGET" = "win32" ]; then > # on cygwin/mingw, choose g++ as a linker for native target > if [ "$LD" = "" ]; then > LD=$CXX > fi > if [ "$SUB_OS_NAME" = "CYGWIN" ]; then > SUB_PROG_CFLAGS="-mno-cygwin" > fi > fi > if [ "$SUB_TARGET" = "unix" ]; then > if [ "$LD" = "" ]; then > LD=$CXX > fi > fi > ** > when I configure with ./configure --target=win32 > in build successfully but in using any function in canfestival.dll I got > Segmentation fault and exception > when configure with ./configure --target=win32 --can=tcp_win32 > in "make" and "make install" steps I got " > _beginthreadex; : undeclared identifier" > but I can build .exe and In running I got Segmentation fault and > exception. > I really want your guidance. > looking for your respones > On 8 Feb 2018 1:27 a.m., <canfestival-devel@lists.sourceforge.net> wrote: > >> Hi, >> >> could you post the makefile from your win32_timer director? >> >> Also would you mind trying to build this repository? >> https://bitbucket.org/nimrof/canfestival-3-asc >> >> I have continues build for latest visual studio and cygwin working. >> I remember there was one or more a makefile problem to get cygwin >> working, but I can not remember seeing your error. >> >> I do not build with cygwin from vs so might be a problem there. Could you >> write a few lines about your setup? >> >> If you do not want to use hw you can also use the TCP driver, you need to >> have the tcp server running for it to work. >> >> In my repo you might want to have a look at the appveyor file, it is the >> file I use for VS and cygwin build. So all the build commands are there. >> >> On Feb 6, 2018 02:11, <canfestival-devel@lists.sourceforge.net> wrote: >> >> Hi >> I want to use canopen of canfestival. >> And to run at least one of the examples on visual stdio, I got this 2 >> errors:C2065: 'TestSlave_obj100C': Undeclared Identifier >> C2065: 'TestSlave_obj100D': Undeclared Identifier >> I searched and found this link >> :https://sourceforge.net/p/canfestival/mailman/message/30811756/ >> But my problem was not solved. I don't know how can I do these steps: >> "the linker missing _obj100C and _obj100D, this problem is solved by >> rebuilding the *.c files from the *.od files using the objdictedit.py." >> When I use configure command in linux and then I run make and make install >> it works properly , and build *.a file in driver/unix directory >> but when I do following steps in windows: >> ./configuare --can=virtual --target=win32 I got this error >> ***$ ./configure --can=virtual >> --target=win32 >> Host OS: CYGWIN >> Host arch: x86 >> Choosing windows timers driver. >> Checking for cc... Yes. >> Checking for gcc... Yes. >> Using gcc as a C compiler >> Using g++ as a C++ compiler >> Using g++ as a linker >> Not cross-
Re: [Canfestival-devel] help me configuring canfestival in windows
Hi Many thanks for your response. I attached my makefile. I downloaded your file and try to build it but it wasn't successful, I got some linker errors. "LNK2001 unresolved external symbol scanIndexOD" I don't know why you use "Gnosis_Utils-1.2.2" for now, I want to run an example similar to "TestMasterSlave" on visual studio. In these last 2 days, I work more on configure command. and at first I commented these lines from configure file : ** echo "Using ${CXX} as a C++ compiler" if [ "$SUB_TARGET" = "win32" ]; then # on cygwin/mingw, choose g++ as a linker for native target if [ "$LD" = "" ]; then LD=$CXX fi if [ "$SUB_OS_NAME" = "CYGWIN" ]; then SUB_PROG_CFLAGS="-mno-cygwin" fi fi if [ "$SUB_TARGET" = "unix" ]; then if [ "$LD" = "" ]; then LD=$CXX fi fi ** when I configure with ./configure --target=win32 in build successfully but in using any function in canfestival.dll I got Segmentation fault and exception when configure with ./configure --target=win32 --can=tcp_win32 in "make" and "make install" steps I got " _beginthreadex; : undeclared identifier" but I can build .exe and In running I got Segmentation fault and exception. I really want your guidance. looking for your respones On 8 Feb 2018 1:27 a.m., <canfestival-devel@lists.sourceforge.net> wrote: > Hi, > > could you post the makefile from your win32_timer director? > > Also would you mind trying to build this repository? > https://bitbucket.org/nimrof/canfestival-3-asc > > I have continues build for latest visual studio and cygwin working. > I remember there was one or more a makefile problem to get cygwin working, > but I can not remember seeing your error. > > I do not build with cygwin from vs so might be a problem there. Could you > write a few lines about your setup? > > If you do not want to use hw you can also use the TCP driver, you need to > have the tcp server running for it to work. > > In my repo you might want to have a look at the appveyor file, it is the > file I use for VS and cygwin build. So all the build commands are there. > > On Feb 6, 2018 02:11, <canfestival-devel@lists.sourceforge.net> wrote: > > Hi > I want to use canopen of canfestival. > And to run at least one of the examples on visual stdio, I got this 2 > errors:C2065: 'TestSlave_obj100C': Undeclared Identifier > C2065: 'TestSlave_obj100D': Undeclared Identifier > I searched and found this link > :https://sourceforge.net/p/canfestival/mailman/message/30811756/ > But my problem was not solved. I don't know how can I do these steps: > "the linker missing _obj100C and _obj100D, this problem is solved by > rebuilding the *.c files from the *.od files using the objdictedit.py." > When I use configure command in linux and then I run make and make install > it works properly , and build *.a file in driver/unix directory > but when I do following steps in windows: > ./configuare --can=virtual --target=win32 I got this error > ***$ ./configure --can=virtual > --target=win32 > Host OS: CYGWIN > Host arch: x86 > Choosing windows timers driver. > Checking for cc... Yes. > Checking for gcc... Yes. > Using gcc as a C compiler > Using g++ as a C++ compiler > Using g++ as a linker > Not cross-compiling. Will install in /usr/local > Using prefix: /usr/local > No wxWidgets available > Creating Makefile > Creating src/Makefile > Creating drivers/Makefile > Creating objdictgen/Makefile > Creating examples/Makefile > Creating objdictgen/canfestival_config.py > Creating drivers/timers_win32/Makefile > Creating drivers/can_virtual/Makefile > Creating drivers/win32/Makefile > Creating examples/CANOpenShell/Makefile > Creating examples/TestMasterSlave/Makefile > Creating examples/TestMasterSlaveLSS/Makefile > Creating examples/SillySlave/Makefile > Creating examples/TestMasterMicroMod/Makefile > All done. > $ make > make -C objdictgen all > make[1]: Entering directory > '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/objdictgen' > make[1]: Nothing to be done for 'all'. > make[1]: Leaving directory > '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/objdictgen' > make -C drivers driver > make[1]: Entering directory > '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers' > make -C timers_win32 driver > make[2]: Entering directory > '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers/timers_win32' > g++ -O2 -mno-cygwin -I../../include -I../../include/win32 > -I../
Re: [Canfestival-devel] help me configuring canfestival in windows
Hi, could you post the makefile from your win32_timer director? Also would you mind trying to build this repository? https://bitbucket.org/nimrof/canfestival-3-asc I have continues build for latest visual studio and cygwin working. I remember there was one or more a makefile problem to get cygwin working, but I can not remember seeing your error. I do not build with cygwin from vs so might be a problem there. Could you write a few lines about your setup? If you do not want to use hw you can also use the TCP driver, you need to have the tcp server running for it to work. In my repo you might want to have a look at the appveyor file, it is the file I use for VS and cygwin build. So all the build commands are there. On Feb 6, 2018 02:11, <canfestival-devel@lists.sourceforge.net> wrote: Hi I want to use canopen of canfestival. And to run at least one of the examples on visual stdio, I got this 2 errors:C2065: 'TestSlave_obj100C': Undeclared Identifier C2065: 'TestSlave_obj100D': Undeclared Identifier I searched and found this link :https://sourceforge.net/p/canfestival/mailman/message/30811756/ But my problem was not solved. I don't know how can I do these steps: "the linker missing _obj100C and _obj100D, this problem is solved by rebuilding the *.c files from the *.od files using the objdictedit.py." When I use configure command in linux and then I run make and make install it works properly , and build *.a file in driver/unix directory but when I do following steps in windows: ./configuare --can=virtual --target=win32 I got this error ***$ ./configure --can=virtual --target=win32 Host OS: CYGWIN Host arch: x86 Choosing windows timers driver. Checking for cc... Yes. Checking for gcc... Yes. Using gcc as a C compiler Using g++ as a C++ compiler Using g++ as a linker Not cross-compiling. Will install in /usr/local Using prefix: /usr/local No wxWidgets available Creating Makefile Creating src/Makefile Creating drivers/Makefile Creating objdictgen/Makefile Creating examples/Makefile Creating objdictgen/canfestival_config.py Creating drivers/timers_win32/Makefile Creating drivers/can_virtual/Makefile Creating drivers/win32/Makefile Creating examples/CANOpenShell/Makefile Creating examples/TestMasterSlave/Makefile Creating examples/TestMasterSlaveLSS/Makefile Creating examples/SillySlave/Makefile Creating examples/TestMasterMicroMod/Makefile All done. $ make make -C objdictgen all make[1]: Entering directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/objdictgen' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/objdictgen' make -C drivers driver make[1]: Entering directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers' make -C timers_win32 driver make[2]: Entering directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers/timers_win32' g++ -O2 -mno-cygwin -I../../include -I../../include/win32 -I../../include/can_virtual -I../../include/timers_win32 -o timers_win32.o -c timers_win32.cg++: error: unrecognized command line option ‘-mno-cygwin’; did you mean ‘-mno-clwb’?make[2]: *** [Makefile:50: timers_win32.o] Error 1 make[2]: Leaving directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers/timers_win32' make[1]: *** [Makefile:33: driver] Error 2 make[1]: Leaving directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers' make: *** [Makefile:42: driver] Error 2 * I couldn't solve the error. In the manual document of canfestival for window is writen about usnig usb.zip file before configuration .for now, I don't want to use any HW module. I want to simulate canopen on my windows. please help me configuring canfestival in windows. Many thanks for your attention -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] help me configuring canfestival in windows
Hi I want to use canopen of canfestival. And to run at least one of the examples on visual stdio, I got this 2 errors:C2065: 'TestSlave_obj100C': Undeclared Identifier C2065: 'TestSlave_obj100D': Undeclared Identifier I searched and found this link :https://sourceforge.net/p/canfestival/mailman/message/30811756/ But my problem was not solved. I don't know how can I do these steps: "the linker missing _obj100C and _obj100D, this problem is solved by rebuilding the *.c files from the *.od files using the objdictedit.py." When I use configure command in linux and then I run make and make install it works properly , and build *.a file in driver/unix directory but when I do following steps in windows: ./configuare --can=virtual --target=win32 I got this error ***$ ./configure --can=virtual --target=win32 Host OS: CYGWIN Host arch: x86 Choosing windows timers driver. Checking for cc... Yes. Checking for gcc... Yes. Using gcc as a C compiler Using g++ as a C++ compiler Using g++ as a linker Not cross-compiling. Will install in /usr/local Using prefix: /usr/local No wxWidgets available Creating Makefile Creating src/Makefile Creating drivers/Makefile Creating objdictgen/Makefile Creating examples/Makefile Creating objdictgen/canfestival_config.py Creating drivers/timers_win32/Makefile Creating drivers/can_virtual/Makefile Creating drivers/win32/Makefile Creating examples/CANOpenShell/Makefile Creating examples/TestMasterSlave/Makefile Creating examples/TestMasterSlaveLSS/Makefile Creating examples/SillySlave/Makefile Creating examples/TestMasterMicroMod/Makefile All done. $ make make -C objdictgen all make[1]: Entering directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/objdictgen' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/objdictgen' make -C drivers driver make[1]: Entering directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers' make -C timers_win32 driver make[2]: Entering directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers/timers_win32' g++ -O2 -mno-cygwin -I../../include -I../../include/win32 -I../../include/can_virtual -I../../include/timers_win32 -o timers_win32.o -c timers_win32.cg++: error: unrecognized command line option ‘-mno-cygwin’; did you mean ‘-mno-clwb’?make[2]: *** [Makefile:50: timers_win32.o] Error 1 make[2]: Leaving directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers/timers_win32' make[1]: *** [Makefile:33: driver] Error 2 make[1]: Leaving directory '/cygdrive/f/CanFestival-3-8bfe0ac00cdb/CanFestival-3-8bfe0ac00cdb/drivers' make: *** [Makefile:42: driver] Error 2 * I couldn't solve the error. In the manual document of canfestival for window is writen about usnig usb.zip file before configuration .for now, I don't want to use any HW module. I want to simulate canopen on my windows. please help me configuring canfestival in windows. Many thanks for your attention -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Alternative methods of accessing object dictionary from application
Hi The way my application is working is that it updates periodically some predefined variables. These variable are defined by Objdictgen and mapped to some index, let’s say 0x2000, in object dictionary. I have something like 100 different variables, all having different unique names, because I want see their states by name in both application and CANopen Analyzer tool by reading EDS file. The problem is that if any of this variables is changed I need to send a PDO and only in this case. So what I want is following: after my app finished execution I want to scroll quickly through all output variables (by index for example) and create PDOs only for updated ones. Hope it clarifies a little bit. Regards Artyom Von: canfestival-devel@lists.sourceforge.net [mailto:canfestival-devel@lists.sourceforge.net] Gesendet: Dienstag, 21. November 2017 14:44 An: canfestival-devel@lists.sourceforge.net Betreff: Re: [Canfestival-devel] Alternative methods of accessing object dictionary from application Hi Artyom, Sorry for the long delay. I did not see the message :( AFIK you should not get any corruption in the dictionary as long as you do not change the dictionary itself ...number of nodes, subnodes etc. If all you want to do is read you should be okay whatevery you do. If you want to write then you should be okay as long as you only write to variable that do not affect a state of some sort. Changing hearbeat timeout and cob-id etc. directy might give some unexpected results. If you tell us a littlebit more about what you want to do it might be easyer to give a more precise answer On Tue, Nov 7, 2017 at 4:37 AM, <canfestival-devel@lists.sourceforge.net <mailto:canfestival-devel@lists.sourceforge.net> > wrote: Hi Lars, I know these functions, but my understanding is that these APIs should not be used outside of callbacks, as pdf manual suggests, to avoid data corruption in dictionary. So I'm looking for something else, or maybe I'm wrong here... 2017-11-06 20:18 GMT+01:00 <canfestival-devel@lists.sourceforge.net <mailto:canfestival-devel@lists.sourceforge.net> >: Hi Artyom, You might want to take a look into the function readLocalDict and writeLocalDict. Both found in objacces.h Best regards Lars On Mon, Nov 6, 2017 at 12:32 PM, <canfestival-devel@lists.sourceforge.net <mailto:canfestival-devel@lists.sourceforge.net> > wrote: Dear all As I see from examples, standard method of accessing object dictionary from user application is using variable identifiers. But are there any alternative methods of accessing object dictionary from user application, for example using index/subindex, or similar? In my app I need to look through some range of indexes quickly and doing so via variables doesn't seem to be an efficient way, and I don't want to define arrays in dictionary as they look ugly. Thank you and best regards Artyom -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net <mailto:Canfestival-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net <mailto:Canfestival-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net <mailto:Canfestival-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Alternative methods of accessing object dictionary from application
Hi Artyom, Sorry for the long delay. I did not see the message :( AFIK you should not get any corruption in the dictionary as long as you do not change the dictionary itself ...number of nodes, subnodes etc. If all you want to do is read you should be okay whatevery you do. If you want to write then you should be okay as long as you only write to variable that do not affect a state of some sort. Changing hearbeat timeout and cob-id etc. directy might give some unexpected results. If you tell us a littlebit more about what you want to do it might be easyer to give a more precise answer On Tue, Nov 7, 2017 at 4:37 AM, <canfestival-devel@lists.sourceforge.net> wrote: > Hi Lars, > > I know these functions, but my understanding is that these APIs should not > be used outside of callbacks, as pdf manual suggests, to avoid data > corruption in dictionary. So I'm looking for something else, or maybe I'm > wrong here... > > > 2017-11-06 20:18 GMT+01:00 <canfestival-devel@lists.sourceforge.net>: > >> Hi Artyom, >> >> You might want to take a look into the function readLocalDict and >> writeLocalDict. Both found in objacces.h >> >> Best regards >> Lars >> >> >> On Mon, Nov 6, 2017 at 12:32 PM, <canfestival-devel@lists.sourceforge.net >> > wrote: >> >>> Dear all >>> >>> >>> >>> As I see from examples, standard method of accessing object dictionary >>> from user application is using variable identifiers. But are there any >>> alternative methods of accessing object dictionary from user application, >>> for example using index/subindex, or similar? In my app I need to look >>> through some range of indexes quickly and doing so via variables doesn't >>> seem to be an efficient way, and I don't want to define arrays in >>> dictionary as they look ugly. >>> >>> >>> >>> Thank you and best regards >>> >>> Artyom >>> >>> >>> >>> >>> >>> >>> ------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> ___ >>> Canfestival-devel mailing list >>> Canfestival-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/canfestival-devel >>> >>> >> >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___________ >> Canfestival-devel mailing list >> Canfestival-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/canfestival-devel >> >> > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Alternative methods of accessing object dictionary from application
Hi Lars, I know these functions, but my understanding is that these APIs should not be used outside of callbacks, as pdf manual suggests, to avoid data corruption in dictionary. So I'm looking for something else, or maybe I'm wrong here... 2017-11-06 20:18 GMT+01:00 <canfestival-devel@lists.sourceforge.net>: > Hi Artyom, > > You might want to take a look into the function readLocalDict and > writeLocalDict. Both found in objacces.h > > Best regards > Lars > > > On Mon, Nov 6, 2017 at 12:32 PM, <canfestival-devel@lists.sourceforge.net> > wrote: > >> Dear all >> >> >> >> As I see from examples, standard method of accessing object dictionary >> from user application is using variable identifiers. But are there any >> alternative methods of accessing object dictionary from user application, >> for example using index/subindex, or similar? In my app I need to look >> through some range of indexes quickly and doing so via variables doesn't >> seem to be an efficient way, and I don't want to define arrays in >> dictionary as they look ugly. >> >> >> >> Thank you and best regards >> >> Artyom >> >> >> >> >> >> >> ------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Canfestival-devel mailing list >> Canfestival-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/canfestival-devel >> >> > > -------- > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > > ------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Alternative methods of accessing object dictionary from application
Hi Artyom, You might want to take a look into the function readLocalDict and writeLocalDict. Both found in objacces.h Best regards Lars On Mon, Nov 6, 2017 at 12:32 PM, <canfestival-devel@lists.sourceforge.net> wrote: > Dear all > > > > As I see from examples, standard method of accessing object dictionary > from user application is using variable identifiers. But are there any > alternative methods of accessing object dictionary from user application, > for example using index/subindex, or similar? In my app I need to look > through some range of indexes quickly and doing so via variables doesn't > seem to be an efficient way, and I don't want to define arrays in > dictionary as they look ugly. > > > > Thank you and best regards > > Artyom > > > > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] CanFestival contrubutions, AKA where new development happens
Il Sun, 4 Jun 2017 13:37:52 +0200 canfestival-devel@lists.sourceforge.net scrisse: > ... > Do you mind if i send the pull request for you? Absolutely not. Fill free to do whatever you want with my contributions: I only need to get the job done. Ciao. -- Nicola -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] CanFestival contrubutions, AKA where new development happens
Hi, Do you mind if i send the pull request for you? Regards Lars E. Susaas On Fri, Jun 2, 2017 at 12:09 PM, <canfestival-devel@lists.sourceforge.net> wrote: > Il Thu, 1 Jun 2017 12:25:23 +0200 canfestival-devel@lists.sourceforge.net > scrisse: > >> Hi, >> >> My Canfestival repository is not on github but on bitbucket. >> >> So go to bitbucket, create an account, fork my repos >> (CanFestival-3-asc), do your changes and then send me a pull request. > > Well, I did everything up to noticing the repository was under > mercurial. I do not plan to use it. > > Sorry for the noise. > > Ciao. > -- > Nicola > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Suggestion of new can-fd driver API
; Then the user is free to register his own callbacks if needed. That is a god idea, i can add a "checkForChange" function that checks for changes and calls the callback on changes. > May be we need a more general callback for errors, i think of all errors > reported by socketcan, each time the driver receives an error frame it > calls the callback with the error code as parameter. I see that QT uses something similar to socketCan error frame. http://doc.qt.io/qt-5/qcanbusframe.html Can we just do the same? Add a variable to the Message that says it is a error frame and return if from canReceive_driver like a normal can message. >> - How to support new and current API at the same time? >> >> As far as i can see it is during startup and shutdown things need to >> take different directions >> >> When using dynamic loading (.so/.dll) >>If openEx is found use the new way of initing the driver. If it is >> not found init the driver to current way. >>This can be done in runtime >>On close check for openEx again and close using different ways >> When static linking >>As i have not found a way to detect if a function exist i compiler >> time it must be solved using preprocessor >> >> When init is done, make a driver structure and copy send >> function into it. >> >From now on one can use a common interface > > As i said, i don't think driver API detection is very important. > But may be i'm wrong. >> Thats it and thanks for reading. >> I will attach can_socketFD, my mostly complete implementation. Missing >> start/stop, setMode and real testingso it does have bugs >> can_driver.h includes new structures and enums needed by the new API >> >> So thats it and thanks for reading it all. >> >> Do please comment on my suggestions and ask questions >> >> > Some ideas: > - be sure to be able to have several instances of the same driver in a > single process > - in case of USB to CAN adapters be resistant to live unplug / replug Thanks for the tip. I got a usb device with dual can that i can test with. > I'm ready to test your new socketcan driver when you think it's done. > > Regards > > François Beaulier > Thanks for the offer! I will post in this maillist when it is ready for testing. The state is now that i got it the new socketCan driver with CANOpenShell compiling yesterday. So time for debugging :) -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Suggestion of new can-fd driver API
initing the driver. If it is > not found init the driver to current way. >This can be done in runtime >On close check for openEx again and close using different ways > When static linking >As i have not found a way to detect if a function exist i compiler > time it must be solved using preprocessor > > When init is done, make a driver structure and copy send > function into it. > >From now on one can use a common interface As i said, i don't think driver API detection is very important. But may be i'm wrong. > Thats it and thanks for reading. > I will attach can_socketFD, my mostly complete implementation. Missing > start/stop, setMode and real testingso it does have bugs > can_driver.h includes new structures and enums needed by the new API > > So thats it and thanks for reading it all. > > Do please comment on my suggestions and ask questions > > Some ideas: - be sure to be able to have several instances of the same driver in a single process - in case of USB to CAN adapters be resistant to live unplug / replug I'm ready to test your new socketcan driver when you think it's done. Regards François Beaulier ------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] How to get involved?
Hi, I agree with what you say. I send all my pull-request to Francois Beauliers fork as thats where i get rejection or acceptant. Not silence, but as you say the best way would have been to commit to the main repo. So im also a community member that do not like the current state of things and want to help as a private person. Best regards Lars E. Susaas On Thu, Apr 6, 2017 at 4:40 PM, <canfestival-devel@lists.sourceforge.net> wrote: > Hello everybody, > > > > I like the canfestival project and I'm very interested to get involved. > > > > I want to use canfestival under Linux and Windows systems with Qt > applications. So my idea is to write an Qt wrapper that uses the canfestival > framework. > > I already wrote an updated driver for the current Peak PCAN_Basic DLL which > is the replacement for the PCANLight DLL. > > > > But for me it's not pretty clear how to get involved and how to get the code > back into the main repo. It would be nice if there would be an explanation > how to get involved and a named maintainer where somebody can ask for > repository credentials to do push requests. The information on the project > website should be a little bit extensive, there is no link to the mailing > list, contact information etc. > > > > There are multiple forks and it seems only two of them are maintained > frequently (the fork of Francois Beaulier and the main repo). The main repo > seems not been updated for two months. > > Also the sourceforge project site is not up to date. The latest release is 4 > years old. For somebody visiting the project the first time it looks not > quite vital. But I don't want to make just another fork. I think that would > be more confusing than helpful. > > > > If we decide to use the canfestival framework in our company’s software it's > important for us that the project becomes a little bit more agile so that > the future of the project is save. If we are welcome, me and my company > likes to support the project. Let me know how. > > > > Best regards > > > > Michael Kakuschky > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] How to get involved?
Hello everybody, I like the canfestival project and I'm very interested to get involved. I want to use canfestival under Linux and Windows systems with Qt applications. So my idea is to write an Qt wrapper that uses the canfestival framework. I already wrote an updated driver for the current Peak PCAN_Basic DLL which is the replacement for the PCANLight DLL. But for me it's not pretty clear how to get involved and how to get the code back into the main repo. It would be nice if there would be an explanation how to get involved and a named maintainer where somebody can ask for repository credentials to do push requests. The information on the project website should be a little bit extensive, there is no link to the mailing list, contact information etc. There are multiple forks and it seems only two of them are maintained frequently (the fork of Francois Beaulier and the main repo). The main repo seems not been updated for two months. Also the sourceforge project site is not up to date. The latest release is 4 years old. For somebody visiting the project the first time it looks not quite vital. But I don't want to make just another fork. I think that would be more confusing than helpful. If we decide to use the canfestival framework in our company's software it's important for us that the project becomes a little bit more agile so that the future of the project is save. If we are welcome, me and my company likes to support the project. Let me know how. Best regards Michael Kakuschky -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] Suggestion of new can-fd driver API
nters = _berr_counter; } return fd; error_close: CAN_CLOSE (iHandle->socket); error_ret: free (iHandle); free (fd); return NULL; } /** * /ingroup drivers * SocketFD_close Closes the socket and frees up memory * * /param fd pointer to driver structure * * /return 0 if success * /return -1 if failed (not in use) */ int SocketFD_close(CAN_HANDLE_Ex* fd) { struct socketFDInternal* iHandle = (struct socketFDInternal*)fd->internalDriverHandle; if (iHandle->socket) { CAN_CLOSE (iHandle->socket); free(fd); free(iHandle); return 0; } } /** * /ingroup drivers * SocketFD_probe (driver internal) Probes the device for modes it supports * * /param fd pointer to driver structure * * /return 0 if success * /return -1 if failed (not in use) */ UNS32 SocketFD_probe(const char* devName) { int result; int i; struct can_ctrlmode cm; memset(, 0, sizeof(cm)); int numModesToTest = (sizeof(socketCanBinding) / sizeof(socketCanBinding[0])) / 2; for (int i = 0; i < numModesToTest; i++) { cm.mask = socketCanBinding[i][0]; cm.flags = socketCanBinding[i][0]; if(can_set_ctrlmode(devName,) == 0) { result |= socketCanBinding[i][1]; } } return result; } -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] setNodeId patch
Hello, setNodeId wrongly assumes, that the COB-id of the PDO communication parameters only contains the CAN id. This patch resolves the issue. Maybe somebody can apply this patch to the official repository. Thanks, Martin Lederhilger Index: can_festival/src/states.c === --- can_festival/src/states.c (revision 983) +++ can_festival/src/states.c (working copy) @@ -278,9 +278,13 @@ UNS16 offset = d->firstIndex->PDO_RCV; UNS16 lastIndex = d->lastIndex->PDO_RCV; UNS32 cobID[] = {0x200, 0x300, 0x400, 0x500}; +UNS32 canID; +UNS32 otherBits; if( offset ) while( (offset <= lastIndex) && (i < 4)) { - if((*(UNS32*)d->objdict[offset].pSubindex[1].pObject == cobID[i] + *d->bDeviceNodeId)||(*d->bDeviceNodeId==0xFF)) - *(UNS32*)d->objdict[offset].pSubindex[1].pObject = cobID[i] + nodeId; + canID = (*(UNS32*)d->objdict[offset].pSubindex[1].pObject) & 0x1fff; + otherBits = (*(UNS32*)d->objdict[offset].pSubindex[1].pObject) & ~0x1fff; + if((canID == cobID[i] + *d->bDeviceNodeId)||(*d->bDeviceNodeId==0xFF)) + *(UNS32*)d->objdict[offset].pSubindex[1].pObject = (cobID[i] + nodeId) | otherBits; i ++; offset ++; } @@ -291,10 +295,14 @@ UNS16 offset = d->firstIndex->PDO_TRS; UNS16 lastIndex = d->lastIndex->PDO_TRS; UNS32 cobID[] = {0x180, 0x280, 0x380, 0x480}; +UNS32 canID; +UNS32 otherBits; i = 0; if( offset ) while ((offset <= lastIndex) && (i < 4)) { - if((*(UNS32*)d->objdict[offset].pSubindex[1].pObject == cobID[i] + *d->bDeviceNodeId)||(*d->bDeviceNodeId==0xFF)) - *(UNS32*)d->objdict[offset].pSubindex[1].pObject = cobID[i] + nodeId; + canID = (*(UNS32*)d->objdict[offset].pSubindex[1].pObject) & 0x1fff; + otherBits = (*(UNS32*)d->objdict[offset].pSubindex[1].pObject) & ~0x1fff; + if((canID == cobID[i] + *d->bDeviceNodeId)||(*d->bDeviceNodeId==0xFF)) + *(UNS32*)d->objdict[offset].pSubindex[1].pObject = (cobID[i] + nodeId) | otherBits; i ++; offset ++; } -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] Is there anybody, who is interested on my CanFastival branch?
Dears, I have found, that you list my repository on your pages: http://www.canfestival.org/code This particular repository is not my current copy. It was my attempt to publish some changes. I have commited one commit just to test whether there is some interest: https://bitbucket.org/JaFojtik/canfestival-3_fix In this repository I can prepare another commits if you wish for this. It is not currently very wise to clone repository: https://bitbucket.org/JaFojtik/canfestival-3 But when there will be some interest I will prepare changesets to merge to main repository. --- Anyway, my published repository was not actualised. I have found that CanFestival fails on high endian architecture. I have workable solution, that overcomes this problem. On standard PC architecture it does not expand a code. I can backport my changes to main branch if there is anybody interested to it. /* User could change COB ID into different endian if he want to do so. */ #ifndef FIX_COB_ID #define FIX_COB_ID(v) (v) #endif best regards Jara -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] SDO_DYNAMIC_BUFFER_ALLOCATION
Hi Greg, I'm afraid you have to do it yourself for Linux. After configure, edit include/config.h and add SDO_DYNAMIC_BUFFER_ALLOCATION_SIZE and SDO_DYNAMIC_BUFFER_ALLOCATION defines just like in win32/config.h Francois Le 20/02/2017 à 18:07, canfestival-devel@lists.sourceforge.net a écrit : Hi List, I've looked a bit more into the problem of trying to send a buffer larger than SDO_MAX_LENGTH_TRANSFER and there is a mode that can be enabled to dynamically allocate large buffers, but I don't see a way to enable SDO_DYNAMIC_BUFFER_ALLOCATION in Linux. For Windows it seems to be enabled by default, but for Linux the configure script doesn't have it as an option, so what is the recommended way to enable SDO_DYNAMIC_BUFFER_ALLOCATION? Greg Wilson-Lindberg Sakura Finetek 310-783-5075 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] SDO_DYNAMIC_BUFFER_ALLOCATION
Hi List, I've looked a bit more into the problem of trying to send a buffer larger than SDO_MAX_LENGTH_TRANSFER and there is a mode that can be enabled to dynamically allocate large buffers, but I don't see a way to enable SDO_DYNAMIC_BUFFER_ALLOCATION in Linux. For Windows it seems to be enabled by default, but for Linux the configure script doesn't have it as an option, so what is the recommended way to enable SDO_DYNAMIC_BUFFER_ALLOCATION? Greg Wilson-Lindberg Sakura Finetek 310-783-5075 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] SDO_MAX_LENGTH_TRANSFER VALUE
Hello list, SDO_MAX_LENGTH_TRANSFER defaults to being defined as 32, what is the reason for this limit, can it be set higher, and what is the maximum value that it can be set to? Regards, Greg Wilson-Lindberg Sakura Finetek 310-783-5075 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] CAN interface seems to drop packet with no error
Hi Greg, After the OD write do you use getWriteResultNetworkDict() function to get the transfer result ? And if yes what is the returned status ? -- Francois Beaulier www.ingelibre.fr Le 19/01/2017 à 01:45, canfestival-devel@lists.sourceforge.net a écrit : Hello list, We have a problem with packets that appear to be being dropped with no errors. We are running on an RPi3 and have used 2 different CAN interfaces, 1st a CANBerry v2.0 board based on a Microchip MCP2515 on I2C and 2nd an EMS_USB using an NXP LPC Arm chip. I'm monitoring the CAN bus using a Peak PCan interface into a Windows PC. In cases using both RPi3 interfaces I see a 60x write request go out to a node, the 58x response come back from the node and then some time later CanFestival issues a 60x 80 cancel request. I have not received an error to the call requesting the OD write. It seems like I should get some kind of an error back, dropped packet, overrun, timeout, something. Am I missing something in setting up the interface to CanFestival, do I need to set up an error callback? Greg Wilson-Lindberg Sakura Finetek 310-783-5075 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Receive PDO configuration
Hi, It is possible to do the changes in the source files, but it is faster and better to use the objdictedit python program to make a .od and generate the c source files from that. Please send .od file if you still have problems. Regards Lars From: canfestival-devel@lists.sourceforge.net [mailto:canfestival-devel@lists.sourceforge.net] Sent: Friday, December 9, 2016 1:37 PM To: canfestival-devel@lists.sourceforge.net Subject: Re: [Canfestival-devel] Receive PDO configuration Hello, Please find my OD in attachment, here I am not getting how to map variable to get PDO data. please suggest the necessary changes Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 From: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> [mailto:canfestival-devel@lists.sourceforge.net] Sent: Friday, December 09, 2016 12:34 PM To: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> Subject: Re: [Canfestival-devel] Receive PDO configuration Hi, OD: Create or change RPDO with objdictedit on the master 0x1400-0x15FF subindex 0x01 to 181. Then add a variable to the RPDO mapping, but all that is just standard canOpen settings If this does not work i suggest you look up the canOpen 301 manual Callback: Mark the RPDO and mark 'have Callbacks' then a variable holding a function pointer will be added to the generated OD. Just add a pointer to your function to that variable and your good to go. Regards Lars From: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> [mailto:canfestival-devel@lists.sourceforge.net] Sent: Friday, December 9, 2016 6:33 AM To: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> Subject: Re: [Canfestival-devel] Receive PDO configuration Hello, Please let me how to create OD and register callback functions to receive RXPDO data from slave. Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 From: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> [mailto:canfestival-devel@lists.sourceforge.net] Sent: Thursday, December 08, 2016 12:23 PM To: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> Subject: Re: [Canfestival-devel] Receive PDO configuration Hi Ajay, I am not sure i understand, but do you need help to get the master to recive DI PDO from slave? If so you can just change one of the RPDO with objdictedit on the master 0x1400-0x15FF subindex 0x01 to 181. Then add a variable to the RPDO mapping, but all that is just standard canOpen settings Best Regards Lars From: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> [mailto:canfestival-devel@lists.sourceforge.net] Sent: Wednesday, December 7, 2016 2:53 PM To: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> Subject: [Canfestival-devel] Receive PDO configuration Hello, In one of my project I am using can festival code to implement canopen master, I have configured slave to get heartbeat for each second and configured master RX PDO to get data from slave if any event occurs at slave side. My slave device is a simple DIO , If there is any change in the Slave Digital input pin, I am getting data change to master on canbus, I don't know how to receive the data from can bus to my user space, Please help me in getting data from can bus to user space... Data on canbus can0 701 [1] 05 can0 701 [1] 05 can0 701 [1] 05 can0 181 [1] 02 //data on canbus when I apply active high to DI pins can0 701 [1] 05 can0 181 [1] 00 can0 701 [1] 05 can0 701 [1] 05 Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi___________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Receive PDO configuration
Hi, OD: Create or change RPDO with objdictedit on the master 0x1400-0x15FF subindex 0x01 to 181. Then add a variable to the RPDO mapping, but all that is just standard canOpen settings If this does not work i suggest you look up the canOpen 301 manual Callback: Mark the RPDO and mark 'have Callbacks' then a variable holding a function pointer will be added to the generated OD. Just add a pointer to your function to that variable and your good to go. Regards Lars From: canfestival-devel@lists.sourceforge.net [mailto:canfestival-devel@lists.sourceforge.net] Sent: Friday, December 9, 2016 6:33 AM To: canfestival-devel@lists.sourceforge.net Subject: Re: [Canfestival-devel] Receive PDO configuration Hello, Please let me how to create OD and register callback functions to receive RXPDO data from slave. Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 From: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> [mailto:canfestival-devel@lists.sourceforge.net] Sent: Thursday, December 08, 2016 12:23 PM To: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> Subject: Re: [Canfestival-devel] Receive PDO configuration Hi Ajay, I am not sure i understand, but do you need help to get the master to recive DI PDO from slave? If so you can just change one of the RPDO with objdictedit on the master 0x1400-0x15FF subindex 0x01 to 181. Then add a variable to the RPDO mapping, but all that is just standard canOpen settings Best Regards Lars From: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> [mailto:canfestival-devel@lists.sourceforge.net] Sent: Wednesday, December 7, 2016 2:53 PM To: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> Subject: [Canfestival-devel] Receive PDO configuration Hello, In one of my project I am using can festival code to implement canopen master, I have configured slave to get heartbeat for each second and configured master RX PDO to get data from slave if any event occurs at slave side. My slave device is a simple DIO , If there is any change in the Slave Digital input pin, I am getting data change to master on canbus, I don't know how to receive the data from can bus to my user space, Please help me in getting data from can bus to user space... Data on canbus can0 701 [1] 05 can0 701 [1] 05 can0 701 [1] 05 can0 181 [1] 02 //data on canbus when I apply active high to DI pins can0 701 [1] 05 can0 181 [1] 00 can0 701 [1] 05 can0 701 [1] 05 Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi_______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Receive PDO configuration
Hello, Please let me how to create OD and register callback functions to receive RXPDO data from slave. Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 From: canfestival-devel@lists.sourceforge.net [mailto:canfestival-devel@lists.sourceforge.net] Sent: Thursday, December 08, 2016 12:23 PM To: canfestival-devel@lists.sourceforge.net Subject: Re: [Canfestival-devel] Receive PDO configuration Hi Ajay, I am not sure i understand, but do you need help to get the master to recive DI PDO from slave? If so you can just change one of the RPDO with objdictedit on the master 0x1400-0x15FF subindex 0x01 to 181. Then add a variable to the RPDO mapping, but all that is just standard canOpen settings Best Regards Lars From: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> [mailto:canfestival-devel@lists.sourceforge.net] Sent: Wednesday, December 7, 2016 2:53 PM To: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> Subject: [Canfestival-devel] Receive PDO configuration Hello, In one of my project I am using can festival code to implement canopen master, I have configured slave to get heartbeat for each second and configured master RX PDO to get data from slave if any event occurs at slave side. My slave device is a simple DIO , If there is any change in the Slave Digital input pin, I am getting data change to master on canbus, I don't know how to receive the data from can bus to my user space, Please help me in getting data from can bus to user space... Data on canbus can0 701 [1] 05 can0 701 [1] 05 can0 701 [1] 05 can0 181 [1] 02 //data on canbus when I apply active high to DI pins can0 701 [1] 05 can0 181 [1] 00 can0 701 [1] 05 can0 701 [1] 05 Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Receive PDO configuration
Hello, Thanks for the replay, can0 701 [1] 05 can0 701 [1] 05 can0 701 [1] 05 can0 181 [1] 02 //COB ID IS 180 can0 701 [1] 05 can0 181 [1] 00 can0 701 [1] 05 can0 701 [1] 05 with respect to above log I am getting COB ID as 180, but if I try to change one of the RPDO with objdictedit on the master 0x1400-0x15FF i am getting COB-ID as 200. Please let me know what steps i need to take in the canfestival stack to recive PDO data from slve. Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 From: canfestival-devel@lists.sourceforge.net [mailto:canfestival-devel@lists.sourceforge.net] Sent: Thursday, December 08, 2016 12:23 PM To: canfestival-devel@lists.sourceforge.net Subject: Re: [Canfestival-devel] Receive PDO configuration Hi Ajay, I am not sure i understand, but do you need help to get the master to recive DI PDO from slave? If so you can just change one of the RPDO with objdictedit on the master 0x1400-0x15FF subindex 0x01 to 181. Then add a variable to the RPDO mapping, but all that is just standard canOpen settings Best Regards Lars From: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> [mailto:canfestival-devel@lists.sourceforge.net] Sent: Wednesday, December 7, 2016 2:53 PM To: canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> Subject: [Canfestival-devel] Receive PDO configuration Hello, In one of my project I am using can festival code to implement canopen master, I have configured slave to get heartbeat for each second and configured master RX PDO to get data from slave if any event occurs at slave side. My slave device is a simple DIO , If there is any change in the Slave Digital input pin, I am getting data change to master on canbus, I don't know how to receive the data from can bus to my user space, Please help me in getting data from can bus to user space... Data on canbus can0 701 [1] 05 can0 701 [1] 05 can0 701 [1] 05 can0 181 [1] 02 //data on canbus when I apply active high to DI pins can0 701 [1] 05 can0 181 [1] 00 can0 701 [1] 05 can0 701 [1] 05 Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] Receive PDO configuration
Hello, In one of my project I am using can festival code to implement canopen master, I have configured slave to get heartbeat for each second and configured master RX PDO to get data from slave if any event occurs at slave side. My slave device is a simple DIO , If there is any change in the Slave Digital input pin, I am getting data change to master on canbus, I don't know how to receive the data from can bus to my user space, Please help me in getting data from can bus to user space... Data on canbus can0 701 [1] 05 can0 701 [1] 05 can0 701 [1] 05 can0 181 [1] 02 //data on canbus when I apply active high to DI pins can0 701 [1] 05 can0 181 [1] 00 can0 701 [1] 05 can0 701 [1] 05 Best regards Ajay Barge RBEI/ETP Tel. +91(80)6783-6914 -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Developing software update
Greg, The request is the same for expedited or segmented transfer initiate, the client is not supposed to know the size of the transfer. The server will respond with an expedited frame if the data fits in one frame. See Cia 301 in 7.2.4.3.5 "Protocol SDO upload" ( Cia 301 Version: 4.2.0 - 21 February 2011) You don't have to deal with expedited or segmented, just do a SDO read. Also check that the size of the 1008 entry on the server side is well set. By default objdictedit.py defines strings with a size of 10 but you can change that. Regards, Francois Le 09/11/2016 à 02:06, canfestival-devel@lists.sourceforge.net a écrit : Hello again, Francois, I've just gotten to the point that I'm trying to access OD1008, DeviceName, which is a Visible_String. I'm doing a readNetworkDictCallbackAI(), with the data type set to visible string. The request is going out as an expedited request, not a segmented request. There is no way to specify the size of the transfer for a network dictionary read. How do I get the request to go out as a segmented request? Regards, Greg *From:* canfestival-devel@lists.sourceforge.net [mailto:canfestival-devel@lists.sourceforge.net] *Sent:* Friday, October 14, 2016 2:09 PM *To:* canfestival-devel@lists.sourceforge.net *Subject:* Re: [Canfestival-devel] Developing software update Hi Greg 1- yes canfestival will do a segmented transfer automaticaly if more than 4 bytes (not 8) are involved 2- block mode is for a faster SDO transfer of large buffers, it is described in the Cia301 spec. in order to use block mode: - just put the last parameter to 1 - increase the socketcan txquelen to approx 20 because canfestival needs to write can frames in burst the default block size in block mode is 16, so there will be 16 can frames written in the interface in one burst for each block. You can also reduce the block size used by canfestival with the configure script. use https://bitbucket.org/Mongo/canfestival-3-asc for a more up to date code. Kind regards -- Francois Beaulier www.ingelibre.fr Le 13/10/2016 à 02:41, canfestival-devel@lists.sourceforge.net a écrit : Hi list, We are running CanFestival on a RPi3 and using code derived from EPOSMachineKit for DS302 & DS402 management. We will need to be able to update the code on our custom motor controller boards and in looking at CanFestival I have a couple of questions about the interface. 1st. If I send a writeNetworkDict call for a Domain OD entry with a data size of greater than 8 bytes, will CanFestival automatically do a segmented transfer? 2nd. In the interface spec for the writeNetworkDict calls, the last parameter is for a BlockMode, but there really isn't any documentation on what that parameter does, and there are no examples that I can find for its use. Are there any examples available that show using the BlockMode? Regards, Greg Wilson-Lindberg Sakura Finetek 310-783-5075 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org!http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi_______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Developing software update
Hello again, Francois, I've just gotten to the point that I'm trying to access OD1008, DeviceName, which is a Visible_String. I'm doing a readNetworkDictCallbackAI(), with the data type set to visible string. The request is going out as an expedited request, not a segmented request. There is no way to specify the size of the transfer for a network dictionary read. How do I get the request to go out as a segmented request? Regards, Greg From: canfestival-devel@lists.sourceforge.net [mailto:canfestival-devel@lists.sourceforge.net] Sent: Friday, October 14, 2016 2:09 PM To: canfestival-devel@lists.sourceforge.net Subject: Re: [Canfestival-devel] Developing software update Hi Greg 1- yes canfestival will do a segmented transfer automaticaly if more than 4 bytes (not 8) are involved 2- block mode is for a faster SDO transfer of large buffers, it is described in the Cia301 spec. in order to use block mode: - just put the last parameter to 1 - increase the socketcan txquelen to approx 20 because canfestival needs to write can frames in burst the default block size in block mode is 16, so there will be 16 can frames written in the interface in one burst for each block. You can also reduce the block size used by canfestival with the configure script. use https://bitbucket.org/Mongo/canfestival-3-asc for a more up to date code. Kind regards -- Francois Beaulier www.ingelibre.fr<http://www.ingelibre.fr> Le 13/10/2016 à 02:41, canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> a écrit : Hi list, We are running CanFestival on a RPi3 and using code derived from EPOSMachineKit for DS302 & DS402 management. We will need to be able to update the code on our custom motor controller boards and in looking at CanFestival I have a couple of questions about the interface. 1st. If I send a writeNetworkDict call for a Domain OD entry with a data size of greater than 8 bytes, will CanFestival automatically do a segmented transfer? 2nd. In the interface spec for the writeNetworkDict calls, the last parameter is for a BlockMode, but there really isn't any documentation on what that parameter does, and there are no examples that I can find for its use. Are there any examples available that show using the BlockMode? Regards, Greg Wilson-Lindberg Sakura Finetek 310-783-5075 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net<mailto:Canfestival-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi_______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Developing software update
Hi Francois, Thanks for the clarification on Segmented and block transfers. Sorry for the slow reply, been busy on other things. We have been using canfestival-3-asc, but an older version, I'll have to download the newest version and test it our. Regards, Greg From: canfestival-devel@lists.sourceforge.net [mailto:canfestival-devel@lists.sourceforge.net] Sent: Friday, October 14, 2016 2:09 PM To: canfestival-devel@lists.sourceforge.net Subject: Re: [Canfestival-devel] Developing software update Hi Greg 1- yes canfestival will do a segmented transfer automaticaly if more than 4 bytes (not 8) are involved 2- block mode is for a faster SDO transfer of large buffers, it is described in the Cia301 spec. in order to use block mode: - just put the last parameter to 1 - increase the socketcan txquelen to approx 20 because canfestival needs to write can frames in burst the default block size in block mode is 16, so there will be 16 can frames written in the interface in one burst for each block. You can also reduce the block size used by canfestival with the configure script. use https://bitbucket.org/Mongo/canfestival-3-asc for a more up to date code. Kind regards -- Francois Beaulier www.ingelibre.fr<http://www.ingelibre.fr> Le 13/10/2016 à 02:41, canfestival-devel@lists.sourceforge.net<mailto:canfestival-devel@lists.sourceforge.net> a écrit : Hi list, We are running CanFestival on a RPi3 and using code derived from EPOSMachineKit for DS302 & DS402 management. We will need to be able to update the code on our custom motor controller boards and in looking at CanFestival I have a couple of questions about the interface. 1st. If I send a writeNetworkDict call for a Domain OD entry with a data size of greater than 8 bytes, will CanFestival automatically do a segmented transfer? 2nd. In the interface spec for the writeNetworkDict calls, the last parameter is for a BlockMode, but there really isn't any documentation on what that parameter does, and there are no examples that I can find for its use. Are there any examples available that show using the BlockMode? Regards, Greg Wilson-Lindberg Sakura Finetek 310-783-5075 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net<mailto:Canfestival-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] Developing software update
Hi Greg 1- yes canfestival will do a segmented transfer automaticaly if more than 4 bytes (not 8) are involved 2- block mode is for a faster SDO transfer of large buffers, it is described in the Cia301 spec. in order to use block mode: - just put the last parameter to 1 - increase the socketcan txquelen to approx 20 because canfestival needs to write can frames in burst the default block size in block mode is 16, so there will be 16 can frames written in the interface in one burst for each block. You can also reduce the block size used by canfestival with the configure script. use https://bitbucket.org/Mongo/canfestival-3-asc for a more up to date code. Kind regards -- Francois Beaulier www.ingelibre.fr Le 13/10/2016 à 02:41, canfestival-devel@lists.sourceforge.net a écrit : Hi list, We are running CanFestival on a RPi3 and using code derived from EPOSMachineKit for DS302 & DS402 management. We will need to be able to update the code on our custom motor controller boards and in looking at CanFestival I have a couple of questions about the interface. 1st. If I send a writeNetworkDict call for a Domain OD entry with a data size of greater than 8 bytes, will CanFestival automatically do a segmented transfer? 2nd. In the interface spec for the writeNetworkDict calls, the last parameter is for a BlockMode, but there really isn't any documentation on what that parameter does, and there are no examples that I can find for its use. Are there any examples available that show using the BlockMode? Regards, Greg Wilson-Lindberg Sakura Finetek 310-783-5075 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] new canopen open source software
Thank you Lars for your input. Francois Beaulier Le 20/09/2016 à 13:53, canfestival-devel@lists.sourceforge.net a écrit : > Hi Francois, > > Here is my 5 cents > > As far as i can see its marel.com ('provider of advanced food processing > systems and services') that uploaded the code. > > * What's the purpose of if ? > Maybe a server for a high level tool for configuration and interface for lots > of machines/sensors. > > * Would a kind of merge with canfestival be relevant ? > I have only look lightly through the code. > The core canOpen code i dont think that is a good use of time for canfestival > to merge, > But there might very well be things they have done better. > > If we look outside the core canfestival some of the tools and the esd reader > might be a handy... if its not outside the scope of the can festival project > > Have a nice day > > Lars E. Susaas > >> -Original Message- >> From: canfestival-devel@lists.sourceforge.net [mailto:canfestival- >> de...@lists.sourceforge.net] >> Sent: Saturday, September 17, 2016 5:39 PM >> To: canfestival-devel@lists.sourceforge.net >> Subject: [Canfestival-devel] new canopen open source software >> >> Hi there, >> >> I discovered on Github a new open source Canopen related software : >> >> https://github.com/marel-keytech/openCANopen >> >> It seems to be a Canopen master but without a full canopen stack, only NMT, >> SDO client ... >> >> What do you think of it ? What's the purpose of if ? >> >> Would a kind of merge with canfestival be relevant ? >> >> >> Besides don't forget that my fork of canfestival is alive and kicking : >> >> https://bitbucket.org/Mongo/canfestival-3-asc >> >> >> Have a nice day >> >> >> Francois Beaulier >> >> >> >> -- >> ___ >> 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] new canopen open source software
Hi there, I discovered on Github a new open source Canopen related software : https://github.com/marel-keytech/openCANopen It seems to be a Canopen master but without a full canopen stack, only NMT, SDO client ... What do you think of it ? What's the purpose of if ? Would a kind of merge with canfestival be relevant ? Besides don't forget that my fork of canfestival is alive and kicking : https://bitbucket.org/Mongo/canfestival-3-asc Have a nice day Francois Beaulier -- ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] canfestival: question regarding segmented SDO abort behavior
Hello, For a project I'm working on we're using CANopen on a linux platform configured with buildroot. Conveniently, canfestival 3.0 is in it (listed as "canfestival-7740ac6fdedc23e1ed6908d3d7db54833c88572b"). I've been running it for some time now and like the ease of use to get canfestival running in both server/client modes. Thus, first of all thank you very much for the effort spent on this project! However, there seems to be some sort of race condition for segmented SDO's that generate abort conditions. This example shows the problem: If I use a 6byte (TimeOfDay) object with read-only permissions, and try to write it with SDO from the server side (both ends are using canfestival). The following behavior can be observed: 1. Server: Init download request (0x1) 2. Client: Init download response (0x3) 3. Server: Download segment request (0x0) 4. Client: Download segment response (0x1) 5. Client: Abort response (0x4 --> 0X6010002) Step 4 causes the callback on the server to trigger. Then when one attempts to get the result from canfestival with "getWriteResultNetworkDict" there is a small window in which it return success rather than the abort code. The problem seems to be caused by this code section: sdo.c (line 895): MSG_WAR(0x3A73, "SDO. Send response to download request defined at index 0x1200 + ", CliServNbr); sendSDO(d, whoami, CliServNbr, data); /* Inverting the toggle for the next segment. */ d->transfers[line].toggle = ! d->transfers[line].toggle & 1; /* If it was the last segment, */ if (getSDOc(m->data[0])) { /* Transfering line data to object dictionary. */ /* The code does not use the "d" of initiate frame. So it is safe if e=s=0 */ errorCode = SDOlineToObjdict(d, line); if (errorCode) { MSG_ERR(0x1A54, "SDO error : Unable to copy the data in the object dictionary", 0); failedSDO(d, CliServNbr, whoami, index, subIndex, errorCode); return 0xFF; } /* Release of the line */ resetSDOline(d, line); MSG_WAR(0x3A74, "SDO. End of download defined at index 0x1200 + ", CliServNbr); } I think the sendSDO() should not be called if the failedSDO() is bound to occur. If we look at how expedited SDO transfers are handled (sdo.c line 900-910), there the object dictionary is called first, and if it doesn't fail the sendSDO is performed. Therefore, it seems that moving the 3 lines under the MSG_WAR to after the if (getSDOc(m->data[0])) statement solves the issue. This, as the failedSDO is followed by a return statement, thus preventing both messges from appearing. I've included a patch with a possible fix. What do you think of this approach? Met vriendelijke groet / Kind regards, Bas van de Ven Designer [Prodrive B.V.]<http://www.prodrive-technologies.com/> Mobile +31 63 17 76 396 Phone +31 40 26 76 200 www.prodrive-technologies.com<http://www.prodrive-technologies.com> [cid:image002.png@01D1A78C.994597F0] Disclaimer: The content of this e-mail is intended solely for the use of the Individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. If you have received this communication in error, please notify the author by replying to this e-mail immediately. sdo.c.patch Description: sdo.c.patch -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] "invalid initializer" when compiling
I everyone, I tried to compile Canfestival on my computer with the config below : ./configure --can=virtual All worked fine with the command above. But when trying to compile with "make" command, I have the following error : - gcc -c -O2 -fPIC -I../../include -I../../include/unix -I../../include/can_virtual -I../../include/timers_unix ObjDict.c -o ObjDict.o ObjDict.c:167:48: error: invalid initializer UNS8 ObjDict_obj1008[10] = (UNS8*)""; ^ ObjDict.c:174:48: error: invalid initializer UNS8 ObjDict_obj1009[10] = (UNS8*)""; ^ ObjDict.c:181:48: error: invalid initializer UNS8 ObjDict_obj100A[10] = (UNS8*)""; ^ Makefile:58: recipe for target 'ObjDict.o' failed make[2]: *** [ObjDict.o] Error 1 make[2]: Leaving directory 'INSTALL_DIR/CanFestival -3/examples/DS401_Slave_Gui' Makefile:75: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory 'INSTALL_DIR/CanFestival-3/examples' Makefile:27: recipe for target 'examples' failed make: *** [examples] Error 2 - Can you help me to solve this problem? Thanx! -- LEMOFACK GONANG -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351=/4140 _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
Re: [Canfestival-devel] EPOS motor controller and PC as master
Hi, You need to add an SDO client entry in your master object dict. You must set the sub index 3 (Node-ID of the SDO server) with the node id of your controller. This way writeNetworkDictCallBack() will find an available SDO client and use it. Regards -- Francois Beaulier www.ingelibre.fr Le 12/03/2016 14:32, canfestival-devel@lists.sourceforge.net a écrit : > Hi, > > I hope someone can help me here, I try to control an Epos motor > controller with my linux PC. > I used the Objdictedit tool to import an .eds file of an Epos motor > controller (generated by EPOS studio). > After that I changed the type from slave to master in the Node info > window (is that right?). > > Exporting the file to a epos.c file was no problem. But if I use the > "writeNetworkDictCallBack" > to write data to the node, no CAN message is sent out and I get the > following trace: > > sdo.c,1919 : 0X3ac0 Send SDO to write in the dictionary of node : 0X8 > sdo.c,1920 : 0X3ac1At index : 0X6040 > sdo.c,1921 : 0X3ac2subIndex : 0X0 > sdo.c,1922 : 0X3ac3nb bytes : 0X2 > sdo.c,1855 : 0X1ad2 index : 0X1280 > sdo.c,1856 : 0X1ad3 nodeIdServer : 0X0 > sdo.c,1866 : 0X1ac9 SDO No preset client found to communicate with node > : 0X8 > > My system is running on linux and socketcan. With candump I can see > outgoing Nmt messages but no SDO messages. > The CanOpenShell is also running without any issues... > > So the error must be in the generated epos.c/h files... > > Any ideas what might be the problem? > > -- > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140 > ___ > Canfestival-devel mailing list > Canfestival-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/canfestival-devel -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140 _______ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] EPOS motor controller and PC as master
Hi, I hope someone can help me here, I try to control an Epos motor controller with my linux PC. I used the Objdictedit tool to import an .eds file of an Epos motor controller (generated by EPOS studio). After that I changed the type from slave to master in the Node info window (is that right?). Exporting the file to a epos.c file was no problem. But if I use the "writeNetworkDictCallBack" to write data to the node, no CAN message is sent out and I get the following trace: sdo.c,1919 : 0X3ac0 Send SDO to write in the dictionary of node : 0X8 sdo.c,1920 : 0X3ac1At index : 0X6040 sdo.c,1921 : 0X3ac2subIndex : 0X0 sdo.c,1922 : 0X3ac3nb bytes : 0X2 sdo.c,1855 : 0X1ad2 index : 0X1280 sdo.c,1856 : 0X1ad3 nodeIdServer : 0X0 sdo.c,1866 : 0X1ac9 SDO No preset client found to communicate with node : 0X8 My system is running on linux and socketcan. With candump I can see outgoing Nmt messages but no SDO messages. The CanOpenShell is also running without any issues... So the error must be in the generated epos.c/h files... Any ideas what might be the problem? -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140 ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] Error in object dictionary editor (nodemanager.py)
Hi, yesterday I tried to delete object dictionary subindex field in the editor without success. Finally I found an error in nodemanager.py, function RemoveSubentriesFromCurrent(): In line 410 if infos["struct"] & OD_IdenticalSubindexes or 0x2000 <= index <= 0x5FFF and infos["struct"] & OD_IdenticalSubindexes: OD_IdenticalSubindexes should be replaced by OD_MultipleSubindexes: if (infos["struct"] & OD_IdenticalSubindexes) or (0x2000 <= index <= 0x5FFF and (infos["struct"] & OD_MultipleSubindexes)): I hope that this correction is right (it works for me). If yes, could someone check in the changes? Thanks Torsten ---------- ___________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel
[Canfestival-devel] NMT_Slave missing heartbeat message from NMT_Master after running 3 to 4 days
Hi CanFestval Developers, for me in the network there are 2 boards. One working as NMT_Master and another working as NMT_Slave. And it is working smoothly around 3 to 4 days. But after that NMT_Slave somehow missing HeartBeat generating by NMT_Master (as per log) and trying to become NMT_Master without any reason. Which is not acceptable for me. I am struggling to get the reason. Settings are like this, # # The maximum allowed time between heatbeats from the Master # NMT_MAX_HEARTBEAT_TIME = 2000 NMT_HEARTBEAT_PRODUCER_TIME = 1000 I have digged too much of code but no clue anywhere. Could you please help me to know what could be the possible reason? Regard's Tarun -- ___ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel