I bricked my board. Can I force the device into DFU mode?

Yes.  There are several ways to force the device into DFU mode if you somehow lock the board up with a faulty firmware image:

  • Quickly double-click the RESET button on the board
  • Set the DFU Pin to GND and reset the device (keeping DFU to GND during startup)
  • Connect to the USB CDC interface at 1200 baud and disconnect. This magic baud rate signals to the module that we want to reset into DFU mode.
  • Use the python script in 'tools/feather_dfu' to enter DFU mode: 
    $ python feather_dfu.py enter_dfu

Forcing the device into DFU mode should allow you to reflash the FeatherLib or user code and recover control of your hardware.

Note: You will know when you are in DFU mode since the on board status LED will start blinking at a rate of 5Hz.

What TLS Version does the WICED Feather support?

The WICED Feather supports the latest and greatest TLS 1.2 standard, which gives you access to the fastest and most secure encryption. It also supports TLS 1.1, TLS 1.0, and SSL 3.0.  SSL 2.0 is not supported.

The WICED Feather supports the following cipher suites with TLS 1.2:

  • TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
  • TLS_DHE_RSA_WITH_AES_256_CBC_SHA
  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_RSA_WITH_AES_256_CBC_SHA256
  • TLS_RSA_WITH_AES_256_CBC_SHA
  • TLS_RSA_WITH_AES_128_CBC_SHA256
  • TLS_RSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA

You can verify the TLS level yourself by pointing your WICED Feather to https://www.howsmyssl.com or https://www.ssllabs.com/ssltest/viewMyClient.html and examining the HTML output.  Note: You'll need to generate custom root certificates to access these domains, and you can read the output with the TLS/HttpCustomRootCA example.

When I try to build I'm getting: Cannot run program "{runtime.tools.arm-none-eabi-gcc.path}\bin\arm-none-eabi-g++" (in directory "."): CreateProcess error=2, The system cannot find the file specified

This is probably because you don't have the ARM Cortex M3 toolchain installed. Install the necessary GCC toolchain for ARM from the Arduino Board Manager via: Tools->Board->Board Manager then download Arduino SAM Boards (32-bits ARM Cortex-M3)

When I try to flash using USB DFU I get the following error from feather_dfu.py: Traceback (most recent call last): File "...\hardware\Adafruit_WICED_Arduino/tools/feather_dfu.py", line 1, in import usb.backend.libusb1

This is probably caused by an old version of pyusb. Update your pyusb version to 1.0b or higher via the following command:

$ pip install --upgrade pyusb

You also need to make sure that you have the libusb runtime dll installed on your system, which you can do via this libusb installer.  See the Windows Setup page for details on using this installer though.

My board isn't enumerating as a USB device, or is stuck in DFU mode. How can I re-flash the FeatherLib firmware directly using dfu-util and restore my device?

You can reflash FeatherLib from the command line by forcing your device into DFU mode. See the first FAQ on this page for various ways to do this.  Once in DFU mode (you'll know you're in DFU mode due to the constant blinky on the status LED), you can use dfu-util to flash a binary image to the WICED Feather using the following command syntax:

$ dfu-util -a 0 -s 0x08010000:leave -D featherlib.bin

0x08010000 is that start of the feather lib memory section (see the memory map in System Architecture in this learning guide for details).  To flash a user code binary you would change this value to 0x080E0000.  

The 'featherlib.bin' image is available in the 'stm32/featherlib' folder. If you were running this from inside the /tools/feather_dfu folder you would execute this command as follows:

$ dfu-util -a 0 -s 0x08010000:leave -D ../../stm32/featherlib/featherlib.bin

If you have more than one DFU capable device on your system you can specify the exact USB VID and PID by adding the following flag:

-d 239a:0008 

0x239A is the Vendor ID, and 0x0008 is the Product ID in DFU mode. You can verify the VID and PID values via `dfu-util --list`.

This should result in output resembling the following;

dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 239a:0008
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x08010000, size = 464516
Download        [=========================] 100%       464516 bytes
Download done.
File downloaded successfully
Error during download get_status

At this point you have reflashed the FeatherLib section of code, and you should be able to flash your own code from the Arduino IDE in the 'User Code' section of flash memory.

NOTE: The WICED Feather also requires a valid user sketch (some Arduino code) to run, so after flashing the FeatherLib you will also need to compile and flash a sketch from the Arduino IDE for your board to start running. Powering up a board with only FeatherLib but no user sketch will end up in a 'dead-end' situation since it can't find any user code to execute.
Note++: Unlike many other Arduino compatible boards, you don't need a serial port to flash sketches from the Arduino IDE! The WICED Feather uses USB DFU, NOT the serial port for firmware updates! Don't worry if you don't see a serial port when you are trying to flash a sketch the first time.

How can I reflash the bootloader with a JLink or STLink/V2 from the Arduino IDE?

To reflash the bootloader on your WICED Feather using the Arduino IDE perform the following steps:

First install AdaLink on your system, which is an abstraction layer that we provide to hide the details of different ARM hardware debuggers. If you have a choice, a Segger JLink is generally more reliable as a HW debugger and works across a larger variety of systems.  The STLink with OpenOCD has issues with OS X El Capitan due to the new USB stack, for example.

To connect an STLink/V2 to the WICED Feather:

  • Connect SWCLK on the STLink to SWCLK on the WICED Feather (which is a single 0.1" hole off the main header rail)
  • Connect SWDIO on the STLink to SWDIO on the WICED Feather
  • Connect GND on the STLink to GND on the WICED Feather
  • Connect RST on the STLink to RST on the WICED Feather
  • Power both the WICED Feather and STLink using USB

To connect a Segger J-Link to the WICED Feather:

  • Consult the Segger JLink SWD and SWO Pinout for your JLink
  • Connect SWCLK on the JLink to SWCLK on the WICED Feather (which is a single 0.1" hole off the main header rail)
  • Connect SWDIO on the JLink to SWDIO on the WICED Feather
  • Connect GND on the JLink to GND on the WICED Feather
  • Connect VTRef on the JLink to 3V on the WICED Feather (important!)
  • Connect RST on the JLink to RST on the WICED Feather
  • Power both the WICED Feather and JLink using USB

From the Arduino IDE:

  • Make sure 'Tools > Boards' is set to 'Adafruit WICED Feather'
  • In 'Tools > Programmer' select either 'STLinkV2 with AdaLink' or 'JLink with AdaLink'.
  • Click the 'Tools > Burn Bootloader' menu entry, which shoud use AdaLink and either the STLink/V2 or JLink to flash the bootloader on your board.

How can I flash the bootloader using AdaLink directly?

You can also flash the bootloader from the command-line using AdaLink directly.

  • Make sure AdaLink is properly setup on your system (see the readme file in the Github repo).
  • Find the bootloader.hex file in the stm32/bootloader folder.
  • Connect either a STLink/V2 or Segger JLink to your WICED Feather (see the FAQ entry above for connection details)
  • With the debugger connected and both the debugger and WICED Feather powered, enter the following command (adjusting the path to bootloader.hex if required):

For an STLink/V2:

  • adalink stm32f2 -p stlink -h bootloader.hex

For a Segger JLink:

  • adalink stm32f2 -p jlink -h bootloader.hex

You can check if AdaLink is properly connected to the WICED Feather with the following commands:

For an STLink/V2:

  • adalink stm32f2 -p stlink -i

For a Segger JLink:

  • adalink stm32f2 -p jlink -i

 

I get 'OSError: [Errno 2] No such file or directory OSError: [Errno 2] No such file or directory' when trying to use feather_dfu.py in the Arduino IDE. What should I do?

If you get the following error in the Arduino IDE when trying to flash a sketch, you probably don't have dfu-util installed on your system:

OSError: [Errno 2] No such file or directory
OSError: [Errno 2] No such file or directory

Install dfu-util as detailed in this guide for your target OS.

Last updated on 2017-04-11 at 05.07.24 PM Published on 2016-03-23 at 01.29.37 PM