trackuino / legacy_wiki

Automatically exported from code.google.com/p/trackuino
0 stars 1 forks source link

Microchip Uno32 unable to start if serial data received before setup() is called #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attach both RX/TX from Venus GPS to Uno32
2. Power Uno32, RX light comes and and becomes 'stuck'

What steps will avoid the problem?
1. Attach only RX from Venus GPS to Uno32
2. Power Uno32, wait until power LED goes low (signaling start of setup() )
3. Attach RX

What is the expected output? What do you see instead?
Code should ignore any serial data before device is ready

What version of the product are you using? On what operating system?

Microchip Uno32
Radiometrix HX1-144.390
Sparkfun Venus Venus638FLPx-L

The current setup is done on a proto-board but system has been confirmed to 
work if RX is connected to Uno32 after system becomes ready

Hopefully I've done a decent job of explaining this, please let me know if you 
believe this is due to an error on my side, or if you want additional info 
regarding my setup.

Thanks for such a wonderful project!

Original issue reported on code.google.com by ger...@gmail.com on 18 Nov 2012 at 12:31

GoogleCodeExporter commented 9 years ago
This is because the bootloader expects flashing commands but all it sees is 
NMEA stuff coming from the GPS. The Arduino bootloader solves this by timing 
out after a while, but the Uno32's doesn't, so it gets stuck in a never ending 
loop.

See this related post I wrote in the chipkit forums: 
http://www.chipkit.org/forum/viewtopic.php?f=16&t=936

Summing up, there are two options:

1. Insert the gps after the Uno32 has booted up, like you are doing now.

2. Or flash a new bootloader in your Uno32 that fixes this problem. You need a 
Pickit3 (or similar debugger) to do that. Grab the .hex from: 
https://github.com/chipKIT32/pic32-Ardu ... production.

Original comment by jmart...@gmail.com on 20 Nov 2012 at 11:56

GoogleCodeExporter commented 9 years ago
Sorry, the .hex link was broken in my previous comment: 
https://github.com/chipKIT32/pic32-Arduino-Bootloader/tree/master/dist/uno-128k/
production

Original comment by jmart...@gmail.com on 20 Nov 2012 at 11:59

GoogleCodeExporter commented 9 years ago
I actually had to flash 
https://github.com/jamarju/pic32-Arduino-Bootloader/tree/master/dist/uno-128k, 
but it appears to be working great. Thanks man!

Original comment by ger...@gmail.com on 27 Nov 2012 at 2:17