Embedded Systems Architecture by Daniele Lacamera
Author:Daniele Lacamera
Language: eng
Format: epub
Tags: COM051060 - COMPUTERS / Programming Languages / C, COM051070 - COMPUTERS / Programming Languages / C++, COM046030 - COMPUTERS / Operating Systems / UNIX
Publisher: Packt Publishing
Published: 2018-06-06T07:06:38+00:00
When the conversion is completed, the corresponding discrete value is available on the lowest 12 bits of the data register, and can be returned to the caller:
return (int)(ADC1_DR);
}
The watchdog
Another common feature in many microcontrollers is the presence of a watchdog timer. A watchdog ensures that the system is not stuck within an endless loop or any other blocking situation within the code. This is particularly useful in bare-metal applications that rely on an event-driven loop, where calls are required not to block, and to return to the main event loop within the allowed amount of time.
The watchdog must be seen as the very last resort to recover an unresponsive system, by triggering a forced reboot regardless of the current state of the execution in the CPU.
The reference platform provides one independent watchdog timer, with a counter similar to those of the generic timers, with a 12-bit granularity and a prescaler factor. The prescaler of the watchdog, however, is expressed in multiples of 2, and has a range between 4 (represented by the value 0) and 256 (value 6).
The clock source is connected to a lower-speed oscillator, through an independent branch of the clock distribution. For this reason, the clock gating is not involved in the activation of this peripheral.
The watchdog configuration area is mapped within the peripherals address region, and consists of four registers:
The key register (offset 0), used to trigger the three operations unlock, start, and reset by writing predefined values in the lowest 16 bits
The prescale register (offset 4), to set the prescale factor of the counter
The reload register (offset 8), containing the reload value for the counter
The status register (offset 12), providing the status flags to synchronize the setup operations
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9379)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9347)
The Mikado Method by Ola Ellnestam Daniel Brolund(9314)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(7857)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7407)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7330)
Grails in Action by Glen Smith Peter Ledbrook(7303)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7122)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(5962)
Kotlin in Action by Dmitry Jemerov(4647)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(3893)
Functional Programming in JavaScript by Mantyla Dan(3723)
Learning Java by Patrick Niemeyer & Daniel Leuck(2872)
Mastering Python for Finance by Weiming James Ma;(2841)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(2839)
Windows APT Warfare by Sheng-Hao Ma(2634)
WordPress Plugin Development Cookbook by Yannick Lefebvre(2606)
Mastering Java 9 by Dr. Edward Lavieri(2573)
Architecting Modern Java EE Applications: Designing lightweight, business-oriented enterprise applications in the age of cloud, containers, and Java EE 8 by Daschner Sebastian(2560)