поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

AN3404 датащи(PDF) 17 Page - STMicroelectronics

номер детали AN3404
подробное описание детали  Low power considerations for STM8TL5xxx devices
PDF  30 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3404 датащи(HTML) 17 Page - STMicroelectronics

Back Button AN3404 Datasheet HTML 13Page - STMicroelectronics AN3404 Datasheet HTML 14Page - STMicroelectronics AN3404 Datasheet HTML 15Page - STMicroelectronics AN3404 Datasheet HTML 16Page - STMicroelectronics AN3404 Datasheet HTML 17Page - STMicroelectronics AN3404 Datasheet HTML 18Page - STMicroelectronics AN3404 Datasheet HTML 19Page - STMicroelectronics AN3404 Datasheet HTML 20Page - STMicroelectronics AN3404 Datasheet HTML 21Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 17 / 30 page
background image
AN3404
General power management tips
Doc ID 018847 Rev 3
17/30
5.3
Dynamic control of pull-up resistor
Many applications have buttons which are used as a user interface. These buttons are
connected to I/Os that are connected to VSS once they are pressed. An internal pull-up is
used in order to have a defined logic level on these I/Os when the button is off (not pressed).
Once the button is pressed, the I/O is grounded and it generates an additional current of ~
40 – 70 µA, drawn from the power supply. This current is negligible if the application is in
Run mode, but becomes very important for applications which run mainly in low power
modes.
For such low-power applications, the pull-up can be dynamically controlled. Once a button is
pressed, the related service routine is executed. This routine disables the pull-up and the
interrupt, in order to save consumption while the button is being pressed.
As the application has to check the button status regularly, the pull-up is enabled again
before any checks are made. If the button is continuously pressed, the process is repeated.
Once the button release is detected, the pull-up remains on.
For this task, an I/O can be left floating for a short time frame, given by a check period,
generating an extra consumption in the range of ~10 µA. Therefore, the total current
consumption for a button-press operation is lower than without such dynamic control.
5.4
Waiting loops/delays
In some cases, the application has to wait for an input from the user, communication
peripheral, or another external unit.
If there is no useful code to execute while waiting for an input, it is recommended to avoid
using either a typical delay loop or a polling loop.
Typical delay loop:
(delay = 0; delay < 0xFFFF; delay++)
_asm ("nop");
Polling loop:
SPI_DR = data; // start communication
while (!( SPI_SR & SPI_SR_TXE)); // wait for TXE bit set
A Wait mode woken up by an interrupt on the SPI transmitter empty (SPI_SR_TXE flag) is
advised by the following sequence:
Enable TXE interrupt:
SPI_ICR |= SPI_TXIE; // enable interrupt for Tx empty
An event is then generated after each byte is sent. The next data can be loaded in the Tx
buffer as follows:
SPI_DR = data; // start communication
_asm ("wfi"); //or wfi() if you include STM8TL5x.h file in your
project
The sequence described above uses WFI mode to wait for Tx buffer empty. A delay loop can
be replaced by a Wait mode woken up by a programmed timer interrupt or better an Active-
halt with AWU if no other peripheral is running. This can also be used for other
communication lines. For external sources (like interrupt from an I/O port), Halt mode can
also be considered.



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


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
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