Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post Reply
OE5JFE
 

Posts: 17
Joined: 15 Feb 2022, 07:03

Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by OE5JFE »

Hello

Rudi OE5GRF and myself have a problem with our kits from the OE groupbuy #1.

On turning the rotary encoder it happens that it crashes and reboots.
See video:
https://youtu.be/ZASAslL1Ao4?t=12

Crash at around second # 16
Reset at second 21

Crash also happens when navigating in the menu with the encoder.

Note that I made my encoder to be placed external with shielded wires. About 4 cm to that it will fit my case. But it also happens for Rudi with the original placement.
Volume is turned down to 7.
The crash/reset happens on all bands and modes. Firmware is the 'standard' one.
It happens on USB power and external batteries (13,5 V LiFePO4) too.

Any idea what could cause that situation or how to improve it?


73 Joe
Last edited by OE5JFE on 28 Apr 2022, 05:01, edited 4 times in total.
Ohwenzelph
 

Posts: 207
Joined: 01 Jan 2022, 03:47

Re: Lockup/Reset when changeing frequency

Post by Ohwenzelph »

Try reloading the firmware. Mine was doing weird stuff and that seemed to cure it.
The PA and Mic/PTT connectors look like they are pretty much directly connected to the processor. Perhaps a small zap might have corrupted the programing.
OE5JFE
 

Posts: 17
Joined: 15 Feb 2022, 07:03

Re: Lockup/Reset when changeing frequency

Post by OE5JFE »

Thanks.
As far as I know Rudi did reflash the firmware already two or three times without improvements.
I would expect that the verify function of the upload tool would make sure that nothing gets corrupted during upload.

What I need to add as it might be related:
Looking at the installed AT Mega Chip the label says it is a 328PB. I installed the bootloader selecting ATMEGA328PB and avrdutess also stated that it detected that ID.

Then later for the firmware upload the selection of 328PB did not work. I needed to switched to 328P to be able to upload the firmware.

Not sure if this has any impact? Code should be compatible by this comparison sheet:
https://ww1.microchip.com/downloads/en/ ... T15007.pdf

I found the post here on the forum discussing exactly this behaviour so not sure if there is an impact?

Here in a german forum it is discussed that there is a problem running at 20 MHz using the 328PM. Also lockups are described. And the resetlevels are different?
The same code apparently was running fine on the 328P.

Extended Fuse Bits are also different:
328PB Extended Fuse.PNG
328PB Extended Fuse.PNG (43.35 KiB) Viewed 3506 times

https://www.mikrocontroller.net/topic/449723
Due to the missing full swing oscillator ?

And unstable working conditions under 5V operation:
https://www.avrfreaks.net/forum/atmega3 ... -and-16mhz

But I am not sure if that is related in any way. Maybe there is something in the hardware as both boards are from the same buy group.
OE5JFE
 

Posts: 17
Joined: 15 Feb 2022, 07:03

Re: Lockup/Reset when changeing frequency

Post by OE5JFE »

I have just flashed the firmware again.

Code: Select all

avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 4.23s

avrdude.exe: verifying ...
avrdude.exe: 31828 bytes of flash verified

avrdude.exe done.  Thank you.
No change in the situation. I just let it run and without rotation of the encoder it works fine. So I guess I will experiment with some small caps for the encoder. Any suggestion with pins would need an extra C ?

I was just discussing with Rudi OE5GRF. The extended fusebit set to 0xFD activates the CFD which is by default deactivated.
If the CFD detects a problem it resets the internal clock to 1MHz. That might be the problem.
So 0xF5 should keep the default and set the brownout bit like for the 328P. We will test that tomorrow.

73 Joe
Wolf OE7FTJ
 

Posts: 10
Joined: 31 Dec 2021, 17:19

Re: Lockup/Reset when changeing frequency

Post by Wolf OE7FTJ »

OE5JFE wrote: 27 Apr 2022, 07:11 ....

What I need to add as it might be related:
Looking at the installed AT Mega Chip the label says it is a 328PB. I installed the bootloader selecting ATMEGA328PB and avrdutess also stated that it detected that ID.

Then later for the firmware upload the selection of 328PB did not work. I needed to switched to 328P to be able to upload the firmware.

......
Joe,

I have a fully assembled device from the chinese authorized dealer. It has also a ATmega328PB MCU and I had no issues when flashing with the FW. Downloading the FW with my call and s/n personalised, flashing without errors, but sometimes crashing and resetting.

But flashing the FW needs to set the -F switch (checkbox Force on the left side of the flashing tool).

Wolf, oe7ftj
OE5JFE
 

Posts: 17
Joined: 15 Feb 2022, 07:03

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by OE5JFE »

Thanks Wolf for the info.
Firmware flash was not problem for me.

Does crash and reset also happen mainly when you rotate the encoder?

73 Joe
pe1nnz
 

Posts: 50
Joined: 30 Dec 2021, 19:29

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by pe1nnz »

Hi Joe,

Sorry to hear that you and your friend experience resets on the 328PB chip.

Yes the 328PB has no full swing oscillator, but this should not matter as we are using the low power oscillator.

The CFD fuse setting is an interesting one, we seem to enable it with the Extended fuse setting FD. You could see if things improve by disabling it, write in that case a new Bootloader with Extended fuse setting F5.

Instabilities may be caused by close by noise sources like CFLs (does your uSDX only have the issue on your workbench with the desk light switched on?). Noise could be injected on the XTAL clock lines, reset line or even the button or encoder interrupts (potentially causing a stack overflow by too many interrupts).

Let me know how you go by changing the CFD fuse setting. If this will not improve things, we can try to find the cause with some dedicated firmware.

73, Guido
OE5JFE
 

Posts: 17
Joined: 15 Feb 2022, 07:03

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by OE5JFE »

Hello Guido,

Thanks for taking time to help in this issue.

I have just tested with the extended fuse set to F5. It unfortunatly does not solve the issue.

Regarding your comment on noise at the workbench. That might be an issue. On the other hand Rudi OE5GRF was testing it on a SOTA summit and there it happend too.

It really only happens if one spinns the encoder very quickly (at least on my radio).

If you have a firmware available for troubleshooting that would be great.
73 de Joe
OE5JFE
 

Posts: 17
Joined: 15 Feb 2022, 07:03

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by OE5JFE »

And to add to the story:

Rudi has bricked his 328PB (with a typo in the fuse setting) and installed a "normal" 328P. The problem still exists so it looks like a hardwareproblem.
Not sure how to trace that down? I guess the encoder can not be the problem? Caps?

Maybe some instructions to reproduce it.
Pick a 1 or 0.5 kHz step and spin the encoder quickly. Usually changing by 20 or 40 kHz is enough to cause the reboot/crash. Sometimes before that the OLED gets display errors or partially blacks out. When you continue turning the VFO knob the displayed frequency has moved on before the crash. So something is still working in the background without display update.
It looks like a lack of resources to change frequency, decode and update display at the same time.
OE6RCD
 

Posts: 4
Joined: 14 Feb 2022, 12:52

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by OE6RCD »

My (tr)usdx (Austrian Group Buy) has the same problem. Sometimes the rig freezes when changing frequency. I observed, that it happens more often when NR is set to 2 or higher and Filter is set below 3khz
EB5HDT
 

Posts: 21
Joined: 10 May 2022, 11:22

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by EB5HDT »

the processor is not blocked, the addresses are recorded so that the program cannot be deleted the only way to rescue the cpu is by deleting the fuses in a certain way, which is by recording a sequence of bits that I put on a website on how to restore the fuses I don't know they can recover with the avrdude only with hardware with a certain voltage on an atmega pin neither through the ISP nor through USBASP or anything similar only with specific hardware to clear the fuses, I repeat you cannot clear the fuses through the ISP.
I recommend this:

https://microchipdeveloper.com/8avr:avrfuses

https://www.radiolocman.com/shem/schema ... l?di=65084

https://circuitdigest.com/microcontroll ... ing-skills

https://github.com/SukkoPera/avr-fusebi ... BL%20fuse)

https://amarkulo.com/recovering-atmega- ... med-fuses/
9A7AM
 

Posts: 6
Joined: 28 Jun 2022, 10:07

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by 9A7AM »

Hello

I have the same problem with my (tr)uSDX from PL/EU group II. Resetting, sound muting and sometimes loud high pitch tone in earphones (volume at level 10). It all happens when rotating rotary encoder.
Has anyone solved this problem?

73, Ivan, 9A7AM
hari
 

Posts: 17
Joined: 14 Feb 2022, 09:25

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by hari »

same issue here, happens every now and then when I spin the frequency dial very fast. Unit is also from the Austrian group buy.

73 OE6HKE
OE6RCD
 

Posts: 4
Joined: 14 Feb 2022, 12:52

Re: Lockup/Reset when changeing frequency - 328PB CFD fuse bit?

Post by OE6RCD »

There are a lot of bad solder joints. Try to re-solder all pins of the 328 first!
All my problems disappeared after re-soldering almost every part on the main board.

vy 73 Roland
Post Reply

Users browsing this forum: No registered users and 0 guests