Page 3 of 4

Re: G2 Software and Firmware Updates 27 Aug 2023

Posted: Sat Mar 09, 2024 2:14 pm
by laurencebarker
rbanasik wrote:
laurencebarker wrote:We are in the process of changing the firmware, p2app and piHPSDR to work with enlarged FIFO buffers in the FPGA. Debug code has identified that we were stalling the software waiting for a speaker FIFO to empty. Hopefully a combination of enlarged buffers and a different way for the software to transfer data will fix that.

Yes, I noticed the GUI activity can cause lost data problems with Thetis too. As at today it is very stable - no lost data packets - in normal operation at FS=1536KHz with one receiver; if RX2 is enabled a tiny amount of data may be lost.

2 receivers at 384KHz is at the upper end of what I'd expect from piHPSDR, I consider that to be success. Hopefully in a few months there will be news of a pi5 compute module.


Hi Laurence.
I just wanted to confirm that the following update script is still applicable. I used it successfully earlier but heard there is another update available.
Is the following ok?
Thanks - Bob, Ki1n

cd ~/github/Saturn
git pull
cd sw_projects/P2_app
make clean
make


cd ../audiotest
make clean
make

cd ~/github/pihpsdr
git pull
make clean
make


Then run the "flashwriter" app. The program may already be installed onto your linux desktop. If not you can run it simply from a linux command prompt. Open a command window then type:

cd ~/github/Saturn/sw_tools/flashwriter
./flashwriter

click open file
navigate to the file ~/github/Saturn/FPGA
select file saturnprimary.bin
makes sure the Primary radio button is selected
click Program

(DO NOT click Erase Device of select Fallback!)

You will get progress shown in the window; it will go through erase, program and verify steps then report success at the end.

Shut your G2 down, power off and back on; it will now run the new FPGA code and will load the new p2app.

-- Bob - Ki1n


I would suggest some slight changes, doing a "make clean" on everything before git pull


cd ~/github/Saturn/sw_projects/P2_app
make clean
cd ~/github/Saturn/sw_projects/audiotest
make clean
cd ~/github/Saturn
git pull
cd sw_projects/P2_app
make
cd ../audiotest
make


cd ~/github/pihpsdr
make clean
git pull
make


to reflash the FPGA:
FPGA firmware files are named saturnprimaryxxxxVyy.bin and will be in the saturn/FPGA folder
xxxx should be the approximate year of release
yy should be the version number
ignore the “.prm” files. A .bin file should be around 9.3Mbytes in size.

Run the flashwriter desktop application
Click Open File, navigate to the correct .BIN file and click open
The BIN filename will now be displayed
Ensure the buttons are set to Primary
Click Program
The device will be programmed, and progress will be shown on the display.
(DO NOT click Erase Device or select Fallback!)
You will get progress shown in the window; it will go through erase, program and verify steps then report success at the end.

The radio will need to be powered completely off and back on to load from the new .BIT file.

Re: G2 Software and Firmware Updates

Posted: Sat Mar 09, 2024 9:54 pm
by K5WC
Some way I’ve messed up my P2APP. I just preformed all the steps in the previous post other than flashing the FPGA. I am already at 12 so I didn’t do that step. Closed out and powered down the G2. Now when I try to execute the P2APP nothing happens. Tried executing the P2APP from within the P2APP folder with same results. PIHPSDR works fine. Not sure what steps to take to proceed from here. Thanks John

Re: G2 Software and Firmware Updates

Posted: Sat Mar 09, 2024 10:12 pm
by K5WC
Running from a command prompt after it loads the version info Saturn FW version = 12, P2APP version 16, it says segmentation fault.

Re: G2 Software and Firmware Updates

Posted: Sun Mar 10, 2024 9:28 am
by laurencebarker
I did a new commit to that code last night and it's not doing that here.

Re: G2 Software and Firmware Updates

Posted: Sun Mar 10, 2024 10:46 am
by K5WC
Thanks Laurence I’ve tried again with following these steps:
cd ~/github/Saturn/sw_projects/P2_app
make clean
cd ~/github/Saturn/sw_projects/audiotest
make clean
cd ~/github/Saturn
git pull
cd sw_projects/P2_app
make
cd ../audiotest
make


cd ~/github/pihpsdr
make clean
git pull
make

And running gives me this:
SATURN PROTOCOL 2 App. ‘X <enter> in console to close
FPGA BIT file data code = 09012024
Product: Saturn; Version = 2
FPGA Firmware loaded: Saturn, full function; FW Version = 12
All clocks present
P2APP client app software Version:16 Build Date:9 Mar 2024 16:40:11
Die Temp = 46.8C
Segmentation fault

Any suggestions on what steps I can try next? When I do a git pull is says already up to date. Sorry for basic questions as I am not knowledgeable with Linux. I’m guessing there is no way to go back to version 15 as I wasn’t having issues.
Thanks for any suggestions on what next to try. John

Re: G2 Software and Firmware Updates

Posted: Sun Mar 10, 2024 3:05 pm
by laurencebarker
It should be possible with git to "go backwards" but I don't know how to do that. I've not included the executable in the git files because I generally test with 64 bit operating system, and the factory image is 32 bit. One day I'll need to find a way around that.

I spotted one thing that wasn't right, but it didn't cause a problem on my radio yesterday (but looks like it should have done). I've done a new commit. I'm 200 miles from the radio for the next couple of days, so I can't test it. Please try a new git pull and build p2app again.

Sorry!

Re: G2 Software and Firmware Updates

Posted: Sun Mar 10, 2024 3:48 pm
by K5WC
Thank you Laurence that did it. All back working again!

John

Re: G2 Software and Firmware Updates

Posted: Mon Mar 18, 2024 2:18 pm
by ke3vg
Hi Laurence,

I have been trying to update the G2 with screen, FW update on my friends machine, he is currently running FW ver. 10 and I have followed the procedure and updated P2APP, Audio test, PIHPSDR and firmware using Flesh writer several times. Everything goes smoothly, but when we bootup the machine after FW update to V 12 , it continue to show the Ver 10. I can verify that the file is written with FW , version 12 but it would not show up in P2APP. I did remove the PRAPP and update the P2APP and FW again , at least 4 times but with same results.

- does the FW files/version is same for G2 with or without screen?
- I am following the same instructions, as I had done successful with my G2/without screen so not sure what's going on here.

Any suggestions,

thanks,

Mukesh

Re: G2 Software and Firmware Updates

Posted: Mon Mar 18, 2024 7:05 pm
by laurencebarker
Yes it is the same firmware for both.

Can you post the full text that p2app starts up with please - I'm looking to see if it loaded a fallback image rather than the primary one.

Re: G2 Software and Firmware Updates

Posted: Mon Mar 18, 2024 9:02 pm
by ke3vg
Ok Laurence, once I have access to his machine, will post the message. thank you.

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 5:23 pm
by ke3vg
Laurence, here is the test from P2APP startup


pi@raspberrypi:~ $ /home/pi/github/Saturn/sw_projects/P2_app/p2app
SATURN Protocol 2 App. press 'x <enter>' in console to close
register access connected to /dev/xdma0_user
FPGA BIT file data code = 30092023
Product: Saturn; Version = 2
FPGA Firmware loaded: Saturn, full function; FW Version = 10
All clocks present
p2app client app software Version:17 Build Date:13 Mar 2024 20:55:20
Die Temp = 44.5C
calculating new CW ramp, length = 5000 us

spinning up Check For Exit thread
spinning up DDC specific thread with port 1025
spinning up DUC specific thread with port 1026
spinning up high priority incoming thread with port 1027
spinning up speaker audio thread with port 1028
spinning up DUC I/Q thread with port 1029
loading new FIFO sizes for updated firmware
spinning up outgoing high priority with port 1025
spinning up outgoing mic thread with port 1026
spinning up outgoing I/Q thread with port 1035


I have installed the FW update v 12 minimum 4 times but it does not load.
thanks,

Mukesh

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 6:57 pm
by laurencebarker
Sorry but I can't explain that.

Two suggestions:

1. can you capture the text from the status window on the flashwriter app?
2. make sure that the V10 image hasn't accidentally been renamed V12

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 8:12 pm
by ke3vg
Hi Laurence,

I have added the screenshot of Flashwriter.

thank you,

Mukesh

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 9:11 pm
by laurencebarker
and it completes successfully?

and you fully powered off the hardware then back on?


I've just programmed mine from the file in github and it reports version = 12, as expected

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 9:16 pm
by ke3vg
yes, it is completely successful, it writes, reads and verification and completed successfully. Not sure why it does not pick up the new firmware after the bootup. After the upgrade the G2 is shutdown, power is removed for 30 seconds and restart. So far, I have updated 10 times with same results.

IS there a way to complexly removal and fresh installation of P2APP?

thanks,

Mukesh

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 9:20 pm
by laurencebarker
p2app isn't the issue; that's just displaying the value it read from the FPGA.

If the flashwriter succeeds it has overwritten the FPGA image (which was at the correct address) and read it back successfully. If the FPGA didn't load it, it would have loaded the fallback image instead and it would have said so

Did you just follow the shutdown process on the G2 or did you completely remove its 13.8V DC power too? (The latter would make doubly sure)

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 9:22 pm
by ke3vg
yes, the power to radio was completely removed..

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 9:24 pm
by laurencebarker
Then I'm sorry but I don't know what to suggest.

The only way to reprogram more thoroughly than that is to use a xilinx programming cable an start from scratch

Re: G2 Software and Firmware Updates

Posted: Tue Mar 19, 2024 9:36 pm
by ke3vg
Laurence,
that is a last solution. Is it worth to download the image file and rebuild it from scratch? I know it would not solve the actual FPGA reprogramming problem, but it may solve any other issues which may blocking the actual FW writing?

The message I receives after each flesh writer operation is that it has successfully completed each step and verification is successful, so all SW steps are completed without any issues. Do you think it is a hardware issue?

I would appreciate any insight here.

regards,

Mukesh

Re: G2 Software and Firmware Updates

Posted: Wed Mar 20, 2024 12:21 am
by Roger GT
My G2 does not transmit on V12! No output for SSB, CW, AM or FM. When I flash V11, everything is OK again. I am using piHPSDR! What should I do? ? ?

Re: G2 Software and Firmware Updates

Posted: Wed Mar 20, 2024 12:29 am
by ke3vg
Hi Roger, after you done the V12 update, update the P2APP again. I ran into same issue, as per Laurence, the v12 requires P2APP update also.

hope this helps

Re: G2 Software and Firmware Updates

Posted: Wed Mar 20, 2024 7:27 am
by laurencebarker
Roger GT wrote:My G2 does not transmit on V12! No output for SSB, CW, AM or FM. When I flash V11, everything is OK again. I am using piHPSDR! What should I do? ? ?


you will need updated piHPSDR too, or updated p2app as noted by ke3vg.

Re: G2 Software and Firmware Updates

Posted: Wed Mar 20, 2024 7:33 am
by laurencebarker
ke3vg wrote:Laurence,
that is a last solution. Is it worth to download the image file and rebuild it from scratch? I know it would not solve the actual FPGA reprogramming problem, but it may solve any other issues which may blocking the actual FW writing?

The message I receives after each flesh writer operation is that it has successfully completed each step and verification is successful, so all SW steps are completed without any issues. Do you think it is a hardware issue?

I would appreciate any insight here.

regards,

Mukesh



There isn't anything wrong with the image file on github. I downloaded it and reprogrammed from it yesterday. If you were to download the Vivado and recompile from source, you'd only get to the same image minus a lot of thickness of hair.

have you downloaded Saturnprimaryv12.bin again (to make sure it wasn't a V10 version renamed) and programmed from that?

I don't see how a hardware fault could happen with all of these symptoms. Flashwriter is reporting that it has programmed the file: it reads back every byte. The FPGA has successfully configured from that data: just one byte in error would stop it loading. This only makes sense if the V12 image i being written in to it time after time.

Re: G2 Software and Firmware Updates

Posted: Wed Mar 20, 2024 12:16 pm
by K5WC
ke3vg wrote:Laurence,
that is a last solution. Is it worth to download the image file and rebuild it from scratch? I know it would not solve the actual FPGA reprogramming problem, but it may solve any other issues which may blocking the actual FW writing?

The message I receives after each flesh writer operation is that it has successfully completed each step and verification is successful, so all SW steps are completed without any issues. Do you think it is a hardware issue?

I would appreciate any insight here.

regards,

Mukesh



Have you tried flashing V11 to see if it will load and say V11? I was a couple updates behind and tried to go to 12 and had trouble. Loaded V11 and checked it was reporting that it was saying V11 then did it again and was successful. No idea why, I did nothing different than the first two attempts.

Re: G2 Software and Firmware Updates

Posted: Wed Mar 20, 2024 5:30 pm
by Roger GT
I downloaded the saturnprimary2023V12.bin again from github and reinstalled it. Then I checked the P2app and piHPSDR for newer files. They are both up to date. My G2 with display and piHPSDR still does not transmit with V12. So I went back to V11. Now it transmits again. It is still noticeable that all encoders, switches and the VFO knob do not respond. The display is not locked. I am not using Tetis!

Re: G2 Software and Firmware Updates

Posted: Wed Mar 20, 2024 7:34 pm
by laurencebarker
Roger GT wrote:I downloaded the saturnprimary2023V12.bin again from github and reinstalled it. Then I checked the P2app and piHPSDR for newer files. They are both up to date. My G2 with display and piHPSDR still does not transmit with V12. So I went back to V11. Now it transmits again. It is still noticeable that all encoders, switches and the VFO knob do not respond. The display is not locked. I am not using Tetis!

That is more of a piHPSDR issue I suspect. piHPSDR has been fully working on TX for a while.

Re: G2 Software and Firmware Updates

Posted: Tue Apr 02, 2024 2:33 am
by WT4DX
Where can I find a list of latest SW/ FW versions for the G2 (currently working with piHPSDR)?

I went through the update process provided script at the beginning of this thread, and this update was installed:

Build date: 2023-10-18 (commit 24a0f75)
Build version: 2.0-DL1YCF
WDSP version: 1.23
Device: saturn, Protocal 2, v0.8

Under the assumption that the updates are sequential, I went through the process again and upon git pull it was indicated that piHPSDR was up to date.

I do see an updated script later in this thread, but I would like to know what the latest versions are before making another run at it.

I'm new to the Apache Labs platform, so any and all help is appreciated.

Thanks,
Tem
WT4DX

Re: G2 Software and Firmware Updates

Posted: Tue Apr 02, 2024 10:58 am
by Roger GT
Hi Tem,
The latest update from Christoph is from yesterday ...
src increase protocol-2 "tx iq prefill"
and the current version of wdsp is 1.24

Re: G2 Software and Firmware Updates

Posted: Tue Apr 02, 2024 2:24 pm
by laurencebarker
WT4DX wrote:Where can I find a list of latest SW/ FW versions for the G2 (currently working with piHPSDR)?

I went through the update process provided script at the beginning of this thread, and this update was installed:

Build date: 2023-10-18 (commit 24a0f75)
Build version: 2.0-DL1YCF
WDSP version: 1.23
Device: saturn, Protocal 2, v0.8

Under the assumption that the updates are sequential, I went through the process again and upon git pull it was indicated that piHPSDR was up to date.

I do see an updated script later in this thread, but I would like to know what the latest versions are before making another run at it.

I'm new to the Apache Labs platform, so any and all help is appreciated.

Thanks,
Tem
WT4DX


Off the top of my head I don't know which branch is selected in the factory image. Christoph has a "long term stable" branch and I suspect you have that one selected. There are much newer versions but should be treated as engineering releases.

Re: G2 Software and Firmware Updates

Posted: Tue Apr 02, 2024 2:29 pm
by WT4DX
laurencebarker wrote:
WT4DX wrote:Where can I find a list of latest SW/ FW versions for the G2 (currently working with piHPSDR)?

I went through the update process provided script at the beginning of this thread, and this update was installed:

Build date: 2023-10-18 (commit 24a0f75)
Build version: 2.0-DL1YCF
WDSP version: 1.23
Device: saturn, Protocal 2, v0.8

Under the assumption that the updates are sequential, I went through the process again and upon git pull it was indicated that piHPSDR was up to date.

I do see an updated script later in this thread, but I would like to know what the latest versions are before making another run at it.

I'm new to the Apache Labs platform, so any and all help is appreciated.

Thanks,
Tem
WT4DX


Off the top of my head I don't know which branch is selected in the factory image. Christoph has a "long term stable" branch and I suspect you have that one selected. There are much newer versions but should be treated as engineering releases.


Thanks for the reply Laurence. Is there a directory in Github that contains the latest versions, and is the script for updates on the first page of this thread still good to go?

73,
Tem
WT4DX