voltizar / arducam-osd

Automatically exported from code.google.com/p/arducam-osd
0 stars 0 forks source link

Failed to talk to bootloader. #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to update firmware with osd-config.
2. Any other operation that has to communicate with minimosd.
3.

What is the expected output? What do you see instead?
msg : Failed to talk to bootloader

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

Please provide any additional information below.

Hi,

I have a problem similar to issue #28. I received a minimosd without a 
bootloader. So, using a USPasp programmer with avrdude I flashed successfully 
the ATmegaBOOT_168_atmega328.hex bootloader.

Now I am trying to upgrade the firmware with osd-config. I am using an FTDI 
cable but I get the failed to talk to bootloader. When connected with the FTDI 
cable, the minimosd has its red led on, and the yellow led blinks slowly around 
once every second.

I tried to press the reset button after initiating the update without success. 
I will try to put a scope on the lines to have a better idea of what is going 
on.

Any idea what could be wrong ? Any suggestion would be appreciated.

Thanks.

JL

Original issue reported on code.google.com by jocelyn....@gmail.com on 9 Oct 2012 at 9:17

GoogleCodeExporter commented 8 years ago
I just plugged an oscilloscope to verify if something was going on between the 
FTDI cable and minimosd, the results are :

- green line goes low when I start the firmware update;
- tx starts low and shows some signals (high) going through;
- rx starts high and shows some signals (low) going through;

I did not try to record the signals nor did I tried to figure out their 
meaning, I was just trying to find out if something was going on between 
osd_config and minimosd.

From what I can tell, the FTDI cable must be good since signals are flowing in 
and out. The minimosd electronic must be good also since in appears to be 
responding in some ways to what it receives from the FTDI cable. As far as I 
can tell, it looks like a software issue but I am really not sure about 
anything here. I will continue to investigate to the best of my knowledge (as 
little as it is at this point :-()

Original comment by jocelyn....@gmail.com on 11 Oct 2012 at 12:00

GoogleCodeExporter commented 8 years ago
I'm not sure what's happening there on your board. Maybe something wrong on the 
fuses?
Did you run the whole set of commands below by using your programmer?
avrdude -c usbasp -p m328p -U lfuse:w:0xFF:m  
avrdude -c usbasp -p m328p -U hfuse:w:0xDA:m
avrdude -c usbasp -p m328p -U efuse:w:0x05:m
avrdude -c usbasp -p m328p -U flash:w:ATmegaBOOT_168_atmega328.hex

Original comment by sbeni...@gmail.com on 12 Oct 2012 at 11:04

GoogleCodeExporter commented 8 years ago
Hi,

Yes I ran exactly the commands you mention and the all ran successfully.

JL

Original comment by jocelyn....@gmail.com on 12 Oct 2012 at 11:06

GoogleCodeExporter commented 8 years ago
Hi again,

Since I was able to flash the bootloader with my USBasp, I guessed that I might 
as well try to compile the code and upload it to minimosd with Arduino 1.0.1 
through the USBasp programmer. It is my first contact with Arduino, so please 
excuse my ignorance.

When I try to compile Arducam and its friends I get the following messages :

In file included from ArduCam_Max7456.cpp:4:
ArduCam_Max7456.h:77: error: expected class-name before '{' token
ArduCam_Max7456.h:83: error: 'uint8_t' has not been declared
ArduCam_Max7456.h:83: error: 'uint8_t' has not been declared
ArduCam_Max7456.h:86: error: 'uint8_t' has not been declared
ArduCam_Max7456.h:89: error: 'uint8_t' has not been declared
ArduCam_Max7456.h:89: error: 'uint8_t' has not been declared
ArduCam_Max7456.h:96: error: 'size_t' does not name a type
ArduCam_Max7456.h:97: error: 'uint8_t' has not been declared
ArduCam_Max7456.h:98: error: 'BetterStream' has not been declared
ArduCam_Max7456.h:100: error: 'uint8_t' does not name a type
ArduCam_Max7456.cpp: In member function 'void OSD::init()':
ArduCam_Max7456.cpp:37: error: 'video_mode' was not declared in this scope
ArduCam_Max7456.cpp: In member function 'void OSD::setMode(int)':
ArduCam_Max7456.cpp:90: error: 'video_mode' was not declared in this scope
ArduCam_Max7456.cpp:91: error: 'video_center' was not declared in this scope
ArduCam_Max7456.cpp: In member function 'int OSD::getMode()':
ArduCam_Max7456.cpp:104: error: 'video_mode' was not declared in this scope
ArduCam_Max7456.cpp: In member function 'int OSD::getCenter()':
ArduCam_Max7456.cpp:119: error: 'video_center' was not declared in this scope
ArduCam_Max7456.cpp: At global scope:
ArduCam_Max7456.cpp:143: error: prototype for 'void OSD::setPanel(uint8_t, 
uint8_t)' does not match any in class 'OSD'
ArduCam_Max7456.h:83: error: candidate is: void OSD::setPanel(int, int)
ArduCam_Max7456.cpp: In member function 'void OSD::openPanel()':
ArduCam_Max7456.cpp:158: error: 'row' was not declared in this scope
ArduCam_Max7456.cpp:158: error: 'col' was not declared in this scope
ArduCam_Max7456.cpp: In member function 'void OSD::closePanel()':
ArduCam_Max7456.cpp:187: error: 'row' was not declared in this scope
ArduCam_Max7456.cpp: At global scope:
ArduCam_Max7456.cpp:193: error: prototype for 'void OSD::openSingle(uint8_t, 
uint8_t)' does not match any in class 'OSD'
ArduCam_Max7456.h:89: error: candidate is: void OSD::openSingle(int, int)
ArduCam_Max7456.cpp:217: error: no 'size_t OSD::write(uint8_t)' member function 
declared in class 'OSD'
ArduCam_Max7456.cpp:232: error: prototype for 'void OSD::control(uint8_t)' does 
not match any in class 'OSD'
ArduCam_Max7456.h:86: error: candidate is: void OSD::control(int)
ArduCam_Max7456.cpp:249: error: prototype for 'void OSD::write_NVM(int, 
uint8_t*)' does not match any in class 'OSD'
ArduCam_Max7456.h:97: error: candidate is: void OSD::write_NVM(int, int*)

I did not dig deep into it yet, but my feeling is that I must be missing 
something obvious to somebody whose more regularily into that, so I take a 
chance to ask if somebody quickly sees the cause of those syntax errors. 
Otherwise, I will get to know Arduino programming in more details one way or 
another.

Thanks,

JL

Original comment by jocelyn....@gmail.com on 18 Oct 2012 at 12:24

GoogleCodeExporter commented 8 years ago
Did you get the code by using an SVN client?
Did you copy the libraries from ArduCAM SVN folder to your Arduino's install 
libraries folder?

Anyway, if you upload the code by the USBASP programmer you'll lose the 
bootloader. After losing the bootloader the OSD Config Tool won't talk to your 
board anymore.

Original comment by sbeni...@gmail.com on 18 Oct 2012 at 5:30

GoogleCodeExporter commented 8 years ago
Ok, thanks. I was missing the libraries. Now I will use an SVN client to handle 
all the parts.

Original comment by jocelyn....@gmail.com on 20 Oct 2012 at 1:17

GoogleCodeExporter commented 8 years ago
Hi again,

I was able to flash the firmware with avrdude and my USBasp on minimosd and it 
worked ok, at least I had some text over the video, that was an error meessage 
about the EEPROM not being up to date or something like this.

Anyway, this tells me that the board is good for sure. So, to get back to my 
initial problem, in issue #28 I believe that the final solution was to press 
the reset button on the board after starting the read/write operation. I have 
tried that several times with different timings but without success.

I am pretty sure that I have the latest drivers for the ftdi cable (april 
2012), for both the com port and the USB serial converter devices in Windows. 
The com port is set to 57600 and no other special setup. I have seen that there 
are a lot of advanced configuration possible for the ftdi cable 
(AN_107_AdvancedDriverOptions_AN_000073.pdf) but I didn't touch anything, I 
tought it was supposed to work out of the box.

Finally, I at the point where I doubt that the ftdi cable is working properly. 
I ordered an other one but I not sure it is really the cause of the problem.

Any ideas are welcome.

Thanks,

JL

Original comment by jocelyn....@gmail.com on 21 Oct 2012 at 10:27

GoogleCodeExporter commented 8 years ago
Jocelyn,

Did you see the advise at the end of my previous comment?

I'm guessing you did it just as a test, because uploading the firmware through 
USBASP lead you to the first problem i.e. now your board has no bootloader. The 
USBASP did overwrite it.

Like I said before: What you need is: set the fuses correctly and upload the 
bootloader. So, you would use an FTDI for updating firmware and charsets and 
configuring your OSD like everyone else.

Important question: Why are you're configuring your FTDI's com port at 57600?
Please left it as default: 9600-8-N-1.

Just to reinforce, here goes the needed AVRDude's command sequence:

avrdude -c usbasp -p m328p -U lfuse:w:0xFF:m  
avrdude -c usbasp -p m328p -U hfuse:w:0xDA:m
avrdude -c usbasp -p m328p -U efuse:w:0x05:m
avrdude -c usbasp -p m328p -U flash:w:ATmegaBOOT_168_atmega328.hex

Original comment by sbeni...@gmail.com on 21 Oct 2012 at 11:47

GoogleCodeExporter commented 8 years ago
Hi,

You guessed it right, it was just as a test to prove that the board was working 
properly.

I followed your previous instructions as well, and I appreciate your involvment 
in helping.

For the baud rate, I don't remember for sure, but I tought I saw something 
somewhere that said it had to be 57600. I will try later today with 9600.

Thanks again.

JL

Original comment by jocelyn....@gmail.com on 21 Oct 2012 at 12:14

GoogleCodeExporter commented 8 years ago
No luck at 9600 either. I wonder how everyone else gets that working with all 
the defaults settings since I can hardly figure out what is wrong with it.

To summarize :

- Board is not defective, I know for sure by "hard flashing" the code with 
USBasp and trying it on the quad with the video setup;
- Bootloader flashed correctly on the board, according to your instructions 
with no error messages during the process;
- Latest FTDI driver (VCP) 2.8.24.0 2012/04/10;
- Latest version of OSD_Config 2.1.2.0;
- Standard FTDI cable from DIYDrones;
- Trying to flash MinimOSD_20.hex;
- COM port set at 9600-8-N-1;
- Tried on different USB ports;
- Tried on different computers;
- Tried pressing the reset button after starting the read/write to the board;

I must be really stupid, but I do not see what is wrong with what I do. The 
only thing left might be the cable itself.

Thanks anyway, I will try to see what else might be interfering with the 
process.

JL

Original comment by jocelyn....@gmail.com on 21 Oct 2012 at 9:34

GoogleCodeExporter commented 8 years ago
Hi,

Just more info about my search for a solution :

I trying on a third computer running XP (my two other ones were Win7) with a 
fresh install of the drivers, and I got the same results.

It is not really related, but I just received a 3DR telemetry kit and I got it 
to work on my usual Win7 machine. The point is that it uses the exact same FTDI 
drivers as the cable required to configure minimosd. So, I have to conclude 
that my Windows installation and drivers are good, which brings me back to a 
faulty cable as far as I can tell.

I will post more info when I receive the new FTDI cable that I ordered.

Thanks,

JL

Original comment by jocelyn....@gmail.com on 28 Oct 2012 at 11:20

GoogleCodeExporter commented 8 years ago
One more update that is worth it :

Since I have to wait for a new cable, I decided to opened the one I am trying 
to use rigth now to see if there is something wrong with it. And as a matter of 
fact there is !

You see on the picture a solder blob shorting two pins of the FTDI chip. That 
would do it. However, this is well beyond my manual and visual abilities to 
repair, so I will just wait for the replacement cable.

The bottom line : don't thrust any cable.

Thanks again for your help, you can surely close this issue.

JL

Original comment by jocelyn....@gmail.com on 28 Oct 2012 at 12:13

Attachments:

GoogleCodeExporter commented 8 years ago
Hi again,

I got the new FTDI cable and it worked on the first try.

Great software by the way !

Thanks.

JL

Original comment by jocelyn....@gmail.com on 31 Oct 2012 at 8:33

GoogleCodeExporter commented 8 years ago
Great news! Congratulations for sticking with it until get it working!

Did you fix the old cable too?
It's easy to fix it with an iron and a bit of flux.
Thanks for sharing the result with details. I will close this thread then.

Original comment by sbeni...@gmail.com on 31 Oct 2012 at 11:35

GoogleCodeExporter commented 8 years ago
Hi Beni, are you still monitoring this thread?

If so could you help me with my MinimOSD?

Thanks, Philip

Original comment by zext...@gmail.com on 29 Mar 2014 at 12:24