Uploading bootloader into CRIUS NAV module

Good day there,
I bought one crius nav module for my quadcopter, but it turned out it's without bootloader. I cannot upload firmware via FTDI. It is based on atmega328P.


I used Arduino Mega as ISP programator.
The connections I made are displayed in attached picture.

Whatever I tried, nothing worked: Currently I get this error:

avrdude: Yikes!  Invalid device signature.


         Double check connections and try again, or use -F to override


         this check.

Could anybody help me to figure out what wrong I'm doing?

What's the resonator speed? Could just be a speed mismatch so the chip is talking but not putting out intelligible data.

Sorry for pointing out the obvious, but did you load Arduino as ISP to the Mega?
You only posted part of the error message, it might be seeing the 2560 instead of the 328p.

somedude:
Sorry for pointing out the obvious, but did you load Arduino as ISP to the Mega?
You only posted part of the error message, it might be seeing the 2560 instead of the 328p.

Yes, firstly I uploaded Arduino ISP firmware on Mega, then connected all that stuff and tried to burn bottloader with Programmer -> Arduino as ISP | Board -> Pro Mini atmega 328 16Mhz, 5v
I was able to burn bootloader to another Mega.

CrossRoads:
What's the resonator speed? Could just be a speed mismatch so the chip is talking but not putting out intelligible data.

tbh, I don't know the speed of that crystal, it's A.Q (or A.0 or A.O) on the top of it. I have exactly the same.
I don't have oscillator yet.

I can have an oscilloscope. Could anybody say how to measure frequency of that crystal?

I just successfully did this on the same nav unit, but I had to solder in the ICSP header and upload the bootloader from an Arduino. I had the target set to Arduino Mini with ATMega 328.

There is something weird with the timing on it, though. My first program was something like...

void loop()
{
Turn the LED on.
delay(250);
Turn the LED off.
delay(250);
}

...and it seems like it's running about 8 times slower than the Arduino I programmed it with. Shouldn't matter, since I'm just going to use it as a buffer between my CPU and GPS, but it fits with what that previous poster was saying.

Never did get the FTDI to work, as I can upload the program through ICSP as well.

if its 8x slow then fuse bits are not programmed yet. also note that clock frequency dont matter with isp.

john1993:
if its 8x slow then fuse bits are not programmed yet. also note that clock frequency dont matter with isp.

But that nav module has atmega328p as well as external oscillator. Isn't it overriding internal oscillator?

external resonator not oscillator. anyway simply attaching a crystal does not automatically cause it to run at that speed. fuses must also be set correctly.

ps. best way to tell speed is make sure "burn bootloader" worked to set fuses then flash blink with "upload using programmer" and see if blink rate is 1 sec.

Also check this: do you use the ArduinoISP sketch from the IDE 1.6.6 or higher?
In that case, pin 10 should be used as target reset pin (not pin 53), see doc inside the sketch.

john1993:
external resonator not oscillator. anyway simply attaching a crystal does not automatically cause it to run at that speed. fuses must also be set correctly.

ps. best way to tell speed is make sure "burn bootloader" worked to set fuses then flash blink with "upload using programmer" and see if blink rate is 1 sec.

PeterVH:
Also check this: do you use the ArduinoISP sketch from the IDE 1.6.6 or higher?
In that case, pin 10 should be used as target reset pin (not pin 53), see doc inside the sketch.

I used ArduinoISP from 1.0.5 from debian repositories.
Recently I used special AVR programator


But i couldn't do anything even using programator.
I suppose programator should work even if those fuse bits are not changed.
Therefore most likely the chip is dead.

Maybe.

Anyway, in general the arduino ide that comes with your debian distro is rather outdated. It is really a better idea to download the latest ide from the arduino.cc site. The ArduinoISP sketch has been recently updated. (mind pin 10 though). So if I were you I would give it one more try, it might just work.
(If you do, enable verbose output and post the result here)

PeterVH:
Maybe.

Anyway, in general the arduino ide that comes with your debian distro is rather outdated. It is really a better idea to download the latest ide from the arduino.cc site. The ArduinoISP sketch has been recently updated. (mind pin 10 though). So if I were you I would give it one more try, it might just work.
(If you do, enable verbose output and post the result here)

Thanks for your reply.
I even connected it to LPT->ISP adapter. Application ISP Programmer (windows) couldn't recognize signature. When I forced it to believe that atmega28p is connected, I read the flash memory into hex file and it was full of 'F'. Even though it worked fine with atmega2560. I suppose the chip is really dead, I'm going to order new one.

PeterVH:
Also check this: do you use the ArduinoISP sketch from the IDE 1.6.6 or higher?
In that case, pin 10 should be used as target reset pin (not pin 53), see doc inside the sketch.

I'm using IDE 1.0.5, with pin 10 as the reset pin. (I installed an older version because the sketch for the nav module doesn't compile on the latest one.)

john1993:
if its 8x slow then fuse bits are not programmed yet. also note that clock frequency dont matter with isp.

OK, so I bricked it...

According to [some website I read] bit 1 of the low fuse byte selects whether to use the internal or external clock source. The initial value on my module was 0x62, meaning CKSEL1 = 1, meaning to use the internal clock source.

I changed that to 0x60 (per the datasheet), but now avrdude won't talk to it. If you look at the OP's picture, there's clearly an external oscillator connected to pins 7 and 8, so...

Any thoughts on how to recover from this, or is it Amazon Prime time?

So I have the same board, no bootloader, can't flash software to it. I purchased a tinyusb programmer and an atmel socket connector and it works to burn software to the board via file->UPload using programmer

Problem is no matter what the board doesn't actually work. Just get a very slow flashing LED (~15sec on ~15 off) and causes all kinds of sensor problems when plugged into my multiwii. So tried flashing bootloader, what do you know it killed the chip, no more connection period. So using Arduino Uno and modified ISP sketch to put 1MHZ clock signal out pin 3, connected that to xtal1 on 328p and can see the board again. However I don't know what to set fuses to. I tried cksel1 and the first board no longer talks to computer. Trying to recover this because I'd rather use this small board as is then use my pro mini (which works flawlessly as i2c-GPS device)

I've got CRIUS NAV I2C-GPS module, and it seems come without bootloader. I cannot connect through ftdi232-usb/or upload my firmware. I also cannot upload new bootloader/firmware using usbasp. The error appears:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

Error while burning bootloader.

Please help me to figure out how to upload standard bootloader.

Here is the nav i2c-gps v1.1 module:

uh oh... hes at it again:

http://forum.arduino.cc/index.php?topic=378101.0

cluttering up forums by double posting is rude and discouraged by moderators. wasnt hijacking some other dudes flash chip thread enough? trolling or maybe lonely lets just say you are not developing a good rep around here.

john1993:
uh oh... hes at it again:

Uploading bootloader into CRIUS NAV module - Microcontrollers - Arduino Forum

cluttering up forums by double posting is rude and discouraged by moderators. wasnt hijacking some other dudes flash chip thread enough? trolling or maybe lonely lets just say you are not developing a good rep around here.

oh, you are right, sorry everyone. I just returned back the board and received another one. I forgot I have created the topic before. There is no convenient way to see my posts on this forum.
Please delete this topic. I will continue that one.

I returned that board and got another new one. And I still cannot connect through ftdi232-usb/or upload my firmware.
I bought USBasp specially for uploading bootloader. But still no luck. The error appears:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

Error while burning bootloader.

Please help me to figure out why it does not work?
What could be the reason of it?