BOD18 Reset with JTAG attached

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

Hello,

i am trying to let my UC3C go through a reset by the use of the BOD18. I am forcing a short circuit on an output-driver (if switched on by gpio-pin), so the supply voltage breaks down.

To my surprise the UC3C does not seem to restart.

The gpio-pin to which the driver is connected has a pull-down resistor, so normally i'd suggest the controller to restart and the gpio-pin should be low afterwards (so the short-circuit should be away as long the pin stays low).

Somewhere in the datasheet I read about BOD-Interrupt only working if JTAG is disabled. Does this also apply to the BOD-Reset functionality?

Greetings,
jabba

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

If you only want to generate a reset, use the watchdog. That’s how it’s usually done. Just search the forum. There’s several threads about it.

Trying to create a short-circuit just so that the BOD trips sounds like a bad idea.

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

It was supposed to handle an error case :)

But i am somehow more informed right now:
-BOD18 -> INT
-BOD33 -> INT
-BOD50 -> INT/RESET

So i am stuck on BOD50... Does anyone know how to enable BOD50-Reset and -Threshold by software? (ASF)

Greetings,
jabba

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

Seems that the ASF (V3.3.0 at least) does not provide a means of enabling or changing the BODs.

There are routines to read the level such as scif_bod50_get_level()

So., you will need to do it yourself, eg ;

AVR32_SCIF.unlock = ( 0xAA << AVR32_SCIF_UNLOCK_KEY_OFFSET ) | AVR32_SCIF_BOD50;
AVR32_SCIF.bod50 = AVR32_SCIF_BOD50_CTRL_MASK | AVR32_SCIF_BOD50_HYST_MASK ) | 53 ; // see datasheet for levels [53->4.15 - 4.47V, 61->4.36 - 4.97V]