Topics

Arduino Hangs


Howard Fidel
 

I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard


George
 

Dear Mr Howard, when I some how killed my Arduini Nano I didn't know what to do but I've find small programme XLoader and with it help managed to load HEX file from KD8CEC for mBITX transceiver - good working programme. May be it'll help you. George RX3ARG/UR4CRG


Jack, W8TEE
 

Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard


Howard Fidel
 

Yes, and the V4 program I was running before loaded properly.

On 8/14/2018 10:54 PM, Jack Purdum via Groups.Io wrote:
Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard



Jack, W8TEE
 

Does the "code" hang, or does the "compile process", or does the "upload" hang?

Jack, W8TEE


On Tuesday, August 14, 2018, 11:22:44 PM EDT, Howard Fidel <sonic1@...> wrote:


Yes, and the V4 program I was running before loaded properly.

On 8/14/2018 10:54 PM, Jack Purdum via Groups.Io wrote:
Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard



Howard Fidel
 

As I said, the Arduino starts and displays the version number then hangs.

On 8/14/2018 11:28 PM, Jack Purdum via Groups.Io wrote:
Does the "code" hang, or does the "compile process", or does the "upload" hang?

Jack, W8TEE


On Tuesday, August 14, 2018, 11:22:44 PM EDT, Howard Fidel <sonic1@...> wrote:


Yes, and the V4 program I was running before loaded properly.

On 8/14/2018 10:54 PM, Jack Purdum via Groups.Io wrote:
Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard




Jack, W8TEE
 

If you're using "known" software (e.g., from Dr. Lee or Allard), I would download a "fresh" copy and try again. Also, make sure you are using the latest version of the IDE.

Jack, W8TEE


On Tuesday, August 14, 2018, 11:30:51 PM EDT, Howard Fidel <sonic1@...> wrote:


As I said, the Arduino starts and displays the version number then hangs.

On 8/14/2018 11:28 PM, Jack Purdum via Groups.Io wrote:
Does the "code" hang, or does the "compile process", or does the "upload" hang?

Jack, W8TEE


On Tuesday, August 14, 2018, 11:22:44 PM EDT, Howard Fidel <sonic1@...> wrote:


Yes, and the V4 program I was running before loaded properly.

On 8/14/2018 10:54 PM, Jack Purdum via Groups.Io wrote:
Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard




Howard Fidel
 

Jack:
Thanks. I am running my customized version which I have been using for a few months. I also tried
the original code, but I get the same exact problem. It would be nice to have a flow chart for the code so I can better understand the flow and figure out where to put in test statements to figure it out. It must be some I/O issue I think because the code is good, and I had to rework the Raduino to change the Arduino. Maybe in the morning I will look for possible shorts on the I/O pins, maybe something it looks at?

Howard

On 8/14/2018 11:35 PM, Jack Purdum via Groups.Io wrote:
If you're using "known" software (e.g., from Dr. Lee or Allard), I would download a "fresh" copy and try again. Also, make sure you are using the latest version of the IDE.

Jack, W8TEE


On Tuesday, August 14, 2018, 11:30:51 PM EDT, Howard Fidel <sonic1@...> wrote:


As I said, the Arduino starts and displays the version number then hangs.

On 8/14/2018 11:28 PM, Jack Purdum via Groups.Io wrote:
Does the "code" hang, or does the "compile process", or does the "upload" hang?

Jack, W8TEE


On Tuesday, August 14, 2018, 11:22:44 PM EDT, Howard Fidel <sonic1@...> wrote:


Yes, and the V4 program I was running before loaded properly.

On 8/14/2018 10:54 PM, Jack Purdum via Groups.Io wrote:
Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard





Howard Fidel
 

Also, the hello world sketch works properly. This proves the display and the Arduino are alive. I am guessing the code is looking for a specific state on an I/O pin to move forward and is not finding it. Just need to figure out which pin!

On 8/14/2018 11:45 PM, Howard Fidel wrote:
Jack:
Thanks. I am running my customized version which I have been using for a few months. I also tried
the original code, but I get the same exact problem. It would be nice to have a flow chart for the code so I can better understand the flow and figure out where to put in test statements to figure it out. It must be some I/O issue I think because the code is good, and I had to rework the Raduino to change the Arduino. Maybe in the morning I will look for possible shorts on the I/O pins, maybe something it looks at?

Howard

On 8/14/2018 11:35 PM, Jack Purdum via Groups.Io wrote:
If you're using "known" software (e.g., from Dr. Lee or Allard), I would download a "fresh" copy and try again. Also, make sure you are using the latest version of the IDE.

Jack, W8TEE


On Tuesday, August 14, 2018, 11:30:51 PM EDT, Howard Fidel <sonic1@...> wrote:


As I said, the Arduino starts and displays the version number then hangs.

On 8/14/2018 11:28 PM, Jack Purdum via Groups.Io wrote:
Does the "code" hang, or does the "compile process", or does the "upload" hang?

Jack, W8TEE


On Tuesday, August 14, 2018, 11:22:44 PM EDT, Howard Fidel <sonic1@...> wrote:


Yes, and the V4 program I was running before loaded properly.

On 8/14/2018 10:54 PM, Jack Purdum via Groups.Io wrote:
Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard






Tom, wb6b
 

Is it just that the program hangs, or are you no longer able to upload programs to the Nano?

I've started to have problems uploading programs to clone Nanos with my Mac, after I upgraded to the new Arduino hardware drivers that now include the "Old Boot loader" option in the programmer menu. I even have one Nano where I cannot program the Nano anymore after a failed programming attempt.

However, on my Raspberry Pi, (except for the one was broken in the failed upload) I have no problems uploading programs to Nanos from my collection of cheap clones.

Don't know if this program upload issue-- with the new Arduino system upgrade-- is just limited to my laptop or affects other Mac or Windows users.

I'm going to program a Nano to act as an "ISP" and see if I can program a new boot loader into the currently not working one. Not sure if the cheep Nano clone boot loaders are (or even need to be) tweaked because they use different USB serial chips and possibility different CPU clock frequencies. (Based on the results I was getting with a recent program I wrote, I think some of my cheep clones may be running slower than the expected 16 Mhz, although I have not verified that yet.)

Tom, wb6b


Jack, W8TEE
 

Ihaven't tried this, put something like:

void setup()
{
   int i;

   for (i = 2; i < 14; i++) {
      pinMode(i, OUTPUT);
      digitalWrite(i, HIGH);
      delay(10000UL);
      digitalWrite(i, LOW);
   }
}

You would have about 10 seconds to move your voltmeter from pin-to-pin. You could test the analog pins the same way, as they can also be used as digital pins. The test would at least show that the pins can change state.

Jack, W8TEE



On Tuesday, August 14, 2018, 11:52:39 PM EDT, Howard Fidel <sonic1@...> wrote:


Also, the hello world sketch works properly. This proves the display and the Arduino are alive. I am guessing the code is looking for a specific state on an I/O pin to move forward and is not finding it. Just need to figure out which pin!

On 8/14/2018 11:45 PM, Howard Fidel wrote:
Jack:
Thanks. I am running my customized version which I have been using for a few months. I also tried
the original code, but I get the same exact problem. It would be nice to have a flow chart for the code so I can better understand the flow and figure out where to put in test statements to figure it out. It must be some I/O issue I think because the code is good, and I had to rework the Raduino to change the Arduino. Maybe in the morning I will look for possible shorts on the I/O pins, maybe something it looks at?

Howard

On 8/14/2018 11:35 PM, Jack Purdum via Groups.Io wrote:
If you're using "known" software (e.g., from Dr. Lee or Allard), I would download a "fresh" copy and try again. Also, make sure you are using the latest version of the IDE.

Jack, W8TEE


On Tuesday, August 14, 2018, 11:30:51 PM EDT, Howard Fidel <sonic1@...> wrote:


As I said, the Arduino starts and displays the version number then hangs.

On 8/14/2018 11:28 PM, Jack Purdum via Groups.Io wrote:
Does the "code" hang, or does the "compile process", or does the "upload" hang?

Jack, W8TEE


On Tuesday, August 14, 2018, 11:22:44 PM EDT, Howard Fidel <sonic1@...> wrote:


Yes, and the V4 program I was running before loaded properly.

On 8/14/2018 10:54 PM, Jack Purdum via Groups.Io wrote:
Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard






Karl Heinz Kremer, K5KHK
 

This might be useful for both Tom and Howard: Every now and then, the serial port on my Mac gets into a funky state, and I can no longer upload to the Nano, and I have to reboot the computer to get it back into a working condition. One time, a partial sketch got uploaded to the Arduino, and I had similar symptoms as Howard: The Version number got displayed, but instead of hanging, the Arduino resetbitself and started over in a loop. Maybe a reboot is in order to get things working again. 
--
Karl Heinz - K5KHK


John (vk2eta)
 

Hello Howard,

Based on what you describe I suspect an issue with the I2C bus.

Suggested tests would be either to
a) Comment out the wire.xxxx call lines in the si5351 tab or
b) Load my test program (in the file section) as it performs 3 gradual tests of the bus, including writing to the si5351 but with a timeout. So it will always return a result, positive or negative.

From memory the wire library uses blocking call for sending data over the bus. So if the communication is not possible it would hang there.

Reasons could be defective nano A4/A5, short/open circuit in bus lines, defective si5351.

73, John (VK2ETA)


Howard Fidel
 

John:
I did find a short between D3-D4-D5 under the connector to the uBitx main board. I don't know how that happened, since I didn't touch that connector doing the rework. Anyway, the problem didn't go away after clearing the shorts. I loaded your ubitx_diagnostic and it also hangs with the version on the display. It seems it is not getting to the I2C bus section? Or do I have the wrong program?

Thanks,
Howard

On 8/15/2018 9:48 AM, John wrote:
Hello Howard,

Based on what you describe I suspect an issue with the I2C bus.

Suggested tests would be either to
a) Comment out the wire.xxxx call lines in the si5351 tab or
b) Load my test program (in the file section) as it performs 3 gradual tests of the bus, including writing to the si5351 but with a timeout. So it will always return a result, positive or negative.

From memory the wire library uses blocking call for sending data over the bus. So if the communication is not possible it would hang there.

Reasons could be defective nano A4/A5, short/open circuit in bus lines, defective si5351.

73, John (VK2ETA)



Howard Fidel
 

John:
I added a print statement before and after the first i2c write and it is definitely the I2C that is hanging up, it doesn't get through the write statements. Great call!
Now I have to figure out if that chip also died, or if there is another issue. I've got to leave for a while, so I probably won't look at it again until tonight.

Howard

On 8/15/2018 9:48 AM, John wrote:
Hello Howard,

Based on what you describe I suspect an issue with the I2C bus.

Suggested tests would be either to
a) Comment out the wire.xxxx call lines in the si5351 tab or
b) Load my test program (in the file section) as it performs 3 gradual tests of the bus, including writing to the si5351 but with a timeout. So it will always return a result, positive or negative.

From memory the wire library uses blocking call for sending data over the bus. So if the communication is not possible it would hang there.

Reasons could be defective nano A4/A5, short/open circuit in bus lines, defective si5351.

73, John (VK2ETA)



James Lynes
 

Jack:

Good idea!

Would be nice to have a loop-back cable, set 1/2 I/Os to input and 1/2 to output. Cycle the pins and display to serial monitor. Reverse ins and outs and repeat.

Haven't had good diagnostics since PCs killed minis. Data General NMORT could find anything as long as you remembered that a failed multiple/divide test meant that the card reader cable was loose.

James


Arv Evans
 

Howard

Might only need to flow-chart the section where it displays the Version Number and then hangs. 
I would start in that area with adding print statements that point to individual lines of code (turn on
line numbers in the IDE and use these numbers in the print statements to keep them short).

Arv
_._


On Tue, Aug 14, 2018 at 9:45 PM Howard Fidel <sonic1@...> wrote:
Jack:
Thanks. I am running my customized version which I have been using for a few months. I also tried
the original code, but I get the same exact problem. It would be nice to have a flow chart for the code so I can better understand the flow and figure out where to put in test statements to figure it out. It must be some I/O issue I think because the code is good, and I had to rework the Raduino to change the Arduino. Maybe in the morning I will look for possible shorts on the I/O pins, maybe something it looks at?

Howard

On 8/14/2018 11:35 PM, Jack Purdum via Groups.Io wrote:
If you're using "known" software (e.g., from Dr. Lee or Allard), I would download a "fresh" copy and try again. Also, make sure you are using the latest version of the IDE.

Jack, W8TEE


On Tuesday, August 14, 2018, 11:30:51 PM EDT, Howard Fidel <sonic1@...> wrote:


As I said, the Arduino starts and displays the version number then hangs.

On 8/14/2018 11:28 PM, Jack Purdum via Groups.Io wrote:
Does the "code" hang, or does the "compile process", or does the "upload" hang?

Jack, W8TEE


On Tuesday, August 14, 2018, 11:22:44 PM EDT, Howard Fidel <sonic1@...> wrote:


Yes, and the V4 program I was running before loaded properly.

On 8/14/2018 10:54 PM, Jack Purdum via Groups.Io wrote:
Does it run the sample program named Blink that comes with the IDE?

Jack, W8TEE


On Tuesday, August 14, 2018, 9:45:21 PM EDT, Howard Fidel <sonic1@...> wrote:


I was hopping I could pick someone's brain before I start to experiment with the code I am running on my Arduino. My Arduino nano died, and I just replaced it with a new one. (I tried to socket it, but the pins didn't plug into any sockets I have.) The code hangs at the version number. Is there anything going on that the code looks for that it is not seeing to move on? I know how to add print statements to see if I can locate where the problem is, but if someone has seen this, maybe you could save me some time.
Thanks,

Howard





John (vk2eta)
 

Howard:

The interaction with the diagnostic software is via the serial port as I assumed the communication with the display or the encoder could be faulty.

Use the serial monitor of the IDE. See the README.txt file for the comms parameters.

The i2c bus tests are:
1. Is the bus locked (lines pulled down)?
2. Is the si5351 at the expected address responding?
3. Can we write a byte to a register at that address?

If you get error 1 check the bus. You could change the blink sketch to toggle A4 and A5 and measure the voltages (0V then 3.3V).

If you get error 2 it could be 3.3V not getting to si5351 or chip dead, or other bus issue.

If you get error 3, prepare the (de)soldering station, chip gone mad :(

73, John (VK2ETA)


Howard Fidel
 


John:
I can get to the diagnostic menu. I assume I am to press 1 for the core? I tried all of them, and I see nothing happening. I will load my code, and look with a scope at the I2C bus.

Howard

On 8/15/2018 4:43 PM, John wrote:
Howard:

The interaction with the diagnostic software is via the serial port as I assumed the communication with the display or the encoder could be faulty.

Use the serial monitor of the IDE. See the README.txt file for the comms parameters.

The i2c bus tests are:
1. Is the bus locked (lines pulled down)?
2. Is the si5351 at the expected address responding?
3. Can we write a byte to a register at that address?

If you get error 1 check the bus. You could change the blink sketch to toggle A4 and A5 and measure the voltages (0V then 3.3V).

If you get error 2 it could be 3.3V not getting to si5351 or chip dead, or other bus issue.

If you get error 3, prepare the (de)soldering station, chip gone mad :(

73, John (VK2ETA)



John (vk2eta)
 

Hoeard:

You are correct. The menu is navigated with number plus Enter.

Please check that all comma parameters are as per the readme.txt including the line feed options.

Your oscilloscope test will tell you a lot too.

73, John