atMega328 Xplained mini - quirks?

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

I have recently been using an Xplained Mini board to develop some code. It is no ICE but for a few dollars it is pretty convenient.

 

However.... I have experienced some issues with RAM corruption, and with difficult connecting to the board. When pressing F5 I frequently (5/10) get an error message saying that debugWire is disabled. It asks if i would like to program the relevant fuse. The solution seems to be to repeat the command a few times.

 

For the RAM corruption, after pulling my hair out, I moved to a board without the debugger.... and the code has been running for an hour with lots of timers, TWI comms, UART comms... and all is good.

 

Has anyone seen these sorts of behaviours with the Xplained Mini?

 

Perhaps I have cooked the board somehow.

 

Thanks

Greg

regards
Greg

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

If you specify debugWIRE in AS7.0 and then want to "Start debugging and break",   AS7.0 will prompt you if DWEN is not set.

 

But if DWEN is already enabled it simply uploads memory with your new code (via debugWIRE) and stops at main().

 

You apply breakpoints, run, step, examine registers, memory, ... like any debug session.

When finished,  you either "Stop Debugging" or "Disable debugWIRE and close"

 

In practice you just use "Stop" when you are developing.   But remember to "Disable" when the project is complete.

 

As a general rule you run to a breakpoint.   Only single-step when you absolutely necessary.   i.e. you want to examine registers, variables, etc.

 

David.

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

gregd99 wrote:
Perhaps I have cooked the board somehow.
That's possible as ATmega328P Xplained Mini lacks

  • USB shield termination
  • USB VBUS over-voltage protection

These issues aren't defects if the USB hub terminates the USB shield (ESD/EFT/EMI/lightning) and has a USB VBUS clamp or crowbar (power supply instability, pass transistor shorts, feedback open circuit)

USB VBUS is typically noisy (SMPS)

 


ATMEGA328P XPLAINED MINI | Microchip Technology (schematic page 3 grid B1)

ZEN059V130A24LS - LS Series - Standard PolyZen Devices PolyZen Devices - Littelfuse

A PolyZen would increase the price of a mega328P Xplained Mini by an estimated 30%.

 

edit :

USB Power Switch and Filter | Zak’s Electronics Blog ~*

 

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

Last Edited: Tue. Apr 19, 2022 - 06:55 PM