What cause my micrcontroller start executing code?

Home Evil Mad Scientist Forums Microcontrollers What cause my micrcontroller start executing code?

This topic contains 1 reply, has 2 voices, and was last updated by  Windell Oskay 10 months, 4 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20677

    Manning
    Participant

    I have an AC powered microcontroller board. I use a CUI module (VSK-S15-48U) to generate 48V DC from the wall. That 48V gets bucked down to 3.3V to power a micro ([ATMEGA328-MMH](http://www.kynix.com/Parts/158636/ATMEGA328-MMH.html “ATMEGA328-MMH”)) and some other peripherals (the 48V is used for other stuff). My power connection is pretty ugly — I took a two prong extension cord/cut the female end off and crimped a connector, which mates to my board (read the connection is probably ugly and I’m definitely getting some transients when I plug in). The power supplies (48V and 3.3V) looks really nice/clean and there are no oscillations.

    For simplicity/prototyping I’m using the arduino IDE. I’ve modified the avrdude.conf file such that I’m utilizing the internal RC oscillator at 8 MHz. I’m able to program the board without issue. I am, however, noticing that when I initially plug the board into the wall the microcontroller appears to be bricked: a test LED doesn’t blink/turn on, another I/O I use appears to be pulled high somewhere, and my I2C lines appear to be tristated (they’re pulled high so I read a high voltage). I tried manually resetting the micro using a push-button, but it seems as though it has zero effect. Initially it appeared as though it would “randomly” start working and the FW would be executed as expected. After that, reprogramming/resetting the micro worked as expected until I’d unplug and replug from the wall. Eventually I noticed that if I touched/tapped the area near the feedback resistor on the buck regulator that the micro would come out of its suspended/bricked state and function appropriately.

    Initially I suspected a cold solder joint — by tapping on the cap I electrically connected it. Resoldering didn’t do the trick.

    Looking with a scope, the 3.3V looks good after plugging the device into the wall — I see nothing to suspect there’s anything wrong with it. The power good output of the buck regulator indicates that the 3.3V is fine. When I tap on the bypass cap I can see the 3.3V wiggle down to ~2.2V for ~40 mS. The power good output drops accordingly and then sometimes the micro wakes up and decides to execute the code (occasionally a few taps are required).

    I thought maybe the slope rate of vcc was somehow causing the micro to go haywire. The 48V rises in 10 mS and the 3.3 in roughly 2.5 mS. The datasheet requires between .01 and 10 V/mS so I’m in the clear there.

    I still have some more debugging to do, but at this point I’m unable to find a logical explanation for why the micro doesn’t come on initially and why tapping the feedback cap (and therefore causing the buck output to sag for a bit) kicks the micro into gear.

    Schematic of the micro/buck:
    ![](https://forum.evilmadscientist.com/uploads/editor/y8/h78amd6fbkts.png “”)

    #22994

    Windell Oskay
    Keymaster

    Sounds like you might be running into the brownout detection feature. I’d check the values of those fuse bits, and compare them to your power supply behavior.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.