I received the latest rev of boards about a month ago and have noticed that if I flash a simple main program, I'm unable to get the boards to reset back to factory firmware using BT1. Using the same sketch on the original board version (on 433Mhz) works when pressing/holding BTN1 to return to factory firmware.

Latest revision of boards (915Mhz) are not able to factory reset using BT1
Latest revision of boards (915Mhz) are not able to factory reset using BT1
Hi Mike,
Before suggesting a few steps, here a brief explanation how the factory firmware reset works:
The Factory Firmware is stored on the external SPI Flash memory, on the memory address 0x0007000 to 0x0007FFFF. This segment is also write-protected to prevent user to accidentally erase it.
During a factory reset, the bootloader will first identify the BT1 is being pressed during the boot (Restart of the Board). If the BT1 is being pressed for more than a few seconds it'll add to the MCU's EEPROM a "Program from SPI Flash" instruction and restart the board again - that's why you release the BT1 at this point.
The "Program from SPI Flash" instructions will be read on the next reboot. This instructions tells the bootloader to look on the "Factory Firmware" address in the SPI Flash (0x0007000) to see if there's a valid Firmware entry there.
The bootloader will verify the contents and if it's OK, it'll copy all to the MCU's main program memory area and reboot the board again.
All details about the Bootloader operation, including the source code can be found on the following repository: https://bitbucket.org/talk2/talk2boot - Note that this process is the same utilized when the user whishes to implement a Firmware Upgrade Over-the-air, the only extra step is that the user needs to implement their mechanism to send the data to the remote node and store it in the SPI Flash memory following the binary format explained on the bootloader documentation.
Now that I've (hopefully) clarified a bit of the Factory Reset operation, make sure you're fully restarting the board while holding firmly the BT1. The restart can be done by powering it OFF and powering ON or also by closing and opening the "Serial Monitor", which should trigger the MCU Reset. You should release the BT1 when you see the blue LED blinking very quickly... the Yellow/Orange LED will blick next, indicating the Firmware is being written to the MCU's memory.
If the procedure above does not work a few things might be wrong:
1. The BT1 (hardware) is faulty - very unlikely, but can happen. The BT1 and BT2 are pressed during the board production test as part of it self-programming.
2. The SPI Flash data is corrupted or has been replaced by the User*.
3. The EEPROM memory is falty - This can happen if the EEPROM is being over-user. This kind of memory has a life-span/endurance of 10K-100K writes (detailed info can be found on the MCU's datasheet). After that new data saved to the memory can become corrupted or produce unexpected results. Be careful when writing to EEPROM (or SPI Flash) to do not do it in an infinity loop.
Please let me know if that clarifies your question and help fixing the problem.
Cheers,
Before suggesting a few steps, here a brief explanation how the factory firmware reset works:
The Factory Firmware is stored on the external SPI Flash memory, on the memory address 0x0007000 to 0x0007FFFF. This segment is also write-protected to prevent user to accidentally erase it.
During a factory reset, the bootloader will first identify the BT1 is being pressed during the boot (Restart of the Board). If the BT1 is being pressed for more than a few seconds it'll add to the MCU's EEPROM a "Program from SPI Flash" instruction and restart the board again - that's why you release the BT1 at this point.
The "Program from SPI Flash" instructions will be read on the next reboot. This instructions tells the bootloader to look on the "Factory Firmware" address in the SPI Flash (0x0007000) to see if there's a valid Firmware entry there.
The bootloader will verify the contents and if it's OK, it'll copy all to the MCU's main program memory area and reboot the board again.
All details about the Bootloader operation, including the source code can be found on the following repository: https://bitbucket.org/talk2/talk2boot - Note that this process is the same utilized when the user whishes to implement a Firmware Upgrade Over-the-air, the only extra step is that the user needs to implement their mechanism to send the data to the remote node and store it in the SPI Flash memory following the binary format explained on the bootloader documentation.
Now that I've (hopefully) clarified a bit of the Factory Reset operation, make sure you're fully restarting the board while holding firmly the BT1. The restart can be done by powering it OFF and powering ON or also by closing and opening the "Serial Monitor", which should trigger the MCU Reset. You should release the BT1 when you see the blue LED blinking very quickly... the Yellow/Orange LED will blick next, indicating the Firmware is being written to the MCU's memory.
If the procedure above does not work a few things might be wrong:
1. The BT1 (hardware) is faulty - very unlikely, but can happen. The BT1 and BT2 are pressed during the board production test as part of it self-programming.
2. The SPI Flash data is corrupted or has been replaced by the User*.
3. The EEPROM memory is falty - This can happen if the EEPROM is being over-user. This kind of memory has a life-span/endurance of 10K-100K writes (detailed info can be found on the MCU's datasheet). After that new data saved to the memory can become corrupted or produce unexpected results. Be careful when writing to EEPROM (or SPI Flash) to do not do it in an infinity loop.
Please let me know if that clarifies your question and help fixing the problem.
Cheers,
Mikeder,
I know I've had to reset the boards more than once, some of the older ones and the newer ones (all 915 mhz ones). I've stuck to using pulling the power and holding down BT1 while I plug it back in. With that said, in my experience I've had to do it multiple times in the past to get it to work, but eventually it has always worked. Not sure if has been issues with holding down BT1 completely or what, but there have been times i've had to try 2 or 3 times, but in the end it has always worked.
I know I've had to reset the boards more than once, some of the older ones and the newer ones (all 915 mhz ones). I've stuck to using pulling the power and holding down BT1 while I plug it back in. With that said, in my experience I've had to do it multiple times in the past to get it to work, but eventually it has always worked. Not sure if has been issues with holding down BT1 completely or what, but there have been times i've had to try 2 or 3 times, but in the end it has always worked.