Prior to resetting your S5D9 to the factory image, try and debug your connection using this guide. If the board boots, but fails on the network connection, look at this guide. Your binary may actually be working. Note that you will also see the 3 LEDs flashing for different problems, including if your board connection fails. If you want to continue with a factory reset because you suspect a corrupted or deleted image, you will need the following:
To intentionally create a problem for testing, I will delete the *.srec file that I updated using the AE-CLOUD1 Over The Air (OTA) tutorial.
With the binary deleted, the board displays 3 flashing LEDs.
Connect the debugger board to both a USB cable and the JTAG cable that connects to the S5D9. Plug the S5D9 into a USB cable for power. In my test, I am supply power to the S5D9 USB cable from my computer.
Download the binary and save it to your computer.
The file is 1,529 KB and is named s5d9_wifi_ota_app_bootloader_orig_combined.srec
Select the three dots to the start the process of finding your device.
Select Renesas from the drop-down menu.
Use the right scroll bar to move through the targets and find R7FS5D97E.
Under Interface, select SWD.
The speed is not critical. I’m selecting 4000.
Under Data File, select the three dots and find the binary you downloaded previously.
Press Program Device.
The file will be downloaded from your computer onto your S5D9 board.
You will see log messages like this:
Downloading C:\Users\craig\Documents\Renesas\AE-CLOUD1\Factory Reset\s5d9_wifi_ota_app_bootloader_orig_combined.srec to R7FS5D97E via SWD-Interface@4000kHz
Programming Thread started.
Device "R7FS5D97E" selected.
Found SWD-DP with ID 0x5BA02477
AP-IDR: 0x24770011, Type: AHB-AP
AHB-AP ROM: 0xE00FF000 (Base addr. of first ROM table)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
Debugger initialized successfully.
J-Link: Flash download: Flash programming performed for 2 ranges (655360 bytes)
J-Link: Flash download: Total time needed: 6.438s (Prepare: 0.127s, Compare: 0.093s, Erase: 0.000s, Program: 6.143s, Verify: 0.066s, Restore: 0.007s)
Programming Thread exited
Unplug the JTAG cable from the S5D9 board. Plug the WiFi module into the PMOD connector. Power on the board.
There should only be a single green LED on.
Network log shows no errors.
Log into Renesas IoT Sandbox Data Intelligence and check the dashboard.
Congratulations! You can now go back to hacking your board, safe in the knowledge that you can restore the board to the factory binary if you brick your board by loading a corrupted binary.