Skip navigation
Home > All Places > WICED Studio Wi-Fi/Combo > WICED Studio Wi-Fi/Combo Forums > Blog > 2017 > October
2017

On WICED Studio 5.2.0, when download_apps is used, the make process may encounter a segmentation fault.

 

We have discovered that both of the following make entries create a segmentation fault under both Mac and Linux operating systems:

./make BCM943364WCD1 download_apps
./make BCM943364WCD1 download download_apps

ex.

"./tools/common/Linux64/mkdir" -p build/eclipse_debug/

"./tools/common/Linux64/cp" -f build/waf.bootloader-NoOS-BCM943364WCD1/binary/waf.bootloader-NoOS-BCM943364WCD1.elf build/eclipse_debug/last_bootloader.elf

Segmentation fault (core dumped)

make: *** [main_app] Error 139

 

What we've discovered is that the segmentation fault occurs when other processes are running concurrently with the following rule in wiced_apps.mk

APPS_LOOKUP_TABLE_RULES

The fix for this issued is attached and should replace the standard_platform_target.mk in the following location: tools/makefiles/standard_platform_targets.mk

Note: This issue has been resolved in SDK 6.0.0

To evaluate USB operation on the CYW943907AEVAL1F, the following hardware modification / connections need to be made:

  1. USB Bootstrapping
  2. Power Distribution IC
  3. USB Type A Connector
  4. USB Host/Device Select

 

1. USB Bootstrapping

GPIO_9 is a bootstrapping option to choose between HSIC PHY and USB PHY. Pull this pin up with a 4.7k resistor to enable USB PHY and power cycle the board for the bootstrapping to take effect.

USB/HSIC Sel : 0 = HSIC PHY

                          1 = USB PHY

 

2. Power Distribution IC

When operating as a USB host, it is recommended to use a power distribution IC to control power delivery to the USB device. The USB driver will not function if the power distribution IC is not present.

 

Wire up an external power distribution IC and make the necessary changes in the platform.h file. A possible option for the power distribution IC is the TPS2051BDBVR, example application circuit pictured below.

 

In platforms/CYW943907AEVAL1F/platform.h, change

#define WICED_USB_HOST_OVERCURRENT      (WICED_GPIO_NONE) /* No GPIO available, must use controller */

#define WICED_USB_HOST_POWER_ENABLE     (WICED_GPIO_NONE) /* No GPIO available, must use controller */

to

#define WICED_USB_HOST_OVERCURRENT      (WICED_GPIO_1)

#define WICED_USB_HOST_POWER_ENABLE     (WICED_GPIO_2)

 

 

For evaluation purposes, we can bypass the power distribution IC requirement. Doing so will increase the risk of damage to the eval board and the USB device. Proceed with this option only if you accept the risks.

Pull WICED_USB_HOST_POWER_ENABLE pin low through a 10k resistor (based on the pin defined in platform.h)

Pull WICED_USB_HOST_OVERCURRENT pin high through a 4.7k resistor (based on the pin defined in platform.h)

Modify platform.h as mentioned above

 

3. USB Type A Connector

Device Mode

Option 1 - Using the on-board Micro USB receptacle:

Rework R26 and R56, move both resistors from position A-C to position B-C

Note: This disconnects the Micro USB receptacle from the FTDI IC, you will not be able download or view UART traces through the USB port until the resistors are moved back to the A-C position. You can still download to the CYW943907 via JTAG and view UART traces using an external UART-USB adapter.

Visit OpenOCD -WICED for instructions on how to download via JTAG

 

Option 2 - Using a modified USB cable:

Connect a USB cable to the DN/DP signals on the WICED header (J6.43 and J6.44)

Connect USB VCC to VIN_EXT (J9.8) and USB GND to any available ground (J9.6)

Note: This option may affect USB signal integrity

Host Mode

Option 1 - Using the on-board Micro USB receptacle:

The micro USB receptacle on the CYW943907AEVAL1F eval kit is of type Micro-B. This is sufficient if the CYW943907 is acting as a device, but not as a host.

Replace J5 with a Micro USB Type AB receptacle

Rework R26 and R56, move both resistors from position A-C to position B-C (Same as Device Mode Option 1)

Populate R66 with a 0R resistor. The R66 pads can be found on the underside of the eval board, near the uSD card socket

Use a Micro-A male to Type A receptacle adapter such as USB OTG Cable - Female A to Micro A - 4" - CAB-11604 - SparkFun Electronics (Using a Micro-A plug should properly pull USB2_HOST_DEV_SEL high)

If using a power distribution IC, connect the VCC from the USB cable to the 5V output of the IC. Otherwise connect VCC from the USB cable to VIN_EXT (J9.6)

Provide 5V to the DC barrel jack (J8). Make sure the DC power supply is center positive.

 

Option 2 - Using a modified USB cable:

Connect a USB cable to the DN/DP signals on the WICED header (J6.43 and J6.44)

If using a power distribution IC, connect the VCC from the USB cable to the 5V output of the IC. Otherwise connect VCC from the USB cable to VIN_EXT (J9.6)

Connect USB GND to any available ground (J9.6)

Provide 5V to the DC barrel jack (J8). Make sure the DC power supply is center positive.

Note: This option may affect USB signal integrity

4. USB  Host/Device Select

The CYW943907 will operate in 'Host' mode or 'Device' mode depending on the state of USB2_HOST_DEV_SEL.

When operating in 'Host' mode, ensure that USB2_HOST_DEV_SEL is pulled low. If using Option 1 for 'Host' mode, manually setting USB2_HOST_DEV_SEL is not necessary when using a proper adapter.

When operating in 'Device' mode, ensure that USB2_HOST_DEV_SEL is pulled high.

USB2_HOST_DEV_SEL Can be found on J6.21

 

Examples

Examples of USB Host and Device mode applications are available in WICED-Studio 6.1 under snip/usbx_usb_device and snip/usbx_usb_host

RaktimR_11

Unbricking of CYW943907

Posted by RaktimR_11 Moderator Oct 27, 2017

This post discusses how to recover a bricked CYW943907 device on CYW943907AEVAL1F  kit due to incorrect clock settings.

 

The CYW43907 boots from internal ROM and then loads an application from external sflash.

By mistake, if a corrupted application (wrong clock setting etc) is flashed into sflash, then there is a fair amount of possibility that sflash may not be able to be programmed (For instance, setting the sflash clock to 25 MHz).

 

In this case, the only way is to make sure that program in sflash not to be executed. The easiest way is to short the chip select (CS_L) to High while the device is getting booted. Once this is done, we can upload a new example using the build target in WICED studio. The following diagrams show the necessary hardware connection required to pull the chip select pin of the sflash high.

sflash1.jpgIMG_20171027_152929.jpg

Filter Blog

By date:
By tag: