Motor de Búsqueda de Datasheet de Componentes Electrónicos
  Spanish  ▼
ALLDATASHEET.ES

X  

ST20-C1 Datasheet(PDF) 85 Page - STMicroelectronics

No. de pieza ST20-C1
Descripción Electrónicos  Instruction Set Reference Manual
PDF  205 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricante Electrónico  STMICROELECTRONICS [STMicroelectronics]
Página de inicio  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

ST20-C1 Datasheet(HTML) 85 Page - STMicroelectronics

Back Button ST20-C1 Datasheet HTML 81Page - STMicroelectronics ST20-C1 Datasheet HTML 82Page - STMicroelectronics ST20-C1 Datasheet HTML 83Page - STMicroelectronics ST20-C1 Datasheet HTML 84Page - STMicroelectronics ST20-C1 Datasheet HTML 85Page - STMicroelectronics ST20-C1 Datasheet HTML 86Page - STMicroelectronics ST20-C1 Datasheet HTML 87Page - STMicroelectronics ST20-C1 Datasheet HTML 88Page - STMicroelectronics ST20-C1 Datasheet HTML 89Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 85 / 205 page
background image
85/205
7 Multi-tasking
®
7.9.1
Waiting for a resource
A process requesting a resource executes a wait (or P), which is the following code
sequence:
ld semaphore; wait;
cj CONTINUE;
stop;
CONTINUE:
The
wait instruction is executed, with a pointer to the semaphore control block in
Areg. The action of
wait depends on the count in the semaphore control block. If the
count is not zero, then a resource is free, so the count of free resources is decre-
mented and the value
false is left in the Areg to indicate that the process can
continue. If the count is zero then there are no free resources, and the process is
added to the list of waiting processes, and the value
true is left in Areg to indicate that
the process must wait. A conditional jump then tests Areg and performs a
stop if the
process must wait.
stop saves the Iptr and Wptr and deschedules the process, which
will wait on the semaphore queue until another process performs a
signal and subse-
quently restarts the process with a
run instruction.
7.9.2
Freeing a resource
When a process finishes with a resource and can free it, it performs a signal (or V),
which is the following code sequence:
ld semaphore; signal;
cj CONTINUE;
run;
CONTINUE:
The
signal instruction is executed, with a pointer to the semaphore control block in
Areg. The action of
signal depends on whether a process is waiting or not. If the front
pointer of the process waiting list is empty then there are no processes waiting, so the
count is incremented and Areg is set to
false. Otherwise, at least one process is
waiting, so the first process is remo ved from the list and placed in the Breg, and Areg
is set to
true. A conditional jump tests Areg and performs a run to restart the process
if there was one waiting.
7.10 Sleep
When the ST20-C1 becomes
idle it disables counter distribution to its circuits and
consumes a very small amount of electrical power; this is known as
sleep mode. The
counters are re-enabled and normal operation resumes automatically and instantly
when either an interrupt or a software reset from the diagnostic controller is received.
Sleep mode may also be triggered directly from software by setting the sleep bit in the
status register:
ldc sleep; bitmask; statusset;
In this case also, sleep mode persists until the next interrupt or software reset.



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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Descarga

Go To PDF Page


Enlace URL



¿ALLDATASHEET es útil para Ud.?  [ DONATE ] 

Todo acerca de Alldatasheet   |   Publicidad   |   Contáctenos   |   Política de Privacidad   |   Enlace a la hoja de datos    |   Intercambio de Enlaces   |   Lista de Fabricantes
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