| Zakładka z wyszukiwarką danych komponentów |
|
AN3128 Arkusz danych(PDF) 87 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3128 Arkusz danych(HTML) 87 Page - STMicroelectronics |
|
87 / 105 page ![]() AN3128 Multi-input embedded GUI library firmware Doc ID 16918 Rev 5 87/105 4.6.34 GL_Delay HAL function The delay routine employs the SysTick processor internal circuit. It is a very simple down- counting counter which is clocked by a processor clock, in this case 72 MHz. The counter width is 24 bits, so it operates over a range from 16,777,215 to 0. Each working cycle starts with a counter preloading by the entered scaler which determines a time of counting at the end of which the SysTick interrupt handler is launched, in order to handle an underflow event. The handler decrements an intended number of working cycles and reloads the counter which continues in this manner, setting a number of working cycles generates a variation of the total time latency. The second important issue regarding this portion is interrupt handling. Throughout all the families of diverse microprocessors, the interrupt feature is integrated into a core behavior as an essential property in order to make it possible to handle some circumstances time adequately, or better, as soon as possible. The interrupts are very often closely linked with the data transfers where a regular time characteristic of protocols must be accomplished or with purely timing business where a need of immediate treatment is clear. The library, as well as every ordinary project which employs this library, contains a file of interrupt handler routines. According to a STM32 start-up vector file, which, among others, sets a vector table entry with exception handler addresses (this means that it defines the names of all handlers), a handler must be defined for every possible exception-interrupt source even if that may be empty and unused. Therefore, the file of the handler routines comprises also the handlers of peripherals which are not involved in the application. The GL_Delay(uint32_t nCount) function stops the code execution of the processor in an empty “while-loop” for a defined time delay. There is a global variable TimingDelay and another complementing routine called TimingDelay_Decrement, which must be taken into account at the process of comprehension. The delay routine, first of all, sets TimingDelay with an entered nCount number, enables the SysTick counter and then it sticks at while- loop, waiting until the TimingDelay is equal to zero. The TimingDelay value is decremented by routine, as its name suggests, decrement TimeDelay, which is launched by SysTick interrupt handler every time the counter reaches zero. Therefore, the nCount variable multiplied by a SysTick period (which is fixed to 10 ms) is the total time latency caused by delay procedure. Table 73 describes the GL_Delay function of the hardware abstraction layer. Table 73. GL_Delay Name Description Function name GL_Delay Function prototype void GL_Delay (uint32_t nCount) Behavior description Inserts a delay time Input parameter {x} nCount: specifies the delay time length (time base 10 ms) Output parameter {x} None Return value None Required preconditions None Called functions None |
|
Link URL |
| Czy Alldatasheet okazała się pomocna? [ DONATE ] |
O Alldatasheet | Reklama | Kontakt | Polityka prywatności | Link do karty katalogowej | Linki | Lista producentów All Rights Reserved©Alldatasheet.com |
| 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 |