Re: Expert help wanted with inline assembly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Weddington, Eric schrieb:
Hi All,

My questions come from a thread on the avr-libc-dev mailing list:
<http://lists.nongnu.org/archive/html/avr-libc-dev/2009-02/msg00007.html>

For the AVR target, I need to create a macro that generates inline assembly, for the purpose of creating a specific, timed sequence of instructions that operates on a certain I/O register in the AVR to disable the brown-out detector before going into a sleep mode. This sequence is defined in the datasheets for specific AVR devices.
...

Thoughts?


BTW: Why is this needed at all? Anyone who likes sleeping without BOD could just disable BOD before going asleep.

That would add costs of some bytes, but that code will appear not more than once in an ordinary application. Furthermode, after awakening, the BOD will stay disabled, so going asleep and awakening is somehow asymmetric.

And besides that there are lots of other power saving possibilities like disabling digital input, changing pullup config etc. that are to be done by hand. Otherwise, there would be the need of plethora of different sleep-macros for every situation that can be imagined.

Georg-Johann

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux