Programming ATmega328PB Xplained ispEnterProgMode fail

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

Hello everyone!

 

I am just starting out to learn how to work with AVR and C, and I decided to buy myself a ATmega328PB Xplained to practice with. 

 

Right out the gate I seem to be having issues interacting with my device and am getting ispEnterProgMode error.

From the hours of researching, I believe that my DWEN fuse may be incorrectly set however I have no idea how to test or rectify this.  

 

I'd love any suggestions on how to fix this!

Error message
http://imgur.com/a/4cvQz

 

Environment
OS: Microsoft Windows 10 Version 1607 (OS Build 14393.1198).

SW: Atmel Studio 7 (Version: 7.0.1417).
Order code: ATMEGA328PB-XMINI.
Device is still running the included morse code demo and I have not successfully written anything.

 

Steps to reproduce

  1. Connect device to USB2.0 port on back of PC
  2. Start AtmelStudio 7
  3. Open "Device Programming" from the tools tab.
  4. Select the following - Tool = "mEDBG", Device = "ATMega328PB", Interface = "ISP".
  5. Click Apply.
  6. Click the "Read" button under "Device signature".
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Start any Debug session. e.g. your existing program.
Then choose "disable debugWIRE and close"
.
There seems little point in disabling dW if you are developing a project.
However, once you have done any low level debugging, you might find it more convenient to use ISP or bootloader with print statements,
.
ISP or bootloader are both substantially faster than uploading code in debugWIRE mode. The XMINI takes about 120 seconds fora full 32kB binary. An external ATMEL-ICE is a lot quicker with debugWIRE.
.
XMINIs are good. But they are (intentionally) slow.
.
David.

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

david.prentice wrote:
Start any Debug session. e.g. your existing program.
Then choose "disable debugWIRE and close"
.
There seems little point in disabling dW if you are developing a project.
However, once you have done any low level debugging, you might find it more convenient to use ISP or bootloader with print statements,
.
ISP or bootloader are both substantially faster than uploading code in debugWIRE mode. The XMINI takes about 120 seconds for a full 32kB binary. An external ATMEL-ICE is a lot quicker with debugWIRE.
.
XMINIs are good. But they are (intentionally) slow.
.
David.

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

david.prentice wrote:
david.prentice wrote:
Start any Debug session. e.g. your existing program. Then choose "disable debugWIRE and close" . There seems little point in disabling dW if you are developing a project. However, once you have done any low level debugging, you might find it more convenient to use ISP or bootloader with print statements, . ISP or bootloader are both substantially faster than uploading code in debugWIRE mode. The XMINI takes about 120 seconds for a full 32kB binary. An external ATMEL-ICE is a lot quicker with debugWIRE. . XMINIs are good. But they are (intentionally) slow. . David.

 

Unfortunately, I do not have the option to "disable debugWIRE and close".    

 

When attempting to start a session in hopes to get the option to disable, launching fails with this error message.  Answering Yes fails with this error message.

 

While I am aware of speed differences, I am interested in learning using this set.  I'm hoping to get a hang on things then start upgrading. 

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

It look as if you are between a rock and a hard place.
.
I presume that you have no external hardware connected. e.g. a virgin XMINI.
Unplug, replug XMINI. Sing a lullaby. Give it a good night's rest. One of these might work.
.
If you can describe the steps that you took to get yourself in your current state, someone might see if they can reproduce it.
Quote your AS7 version. Your mEDBG firmware version.
.
David.

Last Edited: Sat. May 27, 2017 - 06:54 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
It look as if you are between a rock and a hard place. . I presume that you have no external hardware connected. e.g. a virgin XMINI. Unplug, replug XMINI. Sing a lullaby. Give it a good night's rest. One of these might work. . If you can describe the steps that you took to get yourself in your current state, someone might see if they can reproduce it. Quote your AS7 version. Your mEDBG firmware version. . David.

 

When it comes to what I have done, I never made it to initial programming.  Effectively I have only tried to complete the AVR tutorial Atmel has published here, but never made it past uploading my first program.

 

 

mEDBG
Debug host        127.0.0.1
Debug port        25763
Serial number     ATML2523040200005755
Connection        com.atmel.avrdbg.connection.cmsis-dap
Firmware Version  1.16
Hardware Version  0

 

 

I'm unable to read the device information.

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

I have the same problem described here -- ATmega328PB-XMINI (brand new) fails to enter programming mode. Also fails with an error message when trying to start debug to disable debugWire. Any new insights or solutions on this problem?

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

I had a similar problem a few years ago.. exact same board....somehow I did something & no more functionality!  Of course this happened one hour before I needed to show it to someone coming over.

I was about to pop in a new board (always have spares!), but after a few more minutes of fiddling with the studio menus it was back to life.  Unfortunately, I can't say exactly what fixed it, other than I only used the studio menu bars. It did take me some time trying various sequences of menu selections, as the clock ticked along.  You might play with combos of Debug commands like start without debugging, restart, even though it makes little sense to do so.  My shotgun approach, must have thrown the right rock through the right window to release the parking brake. 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!