= Tutorial - Register / Update firmware for ESPrtk - ESPrtk -ESP32 RTK
XtGem Forum catalog

The firmware update procedure for use as a device with full functionality of ESPrtk manufacturer.

There has been a change in the usage and loading (flash) ESPrtk firmware since version 2.7.2.
This change stems from the system security needs and the size of the new update has exceeded the 4MByte limit of the Flash chip on ESP32.
Program files run once ( as Register or Login ) will be separated from the main program, this will free up more space for the Firmware file and allow integration of advanced security features and utility of IDF from Espressif on it. .

Please note ! From version 3.9.87, The Data.bin file will no longer be needed (in fact, it has been compressed with the App.bin file). Just 1 App.bin file at the unique 0x0 address as this image.

Please read carefully before start uploading firmware for ESP32.

 

Usage and life cycle of ESPrtk software.

The steps to flash Firmware on ESP32 are as follows:
Register  -> Update firmware 1. -> Update firmware 2 -> …-> Update firmware N. 
This is an irreversible process, uploading ESP32 firmware must follow this order.

After user confirming registration to use ESP32 like ESPrtk, ESP32 will enter protected Flash reading mode and only accept uploading of Firmware file from the manufacturer. This will help ESPrtk be more secure. 

 (ESPrtk Developer, ESPrtk user or ESPrtk manufacturer  is called User.)

Step 1 – Register:

User must prepare a new ESP32 chip and upload the Register.bin file to ESP32.This file will permanently burn registration information to EFUSE of ESP32.

(ESP32 chip is called “New” when it has not registered successfully before. It doesn’t matter when and how long it was bought.
Users of ESPrtk version 2.5.x, 2.6.x and 2.7.0.2 if not registered are also called New chips.)

Upload fail:

If ESP32 does not export the notification data, it seems to have an upload error. In this case,  user is allowed to reload the Register.bin file to ESP32 if the previous upload failed.

Upload successfully:

After uploading to Register.bin and restarting ESP32.  ESP32 requires confirmation of the registration from the user side (via Serial port (TX-UART0 -baudrate 230400 ) by press and hold on the CWB button in 5 seconds. After registration is completed,ESP32 will export a completed notification (Register Done ..) .

Since this time, ESP32 is in the “Registered-Done” state and does not need to register further.
This means that the registration will only need to be performed once per ESP32 chip.(Unless users want to re-register because they have previously canceled, see more : Cancel and Re-register ESPrtk. )
Now ESP32 needs to update Firmware.

Step 2 – Upload / Update Firmware:

This is the last step.
 Users need to upload the program file for ESPrtk. It is App.bin file. It collectively called the Firmwares file.

Users are only allowed to upload the Firmwares file when ESP32 is in “Registered-Done”  state  (pass step 1) or needing update other Firmware.

  After upload Firmware files and restarting ESP32. ESP32 will export a  completed notification (ESPrtk information..) via Serial port (TX-UART0 -baudrate 230400 ) .

Upload fail:

If ESP32 does not export the notification data, it seems to have an upload error. In this case,  user is allowed to reload the Firmware files to ESP32 if the previous upload failed.
Upload successfully:

  Since this time. ESP32 is in the “Upload Firmware Success” state.

Now ESP32 is ESPrtk and ready to use.

  Update firmware:

Users may need to update patches or upgrade new features.  They can upload files of Firmwares files with different version numbers and unlimited limit of uploads.To update the new firmware, users only need to repeat uploading the new file App.bin , (the partition address and upload configuration are the same as the first update of Firmwares in Step 2 above).

 

Steps to upload .bin files for ESPrtk.

 To use ESP32 as ESPrtk. User need to do these steps: 

  • Step 0 : Prepare hardware.
  • Step 1: Upload Register.bin file  and confirm registration.
  • Step 2 : Upload Firmware files (can be uploaded several times).
  • Step 3 : Go to Web config and create new profile account and use.

To upload .bin files for ESP32, we will use “Flash Download Tools” software, This is the tool provided by Espressif (ESP32 manufacturer).

If you don’t know how to use this tool, read this tutorial to learn how to upload an example:  How to use Flash Download Tools to flash .bin file for ESP32.

Dowload .bin fileLink
Register.bin
App.bin
Flash Download Tools + Serial Port Utility.exe

( To download firmware with other themes , clich here )

Step 0 – Prepare hardware.:

GPIO13 pin is connected to 10 K resistor holding Pullup and CWB button. 

Release CWB (no press and no hold) with high Logic voltage level.

Press and hold CWB with low Logic voltage level.

See more circuit here :  Create an ESPrtk board from any ESP32 development boards.

Step 1 – Register:

Need perform this step if ESP32 is new chip .

(  If ESP32 only needs to update the Firmware, skip  this step and  go to Step 2 ).

After step 1 , ESP32 in “Registered-Done” state.

Upload configure: 

Number of bin file1
Register.bin address offset0x0
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

After flash Register.bin file.

 Open Serial Terminal and press Reset ESP32 . CWB button must be release. (no press and no  hold). 

The ESP32 will start UART0 at 2 different baudrates. The first baudrate is 115200 bps with manufacturer configuration description state, flash read state, CHIP status ... It looks like this at 115200 baudrate.

In the next stage, ESPrtk will change the baudrate of the ESP32 to 230400 and go into automatic hardware test mode, GPIO error scan, EFUSE scan, RF test and calibration (Bluetooth + WIFI) ..... , check the CWB button should be in release state (connected to 3.3v). If all goes well, a confirmation message will appear at baudrate 230400 and wait until the user presses the CWB button to continue.

[Error ]: [ If you do not see the bellow message appear at baudrate 230400. This means that the Register.bin file was not Flashed correctly. The only reason is that the power supply for the ESP32 is not enough power. So make sure to maintain a minimum 3.3v (500mA) power supply for the ESP32 chip. Flash again until ESP32 respone status at baudrate 230400.
Also don't forget , the ESP32 chip should be the ESP32-D0WD or ESP32-D0WD-Q6 (it's insided the ESP32-WROOM-32D or ESP32-WROOM-32U or ESP32-WROOM-32UE or ESP32-WROOM-32E or NINA W106 Ublox module) ]

Now ESP32 requires confirmation of the registration.

To confirm registration , hold on the CWB button in 5 seconds., then you can release CWB button and wait until ESP32 print out  ( Register Done…) message .

If it does not work , you can press Reset ESP32 then try again as above .

See video below:

After hold CWB button in 5 second, ESP32 will start register process.( total time to wait can up to 30 second. )
When you see the line "Register Done !" it mean the register process was done (success).

After register progress done, when restart ESP32 , if you see ESP32 repeat an error message reading Flash like this at baudrate 115200:

That means the registration is successful and ESP32 only accept ESPrtk ‘s Firmware, so you need to upload the Firmware file.

Step 2 – Upload or Update Firmware:

After registering, upload 2 files of App.bin to use.

Since this time. ESP32 is in the “Upload Firmware Success” state.

Upload configure: 

Number of bin file1
App.bin address offset0x0
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

See video below:

Please note ! From version 3.9.87, The Data.bin file will no longer be needed (in fact, it has been compressed with the App.bin file). Just 1 App.bin file at the unique 0x0 address as above image.

Step 3 -Go to Web config and create new profile account and use.

After loading the program and connecting ESP32 as an ESPrtk circuit board, you can start using it. Start  WEB Configure , goto Profile and login with account ( Name : admin , Password : abc123ABC ) , then you can visit and start using the web configure interface. 

Now to start using the full feature on ESPrtk, you need to enable it (even you are using Free or Purchase ESPrtk’s firmware ). To do this, click here to continue: Get KEY file to activate ESPrtk.

See video below:

Unable to enter firmware update mode.

ESP32 enter the firmware update mode by following these steps:

-#1 Pull GPIO0 pin down to 0v and hold it until the update is complete.

-#2 Reset ESP32 to enter firmware update mode.

-#3 Update the firmware via the UART_0 port.

-#4 Update complete.

ESP32 cannot enter firmware update mode because GPIO0 pin is not pulled down low before reset. On ESPrtk 3.0.0 version, GPIO0 pin is used as CS-SPI output pin for Ethernet module, so when updating firmware for ESPrtk it is necessary to disconnect power to Ethernet or disconnect GPIO0 to CS-SPI pin. -Ethernet to ensure GPIO0 will be pulled low during the firmware update process.

When designing PCB for your final projects, remember to add a switch or jupmer for the GPIO0 pin to ensure it can pull the GPIO0 pin low during the firmware update. You can refer to the proposed connection block diagram in the datasheet for more info.

Voltage problem:

ESP32 needs to be supplied with the voltage maintained at 3.0 -> 3.5 Volt. In some cases. Pulling GPIO0 to 0Volt may not be enough.

Using too many devices on the same power supply bus on the circuit as ECN28J60 / W5500 + LoRa + GNSS + OLED ...., (while the voltage source is limited output power) can cause the voltage to be applied on ESP32 was not enough for ESP32 to enter firmware download mode.

So, maybe, you need to disconnect the power supply for other devices that are sharing the source bus with ESP32 before pulling the GPIO0 pin down.


..... After flashing registration.bin I’ve finished registration on my board and it looks like it was finished successful. I would like to upload the firmware (APP.bin) BUT I cannot do it, when I start process of uploading in ESP Download Tool it gives me the error: `14-already flash or encrypt or secure boot.` and at this moment I cannot upload any firmware. Please help me ....... !!???

Hello , That's because your ESP Download Tool version is not intended for Dev users.

You need to download ESP Download Tool version 3.6.5 or click on this link:

https://esprtk.files.wordpress.com/2020/05/serial_download_tool.zip

The ESP Download Tool version 3.6.5 is intended for DEV and it will allow the user to download any firmware (encrypted or unencrypted).

Cancel and reuse

Cancel and reuse

  When users want to stop using ESPrtk to use ESP32 for other purposes. They will have to Flash ESP32 for their project, but this violates the security process on ESPrtk , if the user try to FLash the program not Firmware file of ESPrtk, ESP32 will not run.

After Cancel success:
Users can use ESP32 as usual (eg compiling projects on Arduino-IDE and uploading). And user can still go back to using ESP32 like ESPrtk by Re-register and Reload ESPrtk Firmware file. (If the ESPrtk has been activated, the old key can be used to reactivate without purchasing a new one. )

See more : Cancel and Re-register ESPrtk.

The firmware update procedure for use as a device with full functionality of ESPrtk manufacturer.

There has been a change in the usage and loading (flash) ESPrtk firmware since version 2.7.2.
This change stems from the system security needs and the size of the new update has exceeded the 4MByte limit of the Flash chip on ESP32.
Program files run once ( as Register or Login ) will be separated from the main program, this will free up more space for the Firmware file and allow integration of advanced security features and utility of IDF from Espressif on it. .

Please read carefully before start uploading firmware for ESP32.

 

Usage and life cycle of ESPrtk software.

The steps to flash Firmware on ESP32 are as follows:
Register  -> Update firmware 1. -> Update firmware 2 -> …-> Update firmware N. 
This is an irreversible process, uploading ESP32 firmware must follow this order.

After user confirming registration to use ESP32 like ESPrtk, ESP32 will enter protected Flash reading mode and only accept uploading of Firmware file from the manufacturer. This will help ESPrtk be more secure. 

 (ESPrtk Developer, ESPrtk user or ESPrtk manufacturer  is called User.)

Step 1 – Register:

User must prepare a new ESP32 chip and upload the Register.bin file to ESP32.This file will permanently burn registration information to EFUSE of ESP32.

(ESP32 chip is called “New” when it has not registered successfully before. It doesn’t matter when and how long it was bought.
Users of ESPrtk version 2.5.x, 2.6.x and 2.7.0.2 if not registered are also called New chips.)

Upload fail:

If ESP32 does not export the notification data, it seems to have an upload error. In this case,  user is allowed to reload the Register.bin file to ESP32 if the previous upload failed.

Upload successfully:

After uploading to Register.bin and restarting ESP32.  ESP32 requires confirmation of the registration from the user side (via Serial port (TX-UART0 -baudrate 230400 ) by press and hold on the CWB button in 5 seconds. After registration is completed,ESP32 will export a completed notification (Register Done ..) .

Since this time, ESP32 is in the “Registered-Done” state and does not need to register further.
This means that the registration will only need to be performed once per ESP32 chip.(Unless users want to re-register because they have previously canceled, see more : Cancel and Re-register ESPrtk. )
Now ESP32 needs to update Firmware.

Step 2 – Upload / Update Firmware:

This is the last step.
 Users need to upload the program file for ESPrtk. Theyy are  App.bin and Data.bin file. They collectively called the Firmwares file.

Users are only allowed to upload the Firmwares file when ESP32 is in “Registered-Done”  state  (pass step 1) or needing update other Firmware.

  After upload Firmware files and restarting ESP32. ESP32 will export a  completed notification (ESPrtk information..) via Serial port (TX-UART0 -baudrate 230400 ) .

Upload fail:

If ESP32 does not export the notification data, it seems to have an upload error. In this case,  user is allowed to reload the Firmware files to ESP32 if the previous upload failed.
Upload successfully:

  Since this time. ESP32 is in the “Upload Firmware Success” state.

Now ESP32 is ESPrtk and ready to use.

  Update firmware:

Users may need to update patches or upgrade new features.  They can upload files of Firmwares files with different version numbers and unlimited limit of uploads.To update the new firmware, users only need to repeat uploading the new file App.bin/ Data.bin, (the partition address and upload configuration are the same as the first update of Firmwares in Step 2 above).

 

Steps to upload .bin files for ESPrtk.

 To use ESP32 as ESPrtk. User need to do these steps: 

  • Step 0 : Prepare hardware.
  • Step 1: Upload Register.bin file  and confirm registration.
  • Step 2 : Upload Firmware files (can be uploaded several times).
  • Step 3 : Go to Web config and create new profile account and use.

To upload .bin files for ESP32, we will use “Flash Download Tools” software, This is the tool provided by Espressif (ESP32 manufacturer).

If you don’t know how to use this tool, read this tutorial to learn how to upload an example:  How to use Flash Download Tools to flash .bin file for ESP32.

Dowload .bin fileLink
Register.bin
App.bin
Data.bin
Flash Download Tools + Serial Port Utility.exe

( To download firmware with other themes , clich here )

Step 0 – Prepare hardware.:

GPIO13 pin is connected to 10 K resistor holding Pullup and CWB button. 

Release CWB (no press and no hold) with high Logic voltage level.

Press and hold CWB with low Logic voltage level.

See more circuit here :  Create an ESPrtk board from any ESP32 development boards.

Step 1 – Register:

Need perform this step if ESP32 is new chip .

(  If ESP32 only needs to update the Firmware, skip  this step and  go to Step 2 ).

After step 1 , ESP32 in “Registered-Done” state.

Upload configure: 

Number of bin file1
Register.bin address offset0x0
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

After flash Register.bin file.

 Open Serial Terminal and press Reset ESP32 . CWB button must be release. (no press and no  hold). 

The ESP32 will start UART0 at 2 different baudrates. The first baudrate is 115200 bps with manufacturer configuration description state, flash read state, CHIP status ... It looks like this at 115200 baudrate.

In the next stage, ESPrtk will change the baudrate of the ESP32 to 230400 and go into automatic hardware test mode, GPIO error scan, EFUSE scan, RF test and calibration (Bluetooth + WIFI) ..... , check the CWB button should be in release state (connected to 3.3v). If all goes well, a confirmation message will appear at baudrate 230400 and wait until the user presses the CWB button to continue.

[Error ]: [ If you do not see the bellow message appear at baudrate 230400. This means that the Register.bin file was not Flashed correctly. The only reason is that the power supply for the ESP32 is not enough power. So make sure to maintain a minimum 3.3v (500mA) power supply for the ESP32 chip. Flash again until ESP32 respone status at baudrate 230400.
Also don't forget , the ESP32 chip should be the ESP32-D0WD or ESP32-D0WD-Q6 (it's insided the ESP32-WROOM-32D or ESP32-WROOM-32U or ESP32-WROOM-32UE or ESP32-WROOM-32E or NINA W106 Ublox module) ]

Now ESP32 requires confirmation of the registration.

To confirm registration , hold on the CWB button in 5 seconds., then you can release CWB button and wait until ESP32 print out  ( Register Done…) message .

If it does not work , you can press Reset ESP32 then try again as above .

See video below:

After hold CWB button in 5 second, ESP32 will start register process.( total time to wait can up to 30 second. )
When you see the line "Register Done !" it mean the register process was done (success).

After register progress done, when restart ESP32 , if you see ESP32 repeat an error message reading Flash like this at baudrate 115200:

That means the registration is successful and ESP32 only accept ESPrtk ‘s Firmware, so you need to upload the Firmware file.

Step 2 – Upload or Update Firmware:

After registering, upload 2 files of App.bin and Data.bin to use.
Note: App.bin and Data.bin must have the same version, otherwise ESPrtk will not work.

Since this time. ESP32 is in the “Upload Firmware Success” state.

Upload configure: 

Number of bin file2
App.bin address offset0x0
Data.bin address offset 0x350000
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

See video below:

Step 3 -Go to Web config and create new profile account and use.

After loading the program and connecting ESP32 as an ESPrtk circuit board, you can start using it. Start  WEB Configure , goto Profile and login with account ( Name : admin , Password : abc123ABC ) , then you can visit and start using the web configure interface. 

Now to start using the full feature on ESPrtk, you need to enable it (even you are using Free or Purchase ESPrtk’s firmware ). To do this, click here to continue: Get KEY file to activate ESPrtk.

See video below:

Unable to enter firmware update mode.

ESP32 enter the firmware update mode by following these steps:

-#1 Pull GPIO0 pin down to 0v and hold it until the update is complete.

-#2 Reset ESP32 to enter firmware update mode.

-#3 Update the firmware via the UART_0 port.

-#4 Update complete.

ESP32 cannot enter firmware update mode because GPIO0 pin is not pulled down low before reset. On ESPrtk 3.0.0 version, GPIO0 pin is used as CS-SPI output pin for Ethernet module, so when updating firmware for ESPrtk it is necessary to disconnect power to Ethernet or disconnect GPIO0 to CS-SPI pin. -Ethernet to ensure GPIO0 will be pulled low during the firmware update process.

When designing PCB for your final projects, remember to add a switch or jupmer for the GPIO0 pin to ensure it can pull the GPIO0 pin low during the firmware update. You can refer to the proposed connection block diagram in the datasheet for more info.

Voltage problem:

ESP32 needs to be supplied with the voltage maintained at 3.0 -> 3.5 Volt. In some cases. Pulling GPIO0 to 0Volt may not be enough.

Using too many devices on the same power supply bus on the circuit as ECN28J60 / W5500 + LoRa + GNSS + OLED ...., (while the voltage source is limited output power) can cause the voltage to be applied on ESP32 was not enough for ESP32 to enter firmware download mode.

So, maybe, you need to disconnect the power supply for other devices that are sharing the source bus with ESP32 before pulling the GPIO0 pin down.


..... After flashing registration.bin I’ve finished registration on my board and it looks like it was finished successful. I would like to upload the firmware (APP.bin) BUT I cannot do it, when I start process of uploading in ESP Download Tool it gives me the error: `14-already flash or encrypt or secure boot.` and at this moment I cannot upload any firmware. Please help me ....... !!???

Hello , That's because your ESP Download Tool version is not intended for Dev users.

You need to download ESP Download Tool version 3.6.5 or click on this link:

https://esprtk.files.wordpress.com/2020/05/serial_download_tool.zip

The ESP Download Tool version 3.6.5 is intended for DEV and it will allow the user to download any firmware (encrypted or unencrypted).

Cancel and reuse

Cancel and reuse

  When users want to stop using ESPrtk to use ESP32 for other purposes. They will have to Flash ESP32 for their project, but this violates the security process on ESPrtk , if the user try to FLash the program not Firmware file of ESPrtk, ESP32 will not run.

After Cancel success:
Users can use ESP32 as usual (eg compiling projects on Arduino-IDE and uploading). And user can still go back to using ESP32 like ESPrtk by Re-register and Reload ESPrtk Firmware file. (If the ESPrtk has been activated, the old key can be used to reactivate without purchasing a new one. )

See more : Cancel and Re-register ESPrtk.

The firmware update procedure for use as a device with full functionality of ESPrtk manufacturer.

There has been a change in the usage and loading (flash) ESPrtk firmware since version 2.7.2.
This change stems from the system security needs and the size of the new update has exceeded the 4MByte limit of the Flash chip on ESP32.
Program files run once ( as Register or Login ) will be separated from the main program, this will free up more space for the Firmware file and allow integration of advanced security features and utility of IDF from Espressif on it. .

Please read carefully before start uploading firmware for ESP32.

 

Usage and life cycle of ESPrtk software.

The steps to flash Firmware on ESP32 are as follows:
Register  -> Update firmware 1. -> Update firmware 2 -> …-> Update firmware N. 
This is an irreversible process, uploading ESP32 firmware must follow this order.

After user confirming registration to use ESP32 like ESPrtk, ESP32 will enter protected Flash reading mode and only accept uploading of Firmware file from the manufacturer. This will help ESPrtk be more secure. 

 (ESPrtk Developer, ESPrtk user or ESPrtk manufacturer  is called User.)

Step 1 – Register:

User must prepare a new ESP32 chip and upload the Register.bin file to ESP32.This file will permanently burn registration information to EFUSE of ESP32.

(ESP32 chip is called “New” when it has not registered successfully before. It doesn’t matter when and how long it was bought.
Users of ESPrtk version 2.5.x, 2.6.x and 2.7.0.2 if not registered are also called New chips.)

Upload fail:

If ESP32 does not export the notification data, it seems to have an upload error. In this case,  user is allowed to reload the Register.bin file to ESP32 if the previous upload failed.

Upload successfully:

After uploading to Register.bin and restarting ESP32.  ESP32 requires confirmation of the registration from the user side (via Serial port (TX-UART0 -baudrate 230400 ) by press and hold on the CWB button in 5 seconds. After registration is completed,ESP32 will export a completed notification (Register Done ..) .

Since this time, ESP32 is in the “Registered-Done” state and does not need to register further.
This means that the registration will only need to be performed once per ESP32 chip.(Unless users want to re-register because they have previously canceled, see more : Cancel and Re-register ESPrtk. )
Now ESP32 needs to update Firmware.

Step 2 – Upload / Update Firmware:

This is the last step.
 Users need to upload the program file for ESPrtk. Theyy are  App.bin and Data.bin file. They collectively called the Firmwares file.

Users are only allowed to upload the Firmwares file when ESP32 is in “Registered-Done”  state  (pass step 1) or needing update other Firmware.

  After upload Firmware files and restarting ESP32. ESP32 will export a  completed notification (ESPrtk information..) via Serial port (TX-UART0 -baudrate 230400 ) .

Upload fail:

If ESP32 does not export the notification data, it seems to have an upload error. In this case,  user is allowed to reload the Firmware files to ESP32 if the previous upload failed.
Upload successfully:

  Since this time. ESP32 is in the “Upload Firmware Success” state.

Now ESP32 is ESPrtk and ready to use.

  Update firmware:

Users may need to update patches or upgrade new features.  They can upload files of Firmwares files with different version numbers and unlimited limit of uploads.To update the new firmware, users only need to repeat uploading the new file App.bin / Data.bin, (the partition address and upload configuration are the same as the first update of Firmwares in Step 2 above).

 

Steps to upload .bin files for ESPrtk.

 To use ESP32 as ESPrtk. User need to do these steps: 

  • Step 0 : Prepare hardware.
  • Step 1: Upload Register.bin file  and confirm registration.
  • Step 2 : Upload Firmware files (can be uploaded several times).
  • Step 3 : Go to Web config and create new profile account and use.

To upload .bin files for ESP32, we will use “Flash Download Tools” software, This is the tool provided by Espressif (ESP32 manufacturer).

If you don’t know how to use this tool, read this tutorial to learn how to upload an example:  How to use Flash Download Tools to flash .bin file for ESP32.

Dowload .bin fileLink
Register.bin
App.bin
Data.bin
Flash Download Tools .exe
Serial Port Utility Application .exe

( To download firmware with other themes , clich here )

Step 0 – Prepare hardware.:

GPIO13 pin is connected to 10 K resistor holding Pullup and CWB button. 

Release CWB (no press and no hold) with high Logic voltage level.

Press and hold CWB with low Logic voltage level.

See more circuit here :  Create an ESPrtk board from any ESP32 development boards.

Step 1 – Register:

Need perform this step if ESP32 is new chip .

(  If ESP32 only needs to update the Firmware, skip  this step and  go to Step 2 ).

After step 1 , ESP32 in “Registered-Done” state.

Upload configure: 

Number of bin file1
Register.bin address offset0x0
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

After flash Register.bin file.

 Open Serial Terminal and press Reset ESP32 . CWB button must be release. (no press and no  hold). 

The ESP32 will start UART0 at 2 different baudrates. The first baudrate is 115200 bps with manufacturer configuration description state, flash read state, CHIP status ... It looks like this at 115200 baudrate.

In the next stage, ESPrtk will change the baudrate of the ESP32 to 230400 and go into automatic hardware test mode, GPIO error scan, EFUSE scan, RF test and calibration (Bluetooth + WIFI) ..... , check the CWB button should be in release state (connected to 3.3v). If all goes well, a confirmation message will appear at baudrate 230400 and wait until the user presses the CWB button to continue.

[Error ]: [ If you do not see the bellow message appear at baudrate 230400. This means that the Register.bin file was not Flashed correctly. The only reason is that the power supply for the ESP32 is not enough power. So make sure to maintain a minimum 3.3v (500mA) power supply for the ESP32 chip. Flash again until ESP32 respone status at baudrate 230400.
Also don't forget , the ESP32 chip should be the ESP32-D0WD or ESP32-D0WD-Q6 (it's insided the ESP32-WROOM-32D or ESP32-WROOM-32U or ESP32-WROOM-32UE or ESP32-WROOM-32E or NINA W106 Ublox module) ]

Now ESP32 requires confirmation of the registration.

To confirm registration , hold on the CWB button in 5 seconds., then you can release CWB button and wait until ESP32 print out  ( Register Done…) message .

If it does not work , you can press Reset ESP32 then try again as above .

See video below:

After hold CWB button in 5 second, ESP32 will start register process. ( total time to wait can up to 30 second. )
When you see the line "Register Done !" it mean the register process was done (success).

After register progress done, when restart ESP32 , if you see ESP32 repeat an error message reading Flash like this at baudrate 115200:

That means the registration is successful and ESP32 only accept ESPrtk ‘s Firmware, so you need to upload the Firmware file.

Step 2 – Upload or Update Firmware:

After registering, upload 2 files of App.bin and Data.bin to use.
Note: App.bin and Data.bin must have the same version, otherwise ESPrtk will not work.

Since this time. ESP32 is in the “Upload Firmware Success” state.

Upload configure: 

Number of bin file2
App.bin address offset0x0
Data.bin address offset 0x350000
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

See video below:

Step 3 -Go to Web config and create new profile account and use.

After loading the program and connecting ESP32 as an ESPrtk circuit board, you can start using it. Start  WEB Configure , goto Profile and login with account ( Name : admin , Password : abc123ABC ) , then you can visit and start using the web configure interface. 

Now to start using the full feature on ESPrtk, you need to enable it (even you are using Free or Purchase ESPrtk’s firmware ). To do this, click here to continue: Get KEY file to activate ESPrtk.

See video below:

Unable to enter firmware update mode.

ESP32 enter the firmware update mode by following these steps:

-#1 Pull GPIO0 pin down to 0v and hold it until the update is complete.

-#2 Reset ESP32 to enter firmware update mode.

-#3 Update the firmware via the UART_0 port.

-#4 Update complete.

ESP32 cannot enter firmware update mode because GPIO0 pin is not pulled down low before reset. On ESPrtk 3.0.0 version, GPIO0 pin is used as CS-SPI output pin for Ethernet module, so when updating firmware for ESPrtk it is necessary to disconnect power to Ethernet or disconnect GPIO0 to CS-SPI pin. -Ethernet to ensure GPIO0 will be pulled low during the firmware update process.

When designing PCB for your final projects, remember to add a switch or jupmer for the GPIO0 pin to ensure it can pull the GPIO0 pin low during the firmware update. You can refer to the proposed connection block diagram in the datasheet for more info.

Voltage problem:

ESP32 needs to be supplied with the voltage maintained at 3.0 -> 3.5 Volt. In some cases. Pulling GPIO0 to 0Volt may not be enough.

Using too many devices on the same power supply bus on the circuit as ECN28J60 / W5500 + LoRa + GNSS + OLED ...., (while the voltage source is limited output power) can cause the voltage to be applied on ESP32 was not enough for ESP32 to enter firmware download mode.

So, maybe, you need to disconnect the power supply for other devices that are sharing the source bus with ESP32 before pulling the GPIO0 pin down.


..... After flashing registration.bin I’ve finished registration on my board and it looks like it was finished successful. I would like to upload the firmware (APP.bin) BUT I cannot do it, when I start process of uploading in ESP Download Tool it gives me the error: `14-already flash or encrypt or secure boot.` and at this moment I cannot upload any firmware. Please help me ....... !!???

Hello , That's because your ESP Download Tool version is not intended for Dev users.

You need to download ESP Download Tool version 3.6.5 or click on this link:

https://esprtk.files.wordpress.com/2020/05/serial_download_tool.zip

The ESP Download Tool version 3.6.5 is intended for DEV and it will allow the user to download any firmware (encrypted or unencrypted).

Cancel and reuse

Cancel and reuse

  When users want to stop using ESPrtk to use ESP32 for other purposes. They will have to Flash ESP32 for their project, but this violates the security process on ESPrtk , if the user try to FLash the program not Firmware file of ESPrtk, ESP32 will not run.

After Cancel success:
Users can use ESP32 as usual (eg compiling projects on Arduino-IDE and uploading). And user can still go back to using ESP32 like ESPrtk by Re-register and Reload ESPrtk Firmware file. (If the ESPrtk has been activated, the old key can be used to reactivate without purchasing a new one. )

See more : Cancel and Re-register ESPrtk.

The firmware update procedure for use as a device with full functionality of ESPrtk manufacturer.

There has been a change in the usage and loading (flash) ESPrtk firmware since version 2.7.2.
This change stems from the system security needs and the size of the new update has exceeded the 4MByte limit of the Flash chip on ESP32.
Program files run once ( as Register or Login ) will be separated from the main program, this will free up more space for the Firmware file and allow integration of advanced security features and utility of IDF from Espressif on it. .

Please read carefully before uploading firmware for ESP32.

 

Usage and life cycle of ESPrtk software.

The steps to flash Firmware on ESP32 are as follows:
Register  -> Update firmware 1. -> Update firmware 2 -> …-> Update firmware N. 
This is an irreversible process, uploading ESP32 firmware must follow this order.

After user confirming registration to use ESP32 like ESPrtk, ESP32 will enter protected Flash reading mode and only accept uploading of Firmware file from the manufacturer. This will help ESPrtk be more secure. 

 (ESPrtk Developer, ESPrtk user or ESPrtk manufacturer  is called User.)

Step 1 – Register:

User must prepare a new ESP32 chip and upload the Register.bin file to ESP32.This file will permanently burn registration information to EFUSE of ESP32.

(ESP32 chip is called “New” when it has not registered successfully before. It doesn’t matter when and how long it was bought.
Users of ESPrtk version 2.5.x, 2.6.x and 2.7.0.2 if not registered are also called New chips.)

Upload fail:

If ESP32 does not export the notification data, it seems to have an upload error. In this case,  user is allowed to reload the Register.bin file to ESP32 if the previous upload failed.

Upload successfully:

After uploading to Register.bin and restarting ESP32.  ESP32 requires confirmation of the registration from the user side (via Serial port (TX-UART0 -baudrate 230400 ) by press and hold on the CWB button in 5 seconds. After registration is completed,ESP32 will export a completed notification (Register Done ..) .

Since this time, ESP32 is in the “Registered-Done” state and does not need to register further.
This means that the registration will only need to be performed once per ESP32 chip.(Unless users want to re-register because they have previously canceled, see more : Cancel and Re-register ESPrtk. )
Now ESP32 needs to update Firmware.

Step 2 – Upload / Update Firmware:

This is the last step.
 Users need to upload the program file for ESPrtk. Theyy are  App.bin and Data.bin file. They collectively called the Firmwares file.

Users are only allowed to upload the Firmwares file when ESP32 is in “Registered-Done”  state  (pass step 1) or needing update other Firmware.

  After upload Firmware files and restarting ESP32. ESP32 will export a  completed notification (ESPrtk information..) via Serial port (TX-UART0 -baudrate 230400 ) .

Upload fail:

If ESP32 does not export the notification data, it seems to have an upload error. In this case,  user is allowed to reload the Firmware files to ESP32 if the previous upload failed.
Upload successfully:

  Since this time. ESP32 is in the “Upload Firmware Success” state.

Now ESP32 is ESPrtk and ready to use.

  Update firmware:

Users may need to update patches or upgrade new features.  They can upload files of Firmwares files with different version numbers and unlimited limit of uploads.To update the new firmware, users only need to repeat uploading the new file App.bin / Data.bin, (the partition address and upload configuration are the same as the first update of Firmwares in Step 2 above).

 

Steps to upload .bin files for ESPrtk.

 To use ESP32 as ESPrtk. User need to do these steps: 

  • Step 0 : Prepare hardware.
  • Step 1: Upload Register.bin file  and confirm registration.
  • Step 2 : Upload Firmware files (can be uploaded several times).
  • Step 3 : Go to Web config and create new profile account and use.

To upload .bin files for ESP32, we will use “Flash Download Tools” software, This is the tool provided by Espressif (ESP32 manufacturer).

If you don’t know how to use this tool, read this tutorial to learn how to upload an example:  How to use Flash Download Tools to flash .bin file for ESP32.

Dowload .bin fileLink
Register.bin
App.bin
Data.bin
Flash Download Tools .exe
Serial Port Utility Application .exe

( To download firmware with other themes , clich here )

Step 0 – Prepare hardware.:

GPIO13 pin is connected to 10 K resistor holding Pullup and CWB button. 

Release CWB (no press and no hold) with high Logic voltage level.

Press and hold CWB with low Logic voltage level.

See more circuit here :  Create an ESPrtk board from any ESP32 development boards.

Step 1 – Register:

Need perform this step if ESP32 is new chip .

(  If ESP32 only needs to update the Firmware, skip  this step and  go to Step 2 ).

After step 1 , ESP32 in “Registered-Done” state.

Upload configure: 

Number of bin file1
Register.bin address offset0x0
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

After flash Register.bin file.

 Open Serial Terminal and press Reset ESP32 . CWB button must be release. (no press and no  hold). 

Now ESP32 requires confirmation of the registration.

To confirm registration , hold on the CWB button in 5 seconds., then you can release CWB button and wait until ESP32 print out  ( Register Done…) message .

If it does not work , you can press Reset ESP32 then try again as above .

See video below:

After hold CWB button in 5 second, ESP32 will start register process.( total time to wait can up to 30 second. )
When you see the line "Register Done !" it mean the register process was done (success).

After register progress done, when restart ESP32 , if you see ESP32 repeat an error message reading Flash like this at baudrate 115200:

That means the registration is successful and ESP32 only accept ESPrtk ‘s Firmware, so you need to upload the Firmware file.

Step 2 – Upload or Update Firmware:

After registering, upload 2 files of App.bin and Data.bin to use.
Note: App.bin and Data.bin must have the same version, otherwise ESPrtk will not work.

Since this time. ESP32 is in the “Upload Firmware Success” state.

Upload configure: 

Number of bin file2
App.bin address offset0x0
Data.bin address offset 0x225000
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

See video below:

Step 3 -Go to Web config and create new profile account and use.

After loading the program and connecting ESP32 as an ESPrtk circuit board, you can start using it. Go to WEBconfigure and create a new profile to confirm that you are its owner, then you can visit and start using the web configure interface. 

Now to start using the full feature on ESPrtk, you need to enable it (even you are using Free or Purchase ESPrtk’s firmware ). To do this, click here to continue: Get KEY file to activate ESPrtk.

See video below:


..... After flashing registration.bin I’ve finished registration on my board and it looks like it was finished successful. I would like to upload the firmware (APP.bin) BUT I cannot do it, when I start process of uploading in ESP Download Tool it gives me the error: `14-already flash or encrypt or secure boot.` and at this moment I cannot upload any firmware. Please help me ....... !!???

Hello , That's because your ESP Download Tool version is not intended for Dev users.

You need to download ESP Download Tool version 3.6.5 or click on this link:

https://esprtk.files.wordpress.com/2020/05/serial_download_tool.zip

The ESP Download Tool version 3.6.5 is intended for DEV and it will allow the user to download any firmware (encrypted or unencrypted).

For users  under 2.7.2 version.

If you are a user who purchased the KEY file to activate ESPrtk on the 2.5.x, 2.6.x and 2.7.0.2 versions.
If you want to update the new firmware (2.7.2 or higher), the old KEY file will not work. Don’t worry, this is just a version compatibility issue.
You need to recreate a new Profile and get the REQUEST file on the new updated version (2.7.2) and send it to us via email, we will resend you the free KEY file with the same  function  and date of use. 

Cancel and reuse

  When users want to stop using ESPrtk to use ESP32 for other purposes. They will have to Flash ESP32 for their project, but this violates the security process on ESPrtk , if the user try to FLash the program not Firmware file of ESPrtk, ESP32 will not run.

After Cancel success:
Users can use ESP32 as usual (eg compiling projects on Arduino-IDE and uploading). And user can still go back to using ESP32 like ESPrtk by Re-register and Reload ESPrtk Firmware file. (If the ESPrtk has been activated, the old key can be used to reactivate without purchasing a new one. )

See more : Cancel and Re-register ESPrtk.