-
Notifications
You must be signed in to change notification settings - Fork 0
Using Flash Download Tool
If you are not into software development, do not fear!
You do not need to install the esp-idf development environment to flash the latest firmware onto your CPU module. Espressif has a firmware flashing tool that runs on Windows. The link below explains how to use the tool and has the link to download the tool. The zip file sets off a false positive on virus scan. The .exe file inside the zip is signed and checks out fine, this is a documented issue.
Using the tool is pretty simple for our needs. In the repository I have firmware folders containing image files you need to upload to the CPU. The folders may be old or new versions for specific hardware. Choose the one that matches your hardware and feature needs. I do not know yet if variations in available hardware will break things.
For example, the ESP32-S3-DevKitCV-1 has clones that could have differences. There are variations with none, or different sized PSRAM. Version 1.1 of the DevKitC board moved the onboard RGB LED from GPIO_35 to GPIO_48 to avoid conflicts with 32KB PSRAM addressing. We are not using PSRAM in this project so it should be disabled by default, the GPIO pins should be free. The RGB LED is only connected if you bridge a pair of solder pads.
You can see the variations in this table: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-devkitc-1/user_guide.html#ordering-information
I used a N16R8 clone variant for my prototype. It was easy on this board to bridge external 5V onto the USB Host port by soldering a resistor between the 5V and host USB Host port Vbus isolation diodes.
https://www.amazon.com/dp/B0CKXJLP4B?th=1
Assuming you have compatible hardware, lets flash the firmware onto it.
Below are Flash Download Tool screen shots from my system.
- Unzip the flash tool and run flash_download_tool_3.9.5.exe (or newer version possibly). It will raise a small dialog box with 3 choices.
- Choose Chip Type = ESP32-S3
- WorkMode = Develop
- LoadMode = UART
The main application interface will now open. The filename boxes will initially be blank. Here I have entered the filenames described in steps below along with memory location data called offsets.
- Download the folder file containing the precompiled firmware files for your hardware. The folder name is self-describing, I will refer to these as the firmware folder. The filenames within each firmware folder are normally identical. The firmware folders are located here: https://github.com/K7MDL2/IC-905_Band_Decoder_on_ESP32-S3/tree/main/Precompiled_Builds
There is a readme file with the filenames and offset numbers to enter into the tool for 3 files that get downloaded to the CPU. The above application image shows the 3 files.
-
Configure the Bootloader file: Click the 3 dots on the 1st line to navigate to your firmware folder and select the bootloader.bin file then enter the offset (the right column) number noted in the Readme file. These could change with board model.
-
Configure the Application file: Click the 3 dots on the 2nd line to navigate to your firmware folder and select the IC905_ESP32-S3_PTT_Breakout.bin file then enter the offset number noted in the Readme file. The name in the firmware folder and associated Readme may be different than what I showed above.
-
Configure the Partition Table CSV file: Click the 3 dots on the 3rd line to navigate to your firmware folder and select the partition-table.bin file then enter the offset number noted in the Readme file. The name in the firmware folder and associated Readme may be different than mine above.
-
The radio buttons for SPI Speed should be default at 40MHz. SPI Mode should be default with DIO. The DoNotChgBin box is checked.
-
Plug a USB cable into your PC and the CPU UART, often labeled COM on the CPU silkscreen. Find the COM port number Windows assigned in Device Manager. Now select that COM port in the pick list in the lower right corner. If using a single USB port device then press and hold for several seconds the reset/boot mode button, to put it into programming mode. For the M5AtomS3 there is a button on the side you press for at least 3 seconds. If there was something visible on the display before, it should be blank now in programming mode.
-
Set Baud Rate to 115200 Baud.
-
There will be a green "IDLE" status. Click on the START button to begin flashing.
-
A green progress bar updates until it is done in about 60 seconds.
-
The IDLE status eventually turns to a CYAN colored "FINISH". Hit stop to return to IDLE status.
-
Open a terminal program such as HyperTerm or puTTY on the same com port used for flashing the CPU. Set baud to 115200. You should see debug and status text from the CPU.
-
You can now plug the CPU USB Host port into the radio. You will need 5V on that USB Host port for it to work. You can use a Y cable or jumper in a resistor like I did. It takes virtually no current so the resistor value can be large. I used 1Kohm. Leave the PC USB cable connected.
-
Spin the VFO dial and you should see VFO frequency and Band info in the debug (if you are on a 2 USB port board). Press the PTT and see ON and OFF PTT messages. If you have LEDs wired, or better yet, scored one of the PCBs, you should have 8 LEDs.
In the debug messages you can see frequency, the output port GPIO pin patterns that are sent for each band and PTT groups of pins. You may also see LED brightness levels adjusting in response to the ADC reading the brightness adjust pot and then set the LED brightness accordingly.