user19810: I recently obtained a Controllino Mini to be used in a small industrial project. While checking it out I also wanted to test the built-in RTC capabilities. In doing so I toyed around with the available commands from the supplied library. After uploading another sketch it seems I have bricked the Controllino, since I cannot upload anything else : 

avrdude: stk500_recv(): programmer is not responding avrdude:
  stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

and the reset LED is permanently lid. When looking at the pinout diagram of the Controllino Mini I saw that there was a small remark  near the top stating 

Not proper handling of the RTC/INT output can cause permanent
  controllino reset , so I guess I somehow reached that state.

Since I am pretty new to the whole Arduino / Microcontroller scene I don't really know where to go from here. 

Is it a viable idea to try and burn a new bootloader ? 
Is there a simpler way to reset the state of the device?
What did I even do wrong ?

Any help is greatly appreciated !
Christian
Below is the sketch that got me into this mess:
#include <Controllino.h>


unsigned char day, weekday, month, year, hour, minute, sec;
#define analogInputPin A0
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(analogInputPin, INPUT);
Controllino_RTC_init(1);
Serial.print("Initalized RTC: ");
Controllino_SetTimeDate(1,6,4,2016,15,14,10);
}

void loop() {
 Controllino_ReadTimeDate(&day,&weekday,&month,&year,&hour,&minute,&sec);
  float voltage = 15*(analogRead(analogInputPin)/1023.0);
  Serial.print(hour);
  Serial.print(":");
  Serial.print(minute);
  Serial.print(":");
  Serial.print(sec);
  Serial.print(" : ");

  Serial.println(voltage);


}


user19810: I just received an answer from the official team which should work, I'll leave it here for further reference:


Open the device and disconnect (remove) connection board for approx. 30 seconds from the control board – RTC is disconnected from power (gold cap disconnected) and because of that there is reset of all RTC registers.
Plug the connection board back in to the control board. Now we need to rewrite the SW inside the Controllino which caused wrong RTC setting.
Open the Controllino example RTC sketch in Arduino IDE and prepare it to upload (function Controllino_RTC_init(0); shall reset all registers inside the RTC).
Pres and hold reset button on the Controllino device.
Connect the USB Cable (still hold the reset button, SW inside the Controllino doesn’t start)
Click for upload the sketch in Aruduino IDE and wait for „uploading“ message on debug line, than immediately release the reset button and uploading shall be finished (=> hold the reset button during the compiling phase)
If not successful, repeat the procedure



user4143: It certainly looks like the INT pin of the RTC can kill the whole unit. Bit of a FUBAR on their part I would say. 

Is it a viable idea to try and burn a new bootloader ?

If the problem is that INT pin then you won't be able to replace the bootloader, and even if you did it wouldn't fix the problem.

Is there a simpler way to reset the state of the device?

It looks like you will have to make a hardware modification - cut the connection between /INT and /RESET on the board - if you can identify which track that might be - or use a soldering iron to heat and lift the /INT pin of the RTC chip, which might be easier, depending on what the chip is (they are amazingly short on information).

What did I even do wrong ?

Probably nothing serious - it's the design that is at fault. Anything that has the potential to completely cripple a system like that without even trying is just idiotic.

19810: <p>I recently obtained a Controllino Mini to be used in a small industrial project. While checking it out I also wanted to test the built-in RTC capabilities. In doing so I toyed around with the available commands from the supplied <a href="https://github.com/Controllino/ControllinoLibrary" rel="nofollow">library</a>. After uploading another sketch it seems I have bricked the Controllino, since I cannot upload anything else : </p>

<blockquote>
  <p>avrdude: stk500_recv(): programmer is not responding avrdude:
  stk500_getsync() attempt 10 of 10: not in sync: resp=0x00</p>
</blockquote>

<p>and the reset LED is permanently lid. When looking at the <a href="http://controllino.cc/wp-content/uploads/2015/10/CONTROLLINO-MINI-PINOUT-02-10-15.jpg" rel="nofollow">pinout</a> diagram of the Controllino Mini I saw that there was a small remark  near the top stating </p>

<blockquote>
  <p>Not proper handling of the RTC/INT output can cause permanent
  controllino reset , so I guess I somehow reached that state.</p>
</blockquote>

<p>Since I am pretty new to the whole Arduino / Microcontroller scene I don't really know where to go from here. </p>

<ul>
<li><p>Is it a viable idea to try and burn a new bootloader ? </p></li>
<li><p>Is there a simpler way to reset the state of the device?</p></li>
<li><p>What did I even do wrong ?</p></li>
</ul>

<p>Any help is greatly appreciated !</p>

<p>Christian</p>

<p>Below is the sketch that got me into this mess:</p>

<pre><code>#include &lt;Controllino.h&gt;


unsigned char day, weekday, month, year, hour, minute, sec;
#define analogInputPin A0
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(analogInputPin, INPUT);
Controllino_RTC_init(1);
Serial.print("Initalized RTC: ");
Controllino_SetTimeDate(1,6,4,2016,15,14,10);
}

void loop() {
 Controllino_ReadTimeDate(&amp;day,&amp;weekday,&amp;month,&amp;year,&amp;hour,&amp;minute,&amp;sec);
  float voltage = 15*(analogRead(analogInputPin)/1023.0);
  Serial.print(hour);
  Serial.print(":");
  Serial.print(minute);
  Serial.print(":");
  Serial.print(sec);
  Serial.print(" : ");

  Serial.println(voltage);


}
</code></pre>
 19810: <p>I just received an answer from the official team which should work, I'll leave it here for further reference:</p>

<blockquote>
  <ol>
  <li>Open the device and disconnect (remove) connection board for approx. 30 seconds from the control board – RTC is disconnected from power (gold cap disconnected) and because of that there is reset of all RTC registers.</li>
  <li>Plug the connection board back in to the control board. Now we need to rewrite the SW inside the Controllino which caused wrong RTC setting.</li>
  <li>Open the Controllino example RTC sketch in Arduino IDE and prepare it to upload (function Controllino_RTC_init(0); shall reset all registers inside the RTC).</li>
  <li>Pres and hold reset button on the Controllino device.</li>
  <li>Connect the USB Cable (still hold the reset button, SW inside the Controllino doesn’t start)</li>
  <li>Click for upload the sketch in Aruduino IDE and wait for „uploading“ message on debug line, than immediately release the reset button and uploading shall be finished (=> hold the reset button during the compiling phase)</li>
  <li>If not successful, repeat the procedure</li>
  </ol>
</blockquote>
 4143: <p>It certainly looks like the INT pin of the RTC can kill the whole unit. Bit of a FUBAR on their part I would say. </p>

<blockquote>
  <p>Is it a viable idea to try and burn a new bootloader ?</p>
</blockquote>

<p>If the problem is that INT pin then you won't be able to replace the bootloader, and even if you did it wouldn't fix the problem.</p>

<blockquote>
  <p>Is there a simpler way to reset the state of the device?</p>
</blockquote>

<p>It looks like you will have to make a hardware modification - cut the connection between /INT and /RESET on the board - if you can identify which track that might be - or use a soldering iron to heat and lift the /INT pin of the RTC chip, which might be easier, depending on what the chip is (they are amazingly short on information).</p>

<blockquote>
  <p>What did I even do wrong ?</p>
</blockquote>

<p>Probably nothing serious - it's the design that is at fault. Anything that has the potential to completely cripple a system like that without even trying is just idiotic.</p>
