Electronic Components Datasheet Search
  English  ▼

X  

PM0222 Datasheet(PDF) 22 Page - STMicroelectronics

Part # PM0222
Description  Brain smart hub family
PDF  33 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

PM0222 Datasheet(HTML) 22 Page - STMicroelectronics

Back Button PM0222 Datasheet HTML 18Page - STMicroelectronics PM0222 Datasheet HTML 19Page - STMicroelectronics PM0222 Datasheet HTML 20Page - STMicroelectronics PM0222 Datasheet HTML 21Page - STMicroelectronics PM0222 Datasheet HTML 22Page - STMicroelectronics PM0222 Datasheet HTML 23Page - STMicroelectronics PM0222 Datasheet HTML 24Page - STMicroelectronics PM0222 Datasheet HTML 25Page - STMicroelectronics PM0222 Datasheet HTML 26Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 22 / 33 page
background image
Timers
PM0222
22/33
DocID025476 Rev 1
M0 side (see Section 4: Interrupt management). To initiate the IP there are three important
registers:
WDT_LR: which contains the value to load in the timer (when this register is written, the
counter is immediately restarted from the new value)
WDT_CR: which configures the action to process in case the WDG timer reaches zero
(generation of an interrupt or a reset)
WDT_ICR: writing to this register will clear the watchdog interrupt and reload the
counter from the WDT_LR register.
8.3
SysTick
The Cortex-M0 in Brain provides a SysTick timer. See Brain reference manual, System
timer chapter for more details.
The SysTick timer is clocked by the CPU clock.
All SysTick registers are available through a structure defined in core_cm0.h (Cortex-M0
header provided by ARM). This example will use this set of registers to configure the Systick
with the biggest value and launch it:
Disable the SysTick and the previous configuration (in case of previous use):
SysTick->CTRL= 0x0; // stop the SysTick timer
In this example the SysTick is initialized with the maximum value:
SysTick->LOAD= 0x0FFFFFF; // load value in the SysTick timer
After 16777215 tick periods the counter will reach the targeted value in the LOAD register.
Then enable the counter on the CPU clock:
0x1 | 0x1 << 1 | 0x1 << 2; // enable the counter, enable the interrupt and select the
processor clock
The VAL register contains the current value of the SysTick counter. A read from this register
returns the number of tick periods since the timer has been launched (note that when the
counter reaches the targeted value, it restarts):
current = SysTick->VAL; // save the SysTick timer value



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com