• 0
RichardH

WF32 Bring-up Failure

Question

I just received a new WF32 and I'm excited to hit the ground running... if I could get to Hello World.

 

I'm using Arduino IDEs for several AVR boards, Edison, etc. and they're working fine on this system (MacBookPro w/ 10.9.5), so I'm comfortable that system, drivers, cables, etc. are OK.  I'm using MPIDE 0150.  Board and serial port are set.

 

The board is acting like it doesn't have a boot loader.  How should it normally behave on power-up from factory, or on reset?

 

On power-up, I see 2 strong TX/RX pulse cycles on LD1/2, then nothing.  Trying to load a sketch sees an occasional weak pulse on LD1 (RX?) and nothing going back out - and MPIDE gets avrdude: stk500_2_ReceiveMessage(): timeout  Pressing reset gets nothing.

 

Jumper pins are set similar to the photographs in the reference manual, and I've checked the jumper settings for power, JP1.  The FTDI is being recognized when connected.

 

How do I unbrick this?  Connect an ICSP header and flash a new boot loader?  Or have I overlooked something basic here?

 

Thanks,

Richard

Edited by KaitlynFranz
Added Tags

Share this post


Link to post
Share on other sites

23 answers to this question

Recommended Posts

  • 0

More detail from a verbose upload log...

 

Binary sketch size: 6676 bytes (of a 520192 byte maximum)

[/Applications/mpide.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude] [-C/Applications/mpide.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf] [-v] [-v] [-v] [-v] [-p32MX695F512L] [-cstk500v2] [-P/dev/cu.usbserial-AD01PHTH] [-b115200] [-D] [-Uflash:w:/var/folders/yx/y2mr0_dd0r5cp0vtzl3lxk_w0000gn/T/build626266432486106377.tmp/Blink.cpp.hex:i] 
 
avrdude: Version 5.8cvs, compiled on Jan 15 2010 at 17:27:01
         Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright © 2007-2009 Joerg Wunsch
 
         System wide configuration file is "/Applications/mpide.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/Richard/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping
 
         Using Port                    : /dev/cu.usbserial-AD01PHTH
         Using Programmer              : stk500v2
         Overriding Baud Rate          : 115200
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_2_ReceiveMessage(): timeout
 
 
This seems like a basic comms failure / missing bootloader.  MPIDE sees the port when connected, I see the TX attempts on the WF32's LED, and MPIDE gets a "avrdude: ser_recv(): read error: Device not configured" when I unplug it - so I'm confident I'm connected to the right driver, and MPIDE is seeing all the way to the FTDI chip.
 
Is 115200 the correct baud rate?  I see no option in MPIDE to change it.

Share this post


Link to post
Share on other sites
  • 0

Hi Richard,

 

The board should come with the bootloader on it, but I won't deny the possibility that a mistake could happen.  But just to double-check and make sure all the bases are covered, when you are attempting to program the WF32 via USB, what setting do you have jumper J15 on (EXT, UART, USB)? 

 

If you aren't using an external power supply, and just drawing power from your computer, the jumper should be on the UART setting. When I attempted to program my WF32 with it on EXT as the pictures in the reference manual show while only drawing power from the computer, that was when I had the most similar experience to what you initially described.

 

Thanks,

JColvin

Share this post


Link to post
Share on other sites
  • 0

Hi, J.

 

Yes, you're correct - my jumper is on UART, which is the one difference from the reference manual photo.  The others are the same, I swear. ;-)

 

Not knowing how the bootloader is supposed to behave, how can I verify if it's present?  Does it have any visual indicators (pulsing LEDs, etc.) when it first loads?  Can I hit it from a terminal emulator and expect a response?

Share this post


Link to post
Share on other sites
  • 0

Hi Richard,

 

When the board is first powering up, you should see some strong pulses on LD1/LD2 (as you already mentioned eariler) as well as LD3 being constantly lit up for about 2 seconds while LD6 flashes on and off during that time. Are these LED's lighting up on your board?

 

Thanks,

JColvin

Share this post


Link to post
Share on other sites
  • 0

When the board is first powering up, you should see some strong pulses on LD1/LD2 (as you already mentioned eariler) as well as LD3 being constantly lit up for about 2 seconds while LD6 flashes on and off during that time. Are these LED's lighting up on your board?

 

Negative.

 

I only see the LD1/LD2 flickers.  No LD3 or LD6 activity.

 

I just checked and the 3.3v rail seems good.

Share this post


Link to post
Share on other sites
  • 0

So, leaping to a conclusion that the boot loader is somehow not present, how could I load it without a picKIT, etc?  My gear is all AVR-centric; this is my first PIC platform.

Share this post


Link to post
Share on other sites
  • 0

You'll soon get a better answer from one of our chipKIT experts, but I'll chime in and say I had this same problem on my Macbook. From what I understand, it has to do with the somewhat odd way OSX works with the USB ports, the end result being that MPIDE wasn't able to send a reset signal to the board.

 

My first workaround was to manually reset the board when programming. I'd tell MPIDE to upload, wait for it to compile, and as soon as it comes back with "Binary sketch size: ####" I'd manually reset the board (in my case, a Max32). That would leave the board in the right state at the right time and I could at least get it to program.

 

Keith Vogel at Digilent & some of the folks at chipKIT looked into it, and all I can say is that as of the last time I grabbed a fresh copy of MPIDE the problem was solved, and I can now program my Max32 with no problems. Looks like I have MPIDE 0023 if that helps.

 

-Norman

Share this post


Link to post
Share on other sites
  • 0

Hi Richard,

 

After talking with the Digilent support team, it looks like that if you are using the FTDI driver that comes with MPIDE (which it seems like you are from your previous posts, although perhaps a new version of MPIDE like Norm suggested will solve the issue since that would force the correct drive to be used if that is the issue), then you need to reflash the bootloader for the WF32 (available for download on the WF32 product page) with a programmer like the chipKIT PGM.

 

Let me know if you have any more questions.

 

Thanks,

JColvin

Share this post


Link to post
Share on other sites
  • 0

My first workaround was to manually reset the board when programming. I'd tell MPIDE to upload, wait for it to compile, and as soon as it comes back with "Binary sketch size: ####" I'd manually reset the board (in my case, a Max32). That would leave the board in the right state at the right time and I could at least get it to program.

 

Keith Vogel at Digilent & some of the folks at chipKIT looked into it, and all I can say is that as of the last time I grabbed a fresh copy of MPIDE the problem was solved, and I can now program my Max32 with no problems. Looks like I have MPIDE 0023 if that helps.

 

Yep, I'd tried the manual reset method with no results.  And I'm running the latest 0150 build.

 

 

After talking with the Digilent support team, it looks like that if you are using the FTDI driver that comes with MPIDE (which it seems like you are from your previous posts, although perhaps a new version of MPIDE like Norm suggested will solve the issue since that would force the correct drive to be used if that is the issue), then you need to reflash the bootloader for the WF32 (available for download on the WF32 product page) with a programmer like the chipKIT PGM.

 

I had an FTDI driver previously installed and working elsewhere, but when things didn't work I did try installing the one supplied with MPIDE.  ps -ef shows no avrdude running.

 

Even if I plug the board into a wall wart, I get no LD3/LD6 lights.

 

So... presuming I need to reflash the board, I lack a PIC programmer.  I don't suppose any of my AVR tools would be useful here (e.g., STK500 dev board)?

 

Thanks,

Richard

Share this post


Link to post
Share on other sites
  • 0

Hi Richard, 
I'm sorry that this took so much effort. 
 
For me, this is what it looks like on a new WF32: 0023-macosx-20140821
 
http://youtu.be/8H2l3mZsoCs
 
 
 
A few things that I had issues with previously:
1 . USB on the mac is a little picky. Which USB port are you plugged into/what cable? There seems to be a bit of an issue with USB 3 vs USB 2?
 
2. can I verify which MPIDE you are using?
you can get that by going to About MPIDE and getting the release number. 
 16489136416_e5a419ab41.jpg
Screen Shot 2015-02-12 at 6.32.17 PM by laraswanland, on Flickr

I ran into your error also on my mac on a previous release (what Norm and Sam described), but found that I re-install MPIDE with the new FTDI Mac Drivers (http://chipkit.net/started/install-chipkit-software/installing-mpide-mac-os/) directly off of here.
 
The Latest release is 0023, not the 0150

http://chipkit.s3.amazonaws.com/index.html

 

One of the things they fixed was this weird issue with USB and the FTDI with Mac's. 

 

... alternatively (I know it's annoying, but it helps to know if it's MPIDE's thing or the board) , do you have access to someone's window's computer to verify?

 

Let me know what you think!

Share this post


Link to post
Share on other sites
  • 0

Hi, LariSan.

 

Thanks for the video.  When my board powers up, I don't get any of the green LEDs on the upper-right like yours.

 

I use FDTI adapters regularly in my job, plus I'm concurrently working with several different AVR Arduino boards and Edison.  They all work, and at least a few of them are FTDI-based.

 

I initially did not install the drivers provided with MPIDE because they're like 5+ years old, and I've surely installed at least that version, if not more recent from FTDIs site.  Nonetheless, when it didn't work, I did install those drivers and tried again with the same results.

 

MacBookPro is 15" Retina, late 2013, OSX 10.9.5.  Port is on the left side, and I'd expect it's USB3.  Tried a couple generic cables that work on other peripherals.

 

The MPIDE 0023 download hasn't been updated since 8/2014.  I downloaded mpide-0150-macosx-20150204-test, which was updated 8 days ago - I presumed that was the latest build.  The banner says it's 0023, but the installation file looks like it's 0150.

 

Since the interface is serial, is there a string I can output from a terminal emulator that the boot loader should respond to?

 

Thanks,

Richard

Share this post


Link to post
Share on other sites
  • 0

Hi, LariSan.

 

I just installed mpide-0023-macosx-20140821 with the same result.  Even rebooted for good measure.  The cable I'm using is the mini USB port, not the micro port.  Also note that if I just plug the unit into a USB charger I get no lights except a quick blip on the RX/TX LEDs.

 

Yes, the serial port shows up when connected, and disappears when removed.  And there's 3.27v on the power bus.  Pressing reset has no effect, and removing the DTR reset-enable jumper also does nothing (in case the reset was being held improperly).

 

Thanks,

Richard

Share this post


Link to post
Share on other sites
  • 0

*sigh* I'm a bit stuck. 

It sounds like you already checked your jumpers. 

 

I'll send you a private message what to do next. 

Share this post


Link to post
Share on other sites
  • 0

FYI, I swapped for a new WF32 and it worked like a champ straight out of the box.

 

Also, as I got going, I noticed that the 0023 build from 8/2014 didn't include any of the WiFi examples for the WF32, so I ended up back on the 0150 build from 2/2015.

 

Cheers,

Richard

Share this post


Link to post
Share on other sites
  • 0

Oh good. 
I hope we get to look at the board to find out why it was not working, but thank you for being so patient with it. 
 
For your WiFi examples: I'm not sure what is in that build right now. However, we made our network examples a downloadable library, so no matter what build you are in, you should be able to use it.

 

This may also be helpful (my notes on a Video/blog post I am working on)

 
The wifi examples only work with Digilent boards, so the MPIDE (chipKIT community) team didn't want to include them until compatibility across all chipKIT boards worked. 
If you want better Wifi examples, go to this page : http://digilentinc.com/Products/Detail.cfm?NavPath=2,892,1266&Prod=CHIPKIT-WIFIRE

16364177500_f8c53bbc84.jpg

wifi examples by laraswanland, on Flickr
 

 

Inside of that library there are 3 network libraries. 

 

The first is chipKITEthernet-- We recommend DO NOT USE IT. It's built completely off of the Arduino IDE- WizNet stack that has a lot of issues with it. We include it only for people who have legacy code on Arduinos that they want to port to a chipKIT. 

 

The second is the DNETcK/DWIFIcK-

This is the Digilent NETwork chipKITDigilent WIFI chipKIT

this is the first network stack we made that is built on Microchip's MLA

It only supports the PIC32 MX. 

 

The one that I HIGHLY recommend is the 

DEIPcK/ DEWFcK 

Digilent Embedded Internet Protocol

This is Digilent's re-built from the chip up- Open Source Internet Protocol Suite that supports PIC32MX and PIC32 MZ (wiFire)

There is no pLib or MLA required and has a memory abstraction layer you can write on top of. 

 

  • Digilent Embedded IP Stack
    • Mostly, RFC 1122 / 793 compliant
    • Open source under the BSD 3-clause license
    • Supports multiple concurrent network interfaces
  • Written in C
    • Processor independent
  • Processor Specific Hardware Abstraction Layer
    • Big/Little Endian, Timers, Checksum, Processor speed
  • MAC/PHY Abstraction Layer (Network Adaptors)
  • Memory Abstraction Layer
    • Network Packets and Socket Buffers
  • Designed Specifically for a cooperative non-preemptive embedded environment

 

 

Hope that helps!

Share this post


Link to post
Share on other sites
  • 0
On 12/2/2015 at 11:43 AM, NMacDonald said:

You'll soon get a better answer from one of our chipKIT experts, but I'll chime in and say I had this same problem on my Macbook. From what I understand, it has to do with the somewhat odd way OSX works with the USB ports, the end result being that MPIDE wasn't able to send a reset signal to the board.

 

My first workaround was to manually reset the board when programming. I'd tell MPIDE to upload, wait for it to compile, and as soon as it comes back with "Binary sketch size: ####" I'd manually reset the board (in my case, a Max32). That would leave the board in the right state at the right time and I could at least get it to program.

 

Keith Vogel at Digilent & some of the folks at chipKIT looked into it, and all I can say is that as of the last time I grabbed a fresh copy of MPIDE the problem was solved, and I can now program my Max32 with no problems. Looks like I have MPIDE 0023 if that helps.

 

-Norman

Hi. Recently I get a CEREBOT Mx7ck board and I need to run it. I have MPIDE 0023 (like you) and I can't run the board. MPIDE show me the error avrdude:stk500_2_ReceiveMessage( ): timeout and I don't know why. I tried upload codes to manually reset and the board don't work. I hope you can help me. Alfredo

Captura de pantalla 2016-09-05 a las 15.49.20.png

Share this post


Link to post
Share on other sites
  • 0
On 12/2/2015 at 11:49 AM, logansam said:

I'll also add that on my macbook I forgot to install the FTDI drivers. My board would program once and then never again until I restarted mpide and killed the avrdude process, which has to be done manually.

How do you do this? I can't!!! I have a Macbook, MPIDE 0023 and CEREBOT board. I have installed the FTDI Drivers and I don't know why I can't run my board. 

Share this post


Link to post
Share on other sites
  • 0

Hi Alfredo,

Have you installed the bootloader from here?  If you haven't, Here is a pdf that descriped how to install the bootloader to be able to use MPIDE or adruino IDE's. Section 1.1 descrides how to install it.

cheers,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hello,

As a follow up question, what power jumper setting are you currently using on J3? I believe you will need to switch the jumper to the UART setting in order to be able to program the board successfully through MPIDE.

Thanks,
JColvin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now