Activity Forums Questions & Troubleshooting Software & Firmware Disable automatic reset

  • Disable automatic reset

     Lukas updated 1 year ago 6 Members · 12 Posts
  • localhost

    Member
    April 1, 2019 at 3:19 pm

    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 !

  • set-comm

    Member
    April 11, 2019 at 12:03 am

    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 !

  • Lukas

    Member
    April 12, 2019 at 10:44 am

    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-atmega16u2” class=”bbcode_url”>https://github.com/jj1bdx/arduino-atmega16u2

    The build toolchain is described e.g. here [url]

    set-comm

    Member
    April 12, 2019 at 5:13 pm

    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 !

  • Lukas

    Member
    May 13, 2019 at 11:57 am

    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

  • set-comm

    Member
    May 15, 2019 at 5:25 am

    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

  • Lukas

    Member
    May 20, 2019 at 10:11 am

    Hello Marco,

    thanks for the information. We will investigate it and probably prepare a new firmware for the USB-UART converter.

    Stay tuned! :)

    Lukas

  • asch

    Member
    May 27, 2019 at 10:26 am

    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.

  • jasin

    Member
    July 3, 2019 at 1:18 pm

    Hello,

    Ad connecting and reconnecting to Serial port of Controllino and Arduino in general.

    In C# when You use SerialPort Class there is SerialPort.DtrEnable Property which enables or disables DTR (Data Terminal Ready) signal during serial communication.

    When 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.

  • set-comm

    Member
    March 12, 2020 at 3:01 am

    Thanks for the tip Jasin !

    Better late than never jajaj…

  • robbert

    Member
    June 4, 2020 at 11:48 am

    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

  • Lukas

    Member
    June 17, 2020 at 7:38 am

    Hello Robbert,

    no, it was not fixed at the device side. As you can read in this discussion thread it may lead to an incompatibility with the Arduino IDE. Have you seen the solution from Jasin?

    Thanks,

    Lukas

Log in to reply.

Original Post
0 of 0 posts June 2018
Now