Recovering OpenSDA Boards With Windows 10
Recovering OpenSDA Boards With Windows 10
OpenSDA boards haven't had the best history with Windows 10, but fortunately, there's a way you can recover those boards with a new feature.
Join the DZone community and get the full member experience.Join For Free
Windows 8 and 10 have added a ‘feature’ to scan and index devices attached to the host machine. This means that bootloaders or MSD (Mass Storage Device) programming implementations on evaluation boards developed in the Windows 7 age might not be prepared for that — up to the point that it can impact the bootloader as outlined in Bricking and Recovering OpenSDA Boards in Windows 8 and 10. So far, one of the easiest ways to get out that situation was to use a Windows 7 machine. But if you only have a Windows 10 machine available, this article describes the needed steps to update the bootloader with Windows 10 host machines.
‘OpenSDA’ is the debug circuit and debug firmware used on many of the Freescale/NXP evaluation boards.
If it happens that your Windows 10 machine is affecting the bootloader, then the OpenSDA LED will blink an error code.
See https://mcuoneclipse.com/2016/08/01/bricking_and_recovering_opensda_boards_in_windows_8_and_10/ for a list of error codes.
Check the version of the bootloader on the board, which is available in bootloader mode:
To enter bootloader mode, power the board with the RESET button pressed.
Open theof the board:
If it is NOT showing the required 1.11 version, you have to upgrade the bootloader first.
To do this, unplug/disconnect the board from the host PC.
Next, we have to stop/disable several Windows 10 services that interfere with the bootloader.
Disable/Stop Windows Services
The issue is that Windows talks to the OpenSDA bootloader and confuses it. The Windows Services doing this are the ‘Storage Service,’ which scans storage devices, and the ‘Windows Search’ service, which tries to index the device for faster access.
First, use the computer management console (click on the Windows symbol in the taskbar, then type ‘computer management’):
Otherwise, you can find it here:
In the console, STOP the Storage Service:
Next, DISABLE the Windows Search Service: For this, use the ‘Properties’ context menu on that service and disable it for the startup (so it won’t run again):
Finally, STOP that service as well:
Now with these services stopped, we can update the bootloader to V1.11. The updated bootloader is available from the P&E website (http://www.pemicro.com/opensda/):
Download that file and extract it. Extract the ‘OpenSDA_Bootloader_Update*.zip’ inside that zip file as well.
Then update the bootloader (see “Step-by-Step: Updating OSBDM/OSJTAG Debug Firmware“):
- Power the Board with the RESET button pressed on the OpenSDA USB port.
- Copy the BOOTUPDATEAPP_Pemicro_v111.SDA to the board drive.
- Unplug the board/cable.
- Plug it in again in a normal way (no buttons pressed!).
- Unplug it again and this time, plug it in with the RESET button pressed to get it into Bootloader mode. The green LED should blink now with about 1 Hz.
Check now theagain, it should show the new bootloader version:
Congratulations, now the bootloader is ‘Windows 10 aware’.
This is kind of optional — if you want to keep Windows searching and optimizing your drives.
We can re-enable the ‘Windows Search’ service again in the management console. For this, set it back in the properties to ‘automatic’:
Then start the service again:
Loading Debug Firmware
The last step is to load/update the OpenSDA debug firmware (e.g. Segger or P&E). To load the P&E firmware, while the board is in Bootloader mode, e.g. copy the matching firmware to your board. For my FRDM-KL46Z board, it is: MSD-DEBUG-FRDM-KL46Z48M_Pemicro_v114.SDA
Here again, I can verify with the SDA_INFO.HTM whether that firmware has been properly loaded:
Windows 10 tries to talk to the OpenSDA bootloader/debug app and might confuse it and basically can brick the device. Usually, a Windows 7 machine was necessary to recover such a board. With the above steps (disabling services, updating bootloader), it is now possible to update the bootloader to make it work properly in a Windows 10 environment.
- Bricking and Recovering OpenSDA Boards in Windows 8 and 10
- NXP OpenSDA: http://www.nxp.com/opensda
- Adding a Delay to the ARM DAPLink Bootloader
- P&E Binaries: http://www.pemicro.com/opensda/
- Step-by-Step: Updating OSBDM/OSJTAG Debug Firmware
Published at DZone with permission of Erich Styger , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.