Topics

external flashing qcx atmega328p qcx? #qcx #firmware

Thomas Fritzsche
 

Hi Foks,
yesterday I bricked by QCX while trying to flash a new firmware on linux with an usbisp. While I though to have followed all steps correctly (e.g. LFUSE etc) the atmega328p is not responding at all: not booting and no reaction on isp
I have already placed an order for a new one in the QRPLabs Webshop, but shipping usually taked quite a while, I would like to know if I can fash some complete spare atmega329p I have or if I can somehow unbrick by current atmega328p by flashing it externally e.g. on a breadboard.
73, DJ1TF - Thomas

Alan G4ZFQ
 

yesterday I bricked by QCX while trying to flash a new firmware on linux with an usbisp. While I though to have followed all steps correctly (e.g. LFUSE etc)

Thomas

That is setting the fuse? No need to touch the fuses on an original QCX chip.

I would like to know if I can fash some complete spare atmega329p I have or if I can somehow unbrick by current atmega328p by flashing it externally e.g. on a breadboard.
A spare chip will not work with just the .hex file.
Yes you can remove the chip and connect the pins directly although this should not be necessary. How did you power the QCX? It is safest to use the QCX power and disconnect any power from a programmer.

73 Alan G4ZFQ

ralf.rosche@...
 

Hi,
if you have overwritten the fuse bits then in most cases it is not possible anymore to program the 328 through ISP.
You have to reprogramm the chip with e.g. a STK500 Board.

And yes you can make an update chip. I took the 328 and read out the EEPROM and saved it in a file.
The Fusebits cannot be filed , but i have written them down. 

It is possible to programm a new empty 328 with the firmware which Hans provides my EEPROM file and the correct fuse bits settings.

I can send you the EEPROM file or a working Atmel 328 for free if you are in Germany. Just send me an email. 
Then you are QRV again on Wednesday :-)
Ralf

Hans Summers
 

Hi Ralf, all
 
I can send you the EEPROM file or a working Atmel 328 for free if you are in Germany. Just send me an email. 

Everyone I sent the EEPROM file, I expressly explicitly asked them NOT to share it with anyone else, not to email it anywhere or publish it anywhere. I asked this in the same email I sent the file. Therefore please do NOT email the file to anyone. 

If a person needs the file please email me directly (off-list). 

Thanks & 73 Hans G0UPL

ralf.rosche@...
 

Yes Sir,
i have understood.

Is it allowed to send a complete programmed chip to an OM? A copy of my existing one, a piece of hardware then?

Ralf

Hans Summers
 

Hello Ralf
 
Is it allowed to send a complete programmed chip to an OM? A copy of my existing one, a piece of hardware then?

That's a tricky question... rather grey... that is an item which I sell in the shop. Other people advertising that they are providing it, is therefore directly another source of the same not-open-source item which I have in my shop... I know that you are very kindly trying to help, but... it can be a slippery slope from here. It might be better just to not do it? 

If I am not mistaken, the OM has AVR programming capabilities and only needs the files? If this is the case then I can provide them to him directly. 

73 Hans G0UPL
http://qrp-labs.com

Bob Macklin <macklinbob@...>
 

You can buy ATmega328s on either eBay or Amazon.
 
To program it you need the HEX file.
 
Put a new ATmega328 in the board and connect to the programmer.
 
Does the programmer recognize it?
 
If so set the fuses first. Then program it.
 
You can probably get the ATmega328s in a couple of days on Amazon.
 
Bob Macklin
K5MYJ
Seattle, Wa.
"Real Radios Glow In The Dark"

----- Original Message -----
Sent: Monday, November 18, 2019 1:19 AM
Subject: [QRPLabs] external flashing qcx atmega328p qcx? #qcx #firmware

Hi Foks,
yesterday I bricked by QCX while trying to flash a new firmware on linux with an usbisp. While I though to have followed all steps correctly (e.g. LFUSE etc) the atmega328p is not responding at all: not booting and no reaction on isp
I have already placed an order for a new one in the QRPLabs Webshop, but shipping usually taked quite a while, I would like to know if I can fash some complete spare atmega329p I have or if I can somehow unbrick by current atmega328p by flashing it externally e.g. on a breadboard.
73, DJ1TF - Thomas

Niels Jalling
 

Read Thomas first entry again. Thomas has already ordered a new chip from qrp-labs. So in the waiting time for the postman to deliver a fellow amateur is just very helpfull.
Just my two cents.
.

ralf.rosche@...
 

@BOB: No this does not work, you need minor Information and experience programming an empty 328P for the QCX as mentioned already 1000 times before.
@Hans: In respect to your explanations i will not give anything out of hand!

Ralf

Bob Macklin <macklinbob@...>
 

The QCX has a 6 pin header for programming.
 
You can put a blank chip in the QCX and program it with an ISP programmer like the AVRISP MkII.
 
I use the Atmel Studio to program chips with my AVRISP MkII.
 
All of the QRP Labs board I have looked at have the 6 pin programming header.
 
Bob Macklin
K5MYJ
Seattle, Wa.
"Real Radios Glow In The Dark"
 

----- Original Message -----
Sent: Monday, November 18, 2019 6:13 AM
Subject: Re: [QRPLabs] external flashing qcx atmega328p qcx? #qcx #firmware

@BOB: No this does not work, you need minor Information and experience programming an empty 328P for the QCX as mentioned already 1000 times before.
@Hans: In respect to your explanations i will not give anything out of hand!

Ralf

Thomas Fritzsche
 

Dear Hans, Hi Ham's
I work in a software company to finance my HAM Radio addiction ... absolutly with you. I even bought two more kits is the same order, as I love the QRPLabs products and just like to get my mistake fixed. 
Thanks to all the replys helping each other is the essence of the ham sprit.
I had downloaded the eeprom before as a safety precaution. However I used both an ArduinoISP and the USBISP (because I notice the ArduinoISP did not read FUSE) and yesterday I found two significant different content.

I have not overwritten the FUSE setting but I got some bad error (see output below of the fatal call) and I just use the "flash" and I did not changed eeprom or fuses. As you can see already the verification failed. The original 328p is now complete dead not resonding.
My current theory is that ISP programming / wire or even QCX soldering is/was wrong. I bough a STK500 compatible ISP yesterday and could at least succesfully burn a Arduino Bootloader with it (I'm learning...)

Now I consider buring on a breadboard or by putting the 328p into an Arduino Uni Socket as here the soldering should be no problem. However I'm not sure the external cristal (Arduino setup) is ok to flash FW and Eeprom (+ fuse setting).

Thanks again for your kind support / よろしくお願いします!
vy 73,
DJ1TF / JJ1QPB - Thomas


avrdude -p m328p  -c usbasp-clone  -P /dev/USBasp -U flash:w:T1.02.hex:i

avrdude: warning: cannot set sck period. please check for usbasp

firmware update.

avrdude: AVR device initialized and ready to accept instructions

 

Reading | ################################################## | 100%

0.00s

 

avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: NOTE: "flash" memory has been specified, an erase cycle will

be performed

         To disable this feature, specify the -D option.

avrdude: erasing chip

avrdude: warning: cannot set sck period. please check for usbasp

firmware update.

avrdude: reading input file "T1.02.hex"

avrdude: writing flash (32356 bytes):

 

Writing | ################################################## | 100%

18.55s

 

avrdude: 32356 bytes of flash written

avrdude: verifying flash memory against T1.02.hex:

avrdude: load data flash data from input file T1.02.hex:

avrdude: input file T1.02.hex contains 32356 bytes

avrdude: reading on-chip flash data:

 

Reading | ################################################## | 100%

16.44s

 

avrdude: verifying ...

avrdude: verification error, first mismatch at byte 0x0000

         0x00 != 0x0c

avrdude: verification error; content mismatch

 

avrdude: safemode: lfuse changed! Was f7, and is now 0

Would you like this fuse to be changed back? [y/n] n

avrdude: safemode: hfuse changed! Was d1, and is now 0

Would you like this fuse to be changed back? [y/n] n

avrdude: safemode: efuse changed! Was fc, and is now 0

Would you like this fuse to be changed back? [y/n] n

avrdude: safemode: Fuses OK (E:FC, H:D1, L:F7)

 

avrdude done.  Thank you.

Bob Macklin
 

I bought one of these for programming raw chips:
 
But this thimg has a problem!
 
Even though it looks like it has a USB port, IT DOES NOT. The USB connector is just for power. A USB to TTL adapter can be conected to the oposite ens.
 
The ATmega328 is in a 29 pin ZIF socket. There is a 6 pin ISP header for connection to a ISP progeammer. I have an AVRISP MkII.
 
This is a good adapter for installing bootloaders in fresh/RAW chips.
 
I REALLY HATE THIS CHINESEE CRAP WITH NO DOCUMENTATION!!!!!
 
But for someone that is
 
---
New Outlook Express and Windows Live Mail replacement - get it here:
 
doing a lot of work with the ATmel micros this is a useful tool.
 
Bob Macklin
K5MYJ
Seattle, Wa.
"Real Radios Glow in the DARK"
 

----- Original Message -----
From: Thomas Fritzsche <tf@...>
Reply-To: <QRPLabs@groups.io>
Sent: 11/19/2019 1:19:13 AM
Subject: Re: [QRPLabs] external flashing qcx atmega328p qcx? #qcx #firmware

Dear Hans, Hi Ham's
I work in a software company to finance my HAM Radio addiction ... absolutly with you. I even bought two more kits is the same order, as I love the QRPLabs products and just like to get my mistake fixed. 
Thanks to all the replys helping each other is the essence of the ham sprit.
I had downloaded the eeprom before as a safety precaution. However I used both an ArduinoISP and the USBISP (because I notice the ArduinoISP did not read FUSE) and yesterday I found two significant different content.

I have not overwritten the FUSE setting but I got some bad error (see output below of the fatal call) and I just use the "flash" and I did not changed eeprom or fuses. As you can see already the verification failed. The original 328p is now complete dead not resonding.
My current theory is that ISP programming / wire or even QCX soldering is/was wrong. I bough a STK500 compatible ISP yesterday and could at least succesfully burn a Arduino Bootloader with it (I'm learning...)

Now I consider buring on a breadboard or by putting the 328p into an Arduino Uni Socket as here the soldering should be no problem. However I'm not sure the external cristal (Arduino setup) is ok to flash FW and Eeprom (+ fuse setting).

Thanks again for your kind support / よろしくお願いします!
vy 73,
DJ1TF / JJ1QPB - Thomas


avrdude -p m328p  -c usbasp-clone  -P /dev/USBasp -U flash:w:T1.02.hex:i

avrdude: warning: cannot set sck period. please check for usbasp

firmware update.

avrdude: AVR device initialized and ready to accept instructions

 

Reading | ################################################## | 100%

0.00s

 

avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: NOTE: "flash" memory has been specified, an erase cycle will

be performed

         To disable this feature, specify the -D option.

avrdude: erasing chip

avrdude: warning: cannot set sck period. please check for usbasp

firmware update.

avrdude: reading input file "T1.02.hex"

avrdude: writing flash (32356 bytes):

 

Writing | ################################################## | 100%

18.55s

 

avrdude: 32356 bytes of flash written

avrdude: verifying flash memory against T1.02.hex:

avrdude: load data flash data from input file T1.02.hex:

avrdude: input file T1.02.hex contains 32356 bytes

avrdude: reading on-chip flash data:

 

Reading | ################################################## | 100%

16.44s

 

avrdude: verifying ...

avrdude: verification error, first mismatch at byte 0x0000

         0x00 != 0x0c

avrdude: verification error; content mismatch

 

avrdude: safemode: lfuse changed! Was f7, and is now 0

Would you like this fuse to be changed back? [y/n] n

avrdude: safemode: hfuse changed! Was d1, and is now 0

Would you like this fuse to be changed back? [y/n] n

avrdude: safemode: efuse changed! Was fc, and is now 0

Would you like this fuse to be changed back? [y/n] n

avrdude: safemode: Fuses OK (E:FC, H:D1, L:F7)

 

avrdude done.  Thank you.

ajparent1/KB1GMX
 

Not one thing wrong with that, have one.  You plug an ICSP board
into the connector provided and it seems to work.

No different that doing same with a Uno and ICSP or Nano with ICSP.

However its NOT the same as programming a Arduino with boot.

Yes docs are sorta a big thing but its in the "Arduino Ecosphere"
so it is there if by indirection.  Its annoying but that is geekery.

Allison
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.

Bob Macklin
 

The problem is the QRP Labs products are not designed to be programmed with Arduino bootloader.
 
NO SERIAL PORT AVAILABLE.
 
So the only option is a ISP programmer.
 
Bob Macklin
K5MYJ
Seattle, Wa.
"Real Radios Glow In The Dark"

----- Original Message -----
Sent: Tuesday, November 19, 2019 11:01 AM
Subject: Re: [QRPLabs] external flashing qcx atmega328p qcx? #qcx #firmware

Not one thing wrong with that, have one.  You plug an ICSP board
into the connector provided and it seems to work.

No different that doing same with a Uno and ICSP or Nano with ICSP.

However its NOT the same as programming a Arduino with boot.

Yes docs are sorta a big thing but its in the "Arduino Ecosphere"
so it is there if by indirection.  Its annoying but that is geekery.

Allison
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.

SkipF, NT1G
 

Upgrade the CPU to a cortex M?
They have built in usb support.

James Daldry W4JED
 

Hi, Skip

Can you do a "safe" firmware upgrade by unplugging the old Cortex M and plugging in a new one? Atmel has USB equipped chips, and Microchip has 8 bit and 16 bit ones with legs.

The current micro in these little radios has almost miraculous firmware, doing all the stuff it does without getting in the way of the keyer. Add a USB port and you don't know what will get upset when it thinks it smelled some USB.

Adding a USB port won't prevent someone from entering the wrong information into the programming software and bricking the chip. It just changes the programming interface. I'd rather take my little screwdriver and carefully pry out a "leggy" chip than have to replace a "postage stamp" in the middle of a crowded board. Been there, done that, didn't enjoy it.

Hans has designed a great little toy here, simple and yet feature-packed. It is intended to be played with, hacked, made into whatever you want to make out of it. At a pocket-money impulse-purchase price. Adding twenty bucks to the BOM and subtracting "tweakability" wouldn't be an improvement.

Jim W4JED


On 11/19/19 3:38 PM, SkipF, NT1G wrote:
Upgrade the CPU to a cortex M?
They have built in usb support.

jmh6@...
 

Hi Jim :),

One of the QCX versions is small enough to allow room for the Arduino IDE bootloader.

So I modified the bootloader to run with a 20MHz CPU clock.

Then edited the qcx.hex file and added my 'new' bootloader to it. Everying seemed to program OK.

Not sure what I missed? I still have not been able to program this QCX directly from the usual Arduino IDE serial type connection [which uses some of the LCD pins].

Maybe one day the Arduino IDE will be smart enough to program using the ISP connection directly?

Another route would be to program an Arduino Uno to look like a 'normal' Uno to the IDE but actually program the ISP connected QCX.

I expect someone will get both working eventually as it would save us all a lot of time and 'fun'.

Lots of fun :).

On Tue, 19 Nov 2019, James Daldry W4JED wrote:

Hi, Skip
Can you do a "safe" firmware upgrade by unplugging the old Cortex M and plugging in a new one? Atmel has USB equipped chips, and Microchip has 8 bit and 16 bit ones with
legs.
The current micro in these little radios has almost miraculous firmware, doing all the stuff it does without getting in the way of the keyer. Add a USB port and you don't
know what will get upset when it thinks it smelled some USB.
Adding a USB port won't prevent someone from entering the wrong information into the programming software and bricking the chip. It just changes the programming interface.
I'd rather take my little screwdriver and carefully pry out a "leggy" chip than have to replace a "postage stamp" in the middle of a crowded board. Been there, done that,
didn't enjoy it.
Hans has designed a great little toy here, simple and yet feature-packed. It is intended to be played with, hacked, made into whatever you want to make out of it. At a
pocket-money impulse-purchase price. Adding twenty bucks to the BOM and subtracting "tweakability" wouldn't be an improvement.
Jim W4JED
On 11/19/19 3:38 PM, SkipF, NT1G wrote:
Upgrade the CPU to a cortex M? They have built in usb support.

Hans Summers
 

Hi Bob, all
 
The problem is the QRP Labs products are not designed to be programmed with Arduino bootloader.

I'm not sure I'd call it a "problem". Why would I include an Arduino bootloader... I program the chips in C, not using the Arduino infrastructure which is rather bloated for my purposes; had I used Arduino I would not have been able to achieve so much functionality in such a modest device.  
 
NO SERIAL PORT AVAILABLE.
 
So the only option is a ISP programmer.

Even if a serial port were available, for most people they would still require a USB to Serial Port adapter. Which is a little board very similar in size, functionality and cost to an AVR programmer... so not much different. Direct use of USB requires a more capable microcontroller; the QSX will have direct USB interfaces and requires no programming hardware or software to do updates see https://www.youtube.com/watch?v=xzOv9szPnhI

To summarize regarding QCX (and other QRP Labs products) firmware:
  • QRP Labs code is nothing to do with Arduino. They just both happen to use the same ATmega328 processor. 
  • There is no bootloader; all the limited program space is required for the large amount of functionality packed into 32K Flash
  • The chip can be programmed either in place on the board, using the 2x3-pin ISP header; or, if you pull the chip out and put it in a programmer with a socket such as a ZIF (Zero Insertion Force) socket. 
  • If programmed in the QCX, the QCX should be powered.  
  • An AVR programmer can be used, or an Arduino can be used with the Arduino ISP sketch which just makes the Arduino behave equivalently to an AVR programmer (there is no difference). Despite the fact that the Arduino can be programmed to behave as an ISP, the QCX still has nothing to do with Arduino. 
  • I have committed to always providing free firmware updates, for people who wish to upgrade their own chips. Programmed chips are also available in the QRP Labs shop http://shop.qrp-labs.com/firmware 
  • QRP Labs code is not open source (long debate)
73 Hans G0UPL


Thomas Fritzsche
 

Hi Hans, Hi Ham’s,
as I started the topic with my  briged QCX, I like to close it with a photo of the recovered transceiver.

However I must discourage others of doing it. I had experience for some years in programing Atmel Chips, but even tough I waited communicated with Hans before finally starting the unbrick. 
@Hans: Thanks a lot!

The QCX is different from an Arduino and you need to have respective experience, otherwise better buy the chip from the QRPLabs shop as I did  (and will now keep as a spare part).

My post-mortem analysis of the linux console and the commands and output I got:  very likely caused by a  clone ISP. Now with a genuine product I had no problem at all.
Now looking forward to receive the additional QRPLabs kits (RockProg / Receiver) I ordered with the FW-Chip for the waiting time till the QSX will be ready.

Thanks all for your comments and help!
73, DJ1TF / JJ1QPB - Thomas




Hans Summers
 

Hi Thomas

Glad to see you have it all sorted out in the end. 

But now you know the process so well... I suggest 1.02b not 1.02! There were a couple of issues in 1.02 so 1.02b is the actual recommended one.

73 Hans G0UPL

On Thu, Nov 21, 2019, 01:28 Thomas Fritzsche <tf@...> wrote:
Hi Hans, Hi Ham’s,
as I started the topic with my  briged QCX, I like to close it with a photo of the recovered transceiver.

However I must discourage others of doing it. I had experience for some years in programing Atmel Chips, but even tough I waited communicated with Hans before finally starting the unbrick. 
@Hans: Thanks a lot!

The QCX is different from an Arduino and you need to have respective experience, otherwise better buy the chip from the QRPLabs shop as I did  (and will now keep as a spare part).

My post-mortem analysis of the linux console and the commands and output I got:  very likely caused by a  clone ISP. Now with a genuine product I had no problem at all.
Now looking forward to receive the additional QRPLabs kits (RockProg / Receiver) I ordered with the FW-Chip for the waiting time till the QSX will be ready.

Thanks all for your comments and help!
73, DJ1TF / JJ1QPB - Thomas