Pages: [1]   Go Down
Author Topic: Reset instability when connected to programming USB?  (Read 696 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
God Member
*****
Karma: 32
Posts: 828
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm just porting some code to the Due, which is fairly mature and stable, and has been running on AVR boards (all the standard flavors) and also on Maple5 (which is also ARM Cortex-M3).

The code seems stable on the Due except when the programming USB port is connected, in which case I'm seeing resets every few seconds (maybe get to about 6 or 8 seconds into the program execution and then a reset, and see all the setup() sequence again).

OTOH, if the program is left running without the programming USB port connected, it will run indefinitely without a problem, at least in my testing so far.

The code is fairly interrupt intensive, using one external interrupt. I'd estimate the sketch is spending somewhere between 10-20% of it's total time servicing interrupts.

Before I start digging further, does this ring any bells? No problems when running on any the AVRs or the Maple5 with the USB serial port connected, for example.




« Last Edit: December 11, 2012, 10:44:44 am by pico » Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Offline Offline
God Member
*****
Karma: 32
Posts: 828
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not a power supply issue -- see below.


« Last Edit: December 13, 2012, 07:51:55 am by pico » Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Offline Offline
God Member
*****
Karma: 32
Posts: 828
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Spoke too soon... not a power supply issue.

The issue occurs when the Due is connected via the USB programming port, and is sending serial data, but there is no serial monitor program open to receive the data.

If either the serial monitor in the iDE, or something like Putty outside the IDE, is open and connected to the programming USB virtual serial port, no resets.

Close the serial monitor, and the resets occur. It seems to be an interaction with the USB port (windows 7 x64) and the Due. A reset occurs when the rx buffer is full on the USB port perhaps?
 
« Last Edit: December 13, 2012, 07:55:23 am by pico » Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Pages: [1]   Go Up
Jump to: