Can FLIP kill my device connectivity?

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This has happened on three devices in a row: I connect a PCB with an ATmega16u4 to FLIP, with success. I load in my firmware -- verified. I click 'Start Application', and my board starts humming away. What a great thing!

 

But. Now none of them can connect via FLIP (no USB device; nothing in Device Manager either), and ISP can't get the signature or connect either. It gives this error:

 

 

I can't get into bootloader mode, either. Maybe I'm missing something there. I thought I could program on the fly like Arduino, but it seems I need to set some that up on the firmware side. I can't get there with hardware, either. I've got HWB pulled down via 10k, and Reset pulled up via 20k. I shorted Reset to ground for a moment, just to try to enter bootloader. Alas, nothing. 

 

Any ideas? 

 

My goal is to be able to update firmware in the field via USB, but now I can't update them at all!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is HWB or BOOTRST being used? If HWB then obviously you need to pull on the HWB pin at power on to keep it in the DFU bootloader. Othewise it goes straight to app. When there was no app (so that whole section contained 0xFFFF) then execution kind of treats 0xFFFF as NOP (really more like SBRS R13,7 in fact!) so it just fell all the way through until it hit the bootloader anyway. But if the system is designed to use HWB (and that fuses is set) then now you need to "ask" it to go to the DFU at power on. Designs that use HWB usually have a button on the HWB pin that you hold at power on to bring it back into DFU.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have HWB pulled low. Shouldn't that direct it to bootloader? I tried also pulling it high at power up, to no avail. 

 

I haven't changed any fuses, since ISP can't see the chip anymore. 

 

Any idea why ISP is unable to see it at all? I've been testing and programming these boards via ISP until now, and everything was good. It's only after clicking 'Start Application' in FLIP that things go sideways. 

 

I've looked all over, but I can't find any good examples on how to set up the USB DFU, so that I can provide power, but also be able to program in the field (like Arduino). It seems like it should be obvious, or easy, but maybe I'm spoiled by Arduino. Would it just be easier to just load in the Arduino Micro bootloader or something? Seems like cheating or giving in though :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JeanRimbaud wrote:
It's only after clicking 'Start Application' in FLIP that things go sideways.
An alternative to FLIP is

dfu-programmer

http://dfu-programmer.github.io/

JeanRimbaud wrote:
Would it just be easier to just load in the Arduino Micro bootloader or something?
something ... one of which is Dean's LUFA USB DFU bootloader instead of Microchip's AVR USB DFU bootloader.

jumping to dfu bootloader and stay there

by dwidd2

https://www.avrfreaks.net/forum/jumping-dfu-bootloader-and-stay-there

 

Edit: 1st URL

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Jul 10, 2018 - 06:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JeanRimbaud wrote:
Would it just be easier to just load in the Arduino Micro bootloader ...
a variant of Dean's LUFA USB CDC bootloader.

Do you require the speed of USB DFU or USB CDC?

Reason: Atmel-ICE goes via USB HID (max 64KB/sec) for programming and debugging.

ubaboot is a USB megaAVR bootloader that's very small and goes via low-speed USB (max 1.2Mb/sec)

GitHub - rrevans/ubaboot: USB bootloader for atmega32u4 in 512 bytes

https://github.com/rrevans/ubaboot

ubaboot doesn't have a Windows loader due to the custom USB descriptor.

Windows 10 Pro and subsequent have Windows Subsystem for Linux (WSL) so WSL may be one way to use ubaboot's loader.

If Windows 10 Home then it's a bit of effort with the Windows variant of libusb.

 


https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dang, I'm going to have to work for it? :)

 

Any idea how FLIP is killing my ability to connect or see the chip, or even read the device ID via ISP? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No idea ... a guess is a JRE issue (IIRC FLIP is a Java app) or a JRE mis-match (FLIP may malfunction with more recent JRE)

Seems there's a Java update onto Windows several times a year.

Could not locate FLIP at Microchip; FLIP was relatively easy to locate at Atmel.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An alternative to FLIP is

atprogram

Microchip

Microchip

Atmel Studio 7

http://www.microchip.com/webdoc/GUID-ECD8A826-B1DA-44FC-BE0B-5A53418A47BD/index.html?GUID-CF4ED1DB-2805-4CF0-A576-622C00126D89

...

 

Atmel Studio 7.0.582

...

  • Support for Flip-compatible bootloaders in atprogram and programming dialogue. The connected device appears as a tool.
  • ...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVRDUDE 6.3

AVR Downloader/UploaDEr - News: AVRDUDE 6.3 released [Savannah]

http://savannah.nongnu.org/forum/forum.php?forum_id=8461

...

 

* New programmers supported: 

...

- Atmel DFU, using FLIP protocol version 1 (AT90USB and ATmega*U* devices), 
or version 2 (Xmega devices) 

...

 

"Dare to be naïve." - Buckminster Fuller