Activity › Forums › Questions & Troubleshooting › Software & Firmware › Disable automatic reset
-
Disable automatic reset
-
Hello, Is there any way we can disable automatic reset of Controllino (MAXI) after connecting to Serial port for example ?
Is there any non-hardware way to do it ?
Thank you !
-
Hello There ! S.O.S.
Same question : Is it possible to disable automatic reset on the MEGA after connect it to PC USB port ? It provokes reset on all input and outputs, and relays back to inactive.
S.O.S.
[It is an important issue to all of us starting using Controllino]
Thanks !
-
Hello, the only way is to modfiy the firmware of the Atmega16U2 which serves as an USB to UART converter.
The source codes are available, e.g. here
https://github.com/jj1bdx/arduino-atmega16u2https://github.com/jj1bdx/arduino-atmega16u2” class=”bbcode_url”> The build toolchain is described e.g. here
[url]Thanks Lukas ! I really like this Arduino-PLC integration as it can help me solve some controlling projects for my own company.
Regarding “reset behavior” of the unit, in my opinion, maybe it’s gonna be better to use Controllino taking advantage that it is a ruggedized-industrial microcontroller only, and wait until Controllino take care of details in the future (pretty sure they can easily if requested by most of users), cause I’m pretty sure integrators don’t want processes reset when in operation just for opening aplications programs via USB port .
I’m using UNO and Leonardo, even managed by Server and my programs (C# pgms/browser) are not affected by this detail…It only happens with MEGA2560 and its CLONS , maybe same firmware. I have not checked with an app via Ethernet port yet, hopefully this can help overcome this commented detail.
Thank you !
Hello, but the reset via USB COM port is essential for the activation of the bootloader and sketch upload by the avrdude from the Arduino IDE. So we cannot just disable it based on “integrators” request
Because then we will lose the compatibility with the Arduino IDE … Or am I wrong?
Thanks,
Lukas
Hey Lukas, Basically the reset we are talking about occurs when you activate your app program (in my case a C#) from a PC USB connected to Controllino MEGA.
I have deployed my app with ARDUINO UNO, ARDUINO LEONARDO and it doesn’t reset the microcontroller when you open the program…but in Controllino MEGA. It is important that the program just get the status when you open it and later on you can control it.
I have been using windows10 PC including LATTEPANDA(ARDUINO LEONARDO included) and no problem at all. Maybe you guys have a better understanding of Controllino USB port comm and can recommend/find a fix. In no case the IDE communication was lost.
Thank you !
Marco
Hello Marco, thanks for the information. We will investigate it and probably prepare a new firmware for the USB-UART converter.
Stay tuned!
Lukas
I have once implemented such a feature that the program could reconnect without triggerning reset. It is possible to disable the use of DTR if serial is programmed low level on the PC side. Hello, Ad connecting and reconnecting to Serial port of Controllino and Arduino in general.
In C# when You use
there isSerialPort Class which enables or disables DTR (Data Terminal Ready) signal during serial communication.SerialPort.DtrEnable PropertyWhen it is disabled connecting and reconnecting to Controllino (tested on Mini, Maxi and Mega) do NOT cause Controllino to reset.
Here is example of my Class and Constructor I used for tests:
Code:
using System.IO.Ports;///
/// Defines the
///public class COMPort : SerialPort
{///
/// Initializes a new instance of the class.
////// The aPortname
/// The aBaudRate
/// The aDataBits
public COMPort(string aPortname, int aBaudRate, int aDataBits, bool aDtrEnable)
{
// open ComPort
this.PortName = aPortname;
this.BaudRate = aBaudRate;
this.DataBits = aDataBits;
this.Parity = System.IO.Ports.Parity.None;
this.StopBits = System.IO.Ports.StopBits.One;
this.Handshake = System.IO.Ports.Handshake.None;
this.RtsEnable = true;
this.DtrEnable = aDtrEnable;
}
}
And when I open COM port with aDtrEnable=true it causes reset, but when I open COM port with aDtrEnable=false the Controllino (even Arduino UNO and Arduino MEGA) do NOT reset.
Has this been fixed in the meantime? I am having the same issue on a Mini. Robbert
Lukas wrote:
Hello Marco,thanks for the information. We will investigate it and probably prepare a new firmware for the USB-UART converter.
Stay tuned!
Lukas
Viewing 1 - 12 of 12 repliesLog in to reply.