blob: 3da84c91731438c62f96d24f1bb82401a1fd9f47 (
plain)
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
|
;/**
; ******************************************************************************
; * @file app_lld_tests_iar_asm.s
; * @brief Common functionalities for RF LLD tests that must be written
; * in assembler for IAR compilator
; ******************************************************************************
; * @attention
; *
; * Copyright (c) 2019 STMicroelectronics.
; * All rights reserved.
; *
; * This software is licensed under terms that can be found in the LICENSE file
; * in the root directory of this software component.
; * If no LICENSE file comes with this software, it is provided AS-IS.
; *
; ******************************************************************************
; */
;
;/**
; * @brief Active polling for a given delay
; * @param microsec the delay in us unit
; *
; * Caution:
; * - This function has been implemented for system clock set to 16MHz. It must
; * be rewiewed (twice more NOP) for 32Mhz config.
; * - This function can be interrupted if used in interruptible part of code.
; * - Be careful with the use of critical section that can interrupt the reel
; * time during input microsec value.
; * - If 0 is given as input
; */
.global us_delay_16m
.section .text.us_delay_16m
us_delay_16m:
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
SUB R0, R0, #1
BHI us_delay_16m
BX LR
.global us_delay_32m
.section .text.us_delay_32m
us_delay_32m:
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
SUB R0, R0, #1
BHI us_delay_32m
BX LR
|