Can't load Bootloader into TruSDX

Post Reply
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Can't load Bootloader into TruSDX

Post by VA3HF »

Hello, I read most of the similar threads of failed load of Bootloader and I conclude my 328P chip is dead. Just want to confirm what I see.

First attempt, I got the verification error on the first byte so I tried again and got the yikes! Invalid device signature. Tried again - same thing.

Then did the -F (I now know we are not supposed to do that so don't scold me now) and got the verification error, first mismatch at the first byte.

I went through the the procedure from the start 3 more times with the same faults. I then took another arduino uno board in place of the TruSDX and tried to load it and it loaded without a problem so I now know my test cable and adrino ISP unit is working. The arduino uno board showed the right signature while the TruSDX never did show it (always ffffff)

Does the display ever show any characters before the bootloader is loaded? Mine has never displayed anything. Current input is around 60mA with the RF board attached.

I was part of the US group buy #2. I just got busy to finish it sooner.

I just ordered a Hot air station to swap out the 328P if I have to. I can pull a chip from another uno.

I also just ordered a Classic kit from Aliexpress up tech store to start over without soldering SMD chips in myself on the main board in case that was my problem plus I wanted the classic bands and didn't want to go through capacitor changes/purchases and toroids.

Thanks,
Harold VA3HF
Last edited by VA3HF on 12 Dec 2022, 15:54, edited 1 time in total.
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

I have another Main board I got from another group buy but missing u6, u1, push buttons, rotary switch and display and I installed the ISP header to program the board. I got the same results as I did the first time with the USA Group 2 completed kit. I am really confused on what's happening and this time I didn't use the -f command, I just programmed it once and then did a detect of the chip which came back as ffffff. Before programming, it was detected correctly as 1e950f = ATmega328P

Here is the text from the AVRDUDESS program:

>>>: avrdude
truSDX-initial_Bootloader.hex: 32,366 / 32,768 Bytes (98.77%)
Checking for updates...
You have the latest version :)
>>>: avrdude -c arduino -P COM3 -b 19200 -p m8
Detected 1e950f = ATmega328P
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>>>: avrdude -c arduino -p m328p -P COM3 -b 19200 -e -U flash:w:"C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex":a -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0xFD:m

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e950f (probably m328p)
avrdude.exe: erasing chip
avrdude.exe: reading input file "C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex"
avrdude.exe: input file C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex auto detected as Intel Hex
avrdude.exe: writing flash (32768 bytes):

Writing | ################################################## | 100% 35.02s

avrdude.exe: 32768 bytes of flash written
avrdude.exe: verifying flash memory against C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex:
avrdude.exe: input file C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex auto detected as Intel Hex

Reading | ################################################## | 100% 19.16s

avrdude.exe: verification error, first mismatch at byte 0x0000
0x00 != 0x0c
avrdude.exe: verification error; content mismatch

avrdude.exe done. Thank you.



Then tried "Detect" button twice:


>>>: avrdude -c arduino -P COM3 -b 19200 -p m8
ERROR: Unknown signature ffffff
>>>: avrdude -c arduino -P COM3 -b 19200 -p m8
ERROR: Unknown signature ffffff
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Hello OM,

i had problems with my arduino unos to program as isp another Atmega328.
It was a timing error. I had to use an USBASP switched to slow clock.
Also bad chinese copies of Atmega328 are sold by nice chinese sellers,
also mounted on Arduino nanos....
So i would test, before you change it again, with an USBASP as programmer in slow clock mode.
There are two jumpers on USBASP the right one is for slow clock (when you look at the USBASP
with the USB connector at left side).

73 de Chris
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

The Arduino Uno I have been using is the one with the ch340G on it with the soldered square MEGA328P on it. Could that be the problem?

Here is the manual for it.

https://www.google.com/url?sa=t&rct=j&q ... 7uXO8_MHhn

If that version can't be used successfully, then it should be noted here.

I'd like to know what the difference is about it since the pins used are the same in both UNOs
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

Is this the USBASB that you are referring too?

https://www.amazon.ca/gp/product/B07D81 ... UTF8&psc=1

I just ordered it so I hope that will work.
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Hello OM,

as i said there are many copies of the Atmega328 on market, this could also be the cause.
And i have to state the "Arduino Uno R3" you have is truly not an original Arduino so it is only compatible!
In principle programming in ISP mode with Uno should work with all "Arduino Uno compatibles", but it could also differ if you have a "square" Atmega328 on it or an original DIP Atmega328....
Also board layout plays a role.
As i said, i had errors with my Arduino Uno R3 (also only compatible one) so i took my already known good programner for Atmega ISP an USBASP (7 to 9 Euros today).
Remember Electronics is not always as simple as it sounds, there are side effects which often change well known behaviour. So try with another Ham or friend with a different Arduino or USBASP maybe.

73 de Chris
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

I haven't had much experience working with programming or hands on building with micros even though I am an electrical engineer - graduated in 1985 well before this stuff and went into Public Safety radio communications systems engineering. Now that I am retired, I'm trying to catch up if my spouse's honey do list ever stops...... LOL

I just didn't see any mentions that the Uno had to be the original one to work properly. I ordered that USBASP to use but I sure would like to know what was wrong with this R3 Uno because it did load the boot loader into another R3 UNO successfully. I was going to remove that programmed 328P from that UNO and put it into my assembled TruSDX kit to see if that worked but will now do that only after I try that USBASP on it.

Thanks,
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Hello Harold,

i'm also an electronics engineer :) graduated in 1998
as far as i remember.

Maybe sometimes we meet on the bands ;)
mostly in CW, my favourite
73 de Chris
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Hello Harold,

i got an message of another guy here in the forum which has found the error in your programming attempt:
you had programmer switched to arduino by the command "....-c arduino....",
this is wrong. I have overseen this sorry :)
It has to be "....-c avrisp..." as you can see at DL2MANs bootloader Webpage at the bottom if the Avrdudess window.

73 de Chris hoping this solves it
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Arduino has been programmed to be an "AVR ISP programmer" so therefore logically an error...

73 de Chris
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

Nope, still doesn't recognize the 328P. Used the -F to see if it would do anything but same results.

In the instructions, it says:

Then start AVR Dudess, and make the following Settings

Programmer: Arduino

Port: YOUR USB COM port

MCU: ATMEGA328P or ATMEGA328PB (depending on the Chip on your Board)

Baudrate: 19200

Flash (Write): truSDX-initial_Bootloader.hex (The file you downloaded here)

Fuses settings (enable Set Fuses): L:FF, H:D6, E:FD (Changed !!!)

Erase Flash and EEPROM




That is why it was set to Arduino. Instructions say: "Programmer: Arduino" . But the screen capture on the instruction page says Atmel AVR ISP

The Detect returns ffffff. Does that mean the chip is bricked?

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>>>: avrdude -c avrisp -p m328p -P COM3 -b 19200 -e -U flash:w:"C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex":a -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0xFD:m

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude.exe: Device signature = 0xffffff (probably .xmega) (retrying)

Reading | ################################################## | 100% 0.02s

avrdude.exe: Device signature = 0xffffff (probably .xmega) (retrying)

Reading | ################################################## | 100% 0.02s

avrdude.exe: Device signature = 0xffffff (probably .xmega)
avrdude.exe: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.


avrdude.exe done. Thank you.




~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>>>: avrdude -c avrisp -p m328p -P COM3 -b 19200 -F -e -U flash:w:"C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex":a -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0xFD:m

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude.exe: Device signature = 0xffffff (probably .xmega) (retrying)

Reading | ################################################## | 100% 0.02s

avrdude.exe: Device signature = 0xffffff (probably .xmega) (retrying)

Reading | ################################################## | 100% 0.02s

avrdude.exe: Device signature = 0xffffff (probably .xmega)
avrdude.exe: Yikes! Invalid device signature.
avrdude.exe: Expected signature for ATmega328P is 1E 95 0F
avrdude.exe: erasing chip
avrdude.exe: reading input file "C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex"
avrdude.exe: input file C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex auto detected as Intel Hex
avrdude.exe: writing flash (32768 bytes):

Writing | ################################################## | 100% 35.01s

avrdude.exe: 32768 bytes of flash written
avrdude.exe: verifying flash memory against C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex:
avrdude.exe: input file C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex auto detected as Intel Hex

Reading | ################################################## | 100% 19.15s

avrdude.exe: verification error, first mismatch at byte 0x0000
0xff != 0x0c
avrdude.exe: verification error; content mismatch

avrdude.exe done. Thank you.
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Hallo Harold,

yes you are absolutely right, it is an error in the manual for bootloader.
I reported it to Manuel DL2MAN.
Normally you don't need to programm the bootloader because the Kit suppliers/group buy Masters are forced to do this for you! So therefore nobody recognized the error in the text ;) until today.
In the Screenshot there is correct "Atmel AVR ISP" and your programmed Arduino Uno acts as an AVR ISP now.
So now, as i understand what happened, your Atmega328 is corrupted and could only be resetted by High Voltage Programming (not possible in circuit). I think you will have to change it.
Let's wait for a reply of Manuel if i'm correct with my diagnosis.

73 de Chris
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

The two USA Group buys led by WildMcQ in early 2022 were not preloaded and left to the kit assemblers to do. I thought the instructions were very clear and with Manuel's comments to follow them "word by word" were followed blindly because I have no bast experience programming these processors.

So what did I actually do when the Arduino UNO was set to Arduino in AVRDUDESS and program was executed? I have one fully built kit and one partially built Main Board that had been attempted to program and only the fully built kit did have the "-F" done to it but both boards return the "ffffff" when chip detected is requested?

Maybe remove the procedure using the Arduino Uno completely and only use the USBASP to do it to eliminate future failures???? I read about so many trying to use the Arduino and giving up and using the USBASP instead. I have it on order now and waiting to receive it to try and see if it can load those 2 chips.
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

I see someone else saw the discrepancy in the bootloader instructions previously but it was not addressed back then.

viewtopic.php?p=3973
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Yes Manuel answered and said it makes no difference whether Arduino or AVR ISP is selected, but if the cable connection is floppy/not fixed it can easy result in a blocked device that only can be resetted by a High Voltage Programmer. In circuit is not really easy to do so, because pins used for HVP are connected on the PCB. The easiest way is to change it with a new Atmega328.
Than you have to programm the bootloader at isp and afterwards the than downloaded firmware with the displayed serial number on usb port.
I also neaded HVP for two Atmegas i made useless with bad contact, built one therefore and they work again :)

73 de Chris
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

I'm now confused again.

The cable I used to connect the Arduino Uno to the 6pin ISP connector on the TruSDX was a cable assembly I made using a properly crimped header and soldered onto a strip of pins that plugged into the socket of the Uno. They are not loose and I measured the continuity to make sure it was correctly wired.

If it wasn't the setting of the Programmer to Arduino, then what happened that failed on 2 different batches of main boards?
Last edited by VA3HF on 13 Dec 2022, 00:33, edited 1 time in total.
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Hello Harold,

i don't know what was or is wrong with your (tr)uSDX, normally the group buy guys have to program the bootloader and after power on you should have seen your serial....
So the problem could be anywhere else on the (tr)uSDX, especially if you didn't see anything and the bootloader was installed, there must be something wrong with the OLED.
60mA at rx is okay.
Do you know if others from the group buy have had no bootloader installed?

73 de Chris
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

The group buy organizer for my boards left it to the purchaser to load the boot loader into the 328P.

Reading about the boot loader process at the Arduino site says a 10uF capacitor is required after the sketch is loaded:

The Arduino MEGA above is programming an Arduino UNO connecting D51-D11, D50-D12, D52-D13, GND-GND, 5V-5V and D10 to RESET. This type of board needs a 10µF electrolytic capacitor connected to RESET and GND with the positive (long leg) connected to RESET. The capacitor has to be placed after the programmer board has been loaded with the ISP sketch.

The 10µF electrolytic capacitor connected to RESET and GND of the programming board is needed only for the boards that have an interface between the microcontroller and the computer's USB, like Mega, UNO, Mini, Nano. Boards like Leonardo, Esplora and Micro, with the USB directly managed by the microcontroller, don't need the capacitor
.

https://docs.arduino.cc/built-in-exampl ... ArduinoISP

I wonder if the absence of that capacitor was the problem??
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Hallo Harold,

yes it is strange on newest Arduino Doc web page on top they are showing no 10 µF capacitor on reset to ground in using Uno as programming device. At nearly bottom of the page they are talking about it is needed and show a picture... I don't think it is really necessary because it worked here most of the time for me without, it could prevent from pulling down reset line of Atmega328 in the Uno by USB controller Atmega16-U2. Without additional capacitor, pin 13 eg. PD 7, has to be switched from ground to 5V and will than result in a small pull down on reset input of Atmega328 (through 100nF). If it is'nt controlled by software at the USB port, it won't happen.

73 de Chris
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

Well, this USBASP didn't work.....
https://www.amazon.ca/gp/product/B07D81 ... UTF8&psc=1
Couldn't get it to work in AVRDUDE even under the USBASP clone selection.

I now wired up an Arduino Nano which is a real one and was able to program the last main board I had that wasn't touched yet. It detected the 328P and I proceeded to program it with the bootloader and it worked! It is missing many parts including the display so no serial number on it.

I then proceeded to remove the 328P from my completely built TruSDX from USA group buy 2 and replace it with a 328P from one of my UNO R3 compatible boards and I was able to detect it and load the bootloader and firmware after getting the serial number.

I used the 10uF capacitor on the reset line as they said on the Arduino site.

So, I can probably conclude that the Arduino Uno R3 compatible units can not be used as a bootloader and to use a real Uno (since Manuel used it) or a real Arduino Nano.

This has been a very stressful process and surprised no one else had found that version of Uno didn't work yet after all this time. If I am wrong, I have no idea what I was doing improperly to brick the chips.

Here is what the Nano text looked like:

>>>: avrdude
truSDX-initial_Bootloader.hex: 32,366 / 32,768 Bytes (98.77%)
>>>: avrdude -c avrisp -P COM4 -b 19200 -p m8
Detected 1e950f = ATmega328P
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>>>: avrdude -c avrisp -p m328p -P COM4 -b 19200 -e -U flash:w:"C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex":a -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0xFD:m

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude.exe: Device signature = 0x1e950f (probably m328p)
avrdude.exe: erasing chip
avrdude.exe: reading input file "C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex"
avrdude.exe: input file C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex auto detected as Intel Hex
avrdude.exe: writing flash (32768 bytes):

Writing | ################################################## | 100% 35.05s

avrdude.exe: 32768 bytes of flash written
avrdude.exe: verifying flash memory against C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex:
avrdude.exe: input file C:\Users\Halasus\Desktop\TruSDX\truSDX-initial_Bootloader.hex auto detected as Intel Hex

Reading | ################################################## | 100% 19.22s

avrdude.exe: 32768 bytes of flash verified
avrdude.exe: reading input file "0xFF"
avrdude.exe: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude.exe: 1 bytes of lfuse written
avrdude.exe: verifying lfuse memory against 0xFF:

Reading | ################################################## | 100% 0.01s

avrdude.exe: 1 bytes of lfuse verified
avrdude.exe: reading input file "0xD6"
avrdude.exe: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude.exe: 1 bytes of hfuse written
avrdude.exe: verifying hfuse memory against 0xD6:

Reading | ################################################## | 100% 0.01s

avrdude.exe: 1 bytes of hfuse verified
avrdude.exe: reading input file "0xFD"
avrdude.exe: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude.exe: 1 bytes of efuse written
avrdude.exe: verifying efuse memory against 0xFD:

Reading | ################################################## | 100% 0.01s

avrdude.exe: 1 bytes of efuse verified

avrdude.exe done. Thank you.
dl6sez
 

Posts: 399
Joined: 30 Dec 2021, 22:54

Re: Can't load Bootloader into TruSDX

Post by dl6sez »

Hello Harold,

super now all works :)
Very hard job for you to succeed here. Others would have thrown it into the dust bin....

Maybe timing errors are a reason from the different design of the Uno copy.
Have you tried jumper JP1 closed to get the slow clock on the USBASP? That's what i needed sometimes...
no chance there with my Uno copy.

So now you can really enjoy your (tr)uSDXs

73 and hope to copy you on the bands some time ;)
Chris DL6SEZ
Chris DL6SEZ, JN48XL near Ulm, Southern Germany
VA3HF
 

Posts: 33
Joined: 01 Jan 2022, 04:38

Re: Can't load Bootloader into TruSDX

Post by VA3HF »

The USBASP that I got didn't want to work with AVRDUDE. I did load the USB Driver for it on my computer but the program didn't work with it. I didn't know there are different versions of USBASPs out there.
Post Reply

Users browsing this forum: No registered users and 0 guests