Timeouts Only With Natural Boot

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll describe the behavior I'm seeing, and if anyone has any insight into what may be the cause I'd very much appreciate it.

 

I'm programming an XMEGA C device and talking to it through Modbus RTU. I've somehow gotten my project into a state where I can run the Modbus communications perfectly if I hit Start Debugging and load it up from Atmel Studio 7. It also works perfectly if I program the flash from the Device Programming menu.

 

If I power cycle my device and let it boot up on its own, then I will timeout on all Modbus communications.

 

If I leave a debugging session running from Atmel Studio, power cycle my device and let it boot up on its own, [it hits the timeouts here], then hit Stop Debugging in Atmel Studio it will work perfectly.

 

Thanks in advance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jionbha wrote:
If I power cycle my device and let it boot up on its own, then I will timeout

 

That sounds like a classic case of a forgotten critical variable needs to be initialized before it can be used. Perhaps a pointer?    But that is just a guess smiley

 

Jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I figured it out -- I had some sensors I was trying to communicate with when they were not fully powered, or in some way still initializing themselves when power hit them. If I were to hit Start Debugging, they had already had power for a while. They were getting thrown into a bad comms. state if communication with them was attempted too soon.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jionbha wrote:
I had some sensors I was trying to communicate with when they were not fully powered

Glad you got it figured out, those types of trouble can make one lose a lot of hair!  smiley

 

Jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"