Datenblatt-Suchmaschine für elektronische Bauteile
  German  ▼
ALLDATASHEETDE.COM

X  

PM0056 Datenblatt(PDF) 32 Page - STMicroelectronics

Teilenummer PM0056
Bauteilbeschribung  This programming manual provides information
PDF  156 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Hersteller  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

PM0056 Datenblatt(HTML) 32 Page - STMicroelectronics

Back Button PM0056 Datasheet HTML 28Page - STMicroelectronics PM0056 Datasheet HTML 29Page - STMicroelectronics PM0056 Datasheet HTML 30Page - STMicroelectronics PM0056 Datasheet HTML 31Page - STMicroelectronics PM0056 Datasheet HTML 32Page - STMicroelectronics PM0056 Datasheet HTML 33Page - STMicroelectronics PM0056 Datasheet HTML 34Page - STMicroelectronics PM0056 Datasheet HTML 35Page - STMicroelectronics PM0056 Datasheet HTML 36Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 32 / 156 page
background image
The Cortex-M3 processor
PM0056
32/156
DocID15491 Rev 5
Software can use the synchronization primitives to implement a semaphores as follows:
1.
Use a Load-Exclusive instruction to read from the semaphore address to check
whether the semaphore is free.
2.
If the semaphore is free, use a Store-Exclusive to write the claim value to the
semaphore address.
3.
If the returned status bit from step 2 indicates that the Store-Exclusive succeeded then
the software has claimed the semaphore. However, if the Store-Exclusive failed,
another process might have claimed the semaphore after the software performed step
1.
The Cortex-M3 includes an exclusive access monitor, that tags the fact that the processor
has executed a Load-Exclusive instruction.
The processor removes its exclusive access tag if:
It executes a CLREX instruction
It executes a Store-Exclusive instruction, regardless of whether the write succeeds.
An exception occurs. This means the processor can resolve semaphore conflicts
between different threads.
For more information about the synchronization primitive instructions, see LDREX and
STREX on page 70 and CLREX on page 71.
2.2.8
Programming hints for the synchronization primitives
ANSI C cannot directly generate the exclusive access instructions. Some C compilers
provide intrinsic functions for generation of these instructions:
The actual exclusive access instruction generated depends on the data type of the pointer
passed to the intrinsic function. For example, the following C code generates the require
LDREXB operation:
__ldrex((volatile char *) 0xFF);
Table 15. C compiler intrinsic functions for exclusive access instructions
Instruction
Intrinsic function
LDREX, LDREXH, or LDREXB unsigned int __ldrex(volatile void *ptr)
STREX, STREXH, or STREXB int __strex(unsigned int val, volatile void *ptr)
CLREX
void __clrex(void)



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


Datenblatt Download

Go To PDF Page


Link URL



War ALLDATASHEET hilfreich?  [ DONATE ] 

Über Alldatasheet   |   Werbung   |   Kontakt   |   Privatsphäre und Datenschutz   |   Link zum Datenblatt    |   Linktausch   |   Hersteller
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