390 lines
12 KiB
Text
390 lines
12 KiB
Text
|
|
|
|
|
|
ARM Macro Assembler Page 1
|
|
|
|
|
|
1 00000000 PRESERVE8
|
|
2 00000000 THUMB
|
|
3 00000000
|
|
4 00000000 export CallbackSon
|
|
5 00000000 export StartSon
|
|
6 00000000 import Son
|
|
7 00000000 import LongueurSon
|
|
8 00000000
|
|
9 00000000 include DriverJeuLaser.inc
|
|
1 00000000
|
|
2 00000000 ; Bibliotheque DriverJeuLaser (ancienne gassp72 adaptée
|
|
2021 - TR)
|
|
3 00000000 ; Accès en aux fonctions suivantes :
|
|
4 00000000 ; GPIO :
|
|
5 00000000 ; GPIOA_Set(char Broche), GPIOB_Set(char Broche), GPIOC_
|
|
Set(char Broche)
|
|
6 00000000 ; GPIOA_Clear(char Broche), GPIOB_Clear(char Broche), GP
|
|
IOC_Clear(char Broche)
|
|
7 00000000
|
|
8 00000000 ; PWM :
|
|
9 00000000 ;/**
|
|
10 00000000 ; * @brief Fixe une valeur de PWM, Val, en tick horloge
|
|
. La rapport cyclique effectif
|
|
11 00000000 ; * est donc : rcy = Thaut_ticks / Periode_ticks
|
|
12 00000000 ; * @note spécifique Jeu Laser, PWM liée exclusivement
|
|
au TIM3, chan3
|
|
13 00000000 ; * @param Thaut_ticks : durée de l'état haut d'une imp
|
|
ulsion en Ticks
|
|
14 00000000 ; * @retval None
|
|
15 00000000 ; */
|
|
16 00000000
|
|
17 00000000 ;void PWM_Set_Value_TIM3_Ch3( unsigned short int Thaut_t
|
|
icks);
|
|
18 00000000 import PWM_Set_Value_TIM3_Ch3
|
|
19 00000000
|
|
20 00000000
|
|
21 00000000
|
|
22 00000000 ;/**
|
|
23 00000000 ; * @brief Mise à 1 d'une broche GPIO
|
|
24 00000000 ; * @note Une fonction par GPIO
|
|
25 00000000 ; * @param Broche : 0 à 15
|
|
26 00000000 ; * @retval None
|
|
27 00000000 ; */
|
|
28 00000000
|
|
29 00000000 ;void GPIOA_Set(char Broche);
|
|
30 00000000 import GPIOA_Set
|
|
31 00000000
|
|
32 00000000 ;void GPIOB_Set(char Broche);
|
|
33 00000000 import GPIOB_Set
|
|
34 00000000
|
|
35 00000000 ;void GPIOC_Set(char Broche);
|
|
36 00000000 import GPIOC_Set
|
|
37 00000000
|
|
38 00000000
|
|
39 00000000
|
|
40 00000000 ;/**
|
|
41 00000000 ; * @brief Mise à 0 d'une broche GPIO
|
|
42 00000000 ; * @note Une fonction par GPIO
|
|
43 00000000 ; * @param Broche : 0 à 15
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 2
|
|
|
|
|
|
44 00000000 ; * @retval None
|
|
45 00000000 ; */
|
|
46 00000000
|
|
47 00000000 ;void GPIOA_Clear(char Broche);
|
|
48 00000000 import GPIOA_Clear
|
|
49 00000000
|
|
50 00000000 ;void GPIOB_Clear(char Broche);
|
|
51 00000000 import GPIOB_Clear
|
|
52 00000000
|
|
53 00000000 ;void GPIOC_Clear(char Broche);
|
|
54 00000000 import GPIOC_Clear
|
|
55 00000000
|
|
56 00000000 end
|
|
10 00000000
|
|
11 00000000
|
|
12 00000000
|
|
13 00000000 ; ====================== zone de réservation de données,
|
|
======================================
|
|
14 00000000 ;Section RAM (read only) :
|
|
15 00000000 area mesdata,data,readonly
|
|
16 00000000
|
|
17 00000000
|
|
18 00000000 ;Section RAM (read write):
|
|
19 00000000 area maram,data,readwrite
|
|
20 00000000
|
|
21 00000000 00 00 SortieSon
|
|
dcw 0 ; reserve seulement
|
|
2 octet de memoire
|
|
|
|
22 00000002 00 00 Index dcw 0
|
|
23 00000004
|
|
24 00000004 ; ======================================================
|
|
=========================================
|
|
25 00000004
|
|
26 00000004
|
|
27 00000004
|
|
28 00000004
|
|
29 00000004 ;Section ROM code (read only) :
|
|
30 00000004 area moncode,code,readonly
|
|
31 00000000 ; écrire le code ici
|
|
32 00000000 ;
|
|
33 00000000 ;if (i<LongueurSon) {
|
|
34 00000000 ;
|
|
35 00000000 ; sample = Son[i];
|
|
36 00000000 ; SortieSon = sample * (720/65536) + 360
|
|
37 00000000 ; i++;
|
|
38 00000000 ;}else {
|
|
39 00000000 ; i=0;
|
|
40 00000000 ;}
|
|
41 00000000
|
|
42 00000000 StartSon
|
|
proc
|
|
43 00000000
|
|
44 00000000 4810 ldr r0, = Index ; ; On charge la
|
|
valeur d'index
|
|
45 00000002 F04F 0100 mov r1, #0
|
|
46 00000006 8001 strh r1, [r0]
|
|
47 00000008
|
|
48 00000008 4770 bx lr
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 3
|
|
|
|
|
|
49 0000000A endp
|
|
50 0000000A
|
|
51 0000000A CallbackSon
|
|
proc
|
|
52 0000000A B500 push {lr}
|
|
53 0000000C
|
|
54 0000000C 480D ldr r0, = Index ; ; On charge la
|
|
valeur d'index
|
|
55 0000000E 6801 ldr r1, [r0] ;
|
|
56 00000010 4A0D ldr r2, = LongueurSon ; ; On charg
|
|
e la valeur de la l
|
|
ongueur son
|
|
57 00000012 6813 ldr r3, [r2] ;
|
|
58 00000014
|
|
59 00000014 428B cmp r3, r1 ; On regarde si on
|
|
est arrivé au bout
|
|
du tableau
|
|
60 00000016 DD0F ble Sinon
|
|
61 00000018
|
|
62 00000018 4A0C ldr r2, = Son ; ; On charge la
|
|
valeur de la bonne
|
|
|
|
63 0000001A F932 3011 ldrsh r3, [r2, r1, LSL #1]
|
|
; ligne de son
|
|
64 0000001E
|
|
65 0000001E F101 0101 add r1, r1, #1 ; On store l'index
|
|
et on l'incrémente
|
|
de 1
|
|
66 00000022 8001 strh r1, [r0]
|
|
67 00000024
|
|
68 00000024 ;add r3, #32768 ; On ajoute 32768
|
|
69 00000024 F44F 71B4 mov r1, #360 ; On multiplie par
|
|
720
|
|
70 00000028 FB01 F303 mul r3, r1, r3 ;
|
|
71 0000002C EA4F 33E3 asr r3, #15 ; On divise par 655
|
|
36
|
|
72 00000030 440B add r3, r1
|
|
73 00000032
|
|
74 00000032 4A07 ldr r2, = SortieSon
|
|
75 00000034 8013 strh r3, [r2] ; On sauvegarde la
|
|
valeur dans SortieS
|
|
on
|
|
76 00000036 E000 b fin
|
|
77 00000038
|
|
78 00000038 Sinon
|
|
79 00000038 ;mov r1, #0 ; On remet l'index à 0
|
|
80 00000038 6008 str r0, [r1] ; On store l'index
|
|
81 0000003A
|
|
82 0000003A fin
|
|
83 0000003A EXPORT SortieSon
|
|
84 0000003A 4618 mov r0, r3
|
|
85 0000003C F7FF FFFE bl PWM_Set_Value_TIM3_Ch3
|
|
86 00000040 BD00 pop {pc}
|
|
87 00000042 endp
|
|
88 00000042
|
|
89 00000042 END
|
|
00 00 00000000
|
|
00000000
|
|
00000000
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 4
|
|
|
|
|
|
00000000
|
|
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
|
|
ork --depend=.\obj\gestionson.d -o.\obj\gestionson.o -I.\Driver -I.\RTE\_Simu -
|
|
IC:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Programd
|
|
ata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include --predefine="__EVAL
|
|
SETA 1" --predefine="__MICROLIB SETA 1" --predefine="__UVISION_VERSION SETA 534
|
|
" --predefine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1" --predefine="_RT
|
|
E_ SETA 1" --list=gestionson.lst Src\GestionSon.s
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 1 Alphabetic symbol ordering
|
|
Relocatable symbols
|
|
|
|
mesdata 00000000
|
|
|
|
Symbol: mesdata
|
|
Definitions
|
|
At line 15 in file Src\GestionSon.s
|
|
Uses
|
|
None
|
|
Comment: mesdata unused
|
|
1 symbol
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 1 Alphabetic symbol ordering
|
|
Relocatable symbols
|
|
|
|
Index 00000002
|
|
|
|
Symbol: Index
|
|
Definitions
|
|
At line 22 in file Src\GestionSon.s
|
|
Uses
|
|
At line 44 in file Src\GestionSon.s
|
|
At line 54 in file Src\GestionSon.s
|
|
|
|
SortieSon 00000000
|
|
|
|
Symbol: SortieSon
|
|
Definitions
|
|
At line 21 in file Src\GestionSon.s
|
|
Uses
|
|
At line 74 in file Src\GestionSon.s
|
|
At line 83 in file Src\GestionSon.s
|
|
|
|
maram 00000000
|
|
|
|
Symbol: maram
|
|
Definitions
|
|
At line 19 in file Src\GestionSon.s
|
|
Uses
|
|
None
|
|
Comment: maram unused
|
|
3 symbols
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 1 Alphabetic symbol ordering
|
|
Relocatable symbols
|
|
|
|
CallbackSon 0000000A
|
|
|
|
Symbol: CallbackSon
|
|
Definitions
|
|
At line 51 in file Src\GestionSon.s
|
|
Uses
|
|
At line 4 in file Src\GestionSon.s
|
|
Comment: CallbackSon used once
|
|
Sinon 00000038
|
|
|
|
Symbol: Sinon
|
|
Definitions
|
|
At line 78 in file Src\GestionSon.s
|
|
Uses
|
|
At line 60 in file Src\GestionSon.s
|
|
Comment: Sinon used once
|
|
StartSon 00000000
|
|
|
|
Symbol: StartSon
|
|
Definitions
|
|
At line 42 in file Src\GestionSon.s
|
|
Uses
|
|
At line 5 in file Src\GestionSon.s
|
|
Comment: StartSon used once
|
|
fin 0000003A
|
|
|
|
Symbol: fin
|
|
Definitions
|
|
At line 82 in file Src\GestionSon.s
|
|
Uses
|
|
At line 76 in file Src\GestionSon.s
|
|
Comment: fin used once
|
|
moncode 00000000
|
|
|
|
Symbol: moncode
|
|
Definitions
|
|
At line 30 in file Src\GestionSon.s
|
|
Uses
|
|
None
|
|
Comment: moncode unused
|
|
5 symbols
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 1 Alphabetic symbol ordering
|
|
External symbols
|
|
|
|
GPIOA_Clear 00000000
|
|
|
|
Symbol: GPIOA_Clear
|
|
Definitions
|
|
At line 48 in file .\Driver\DriverJeuLaser.inc
|
|
Uses
|
|
None
|
|
Comment: GPIOA_Clear unused
|
|
GPIOA_Set 00000000
|
|
|
|
Symbol: GPIOA_Set
|
|
Definitions
|
|
At line 30 in file .\Driver\DriverJeuLaser.inc
|
|
Uses
|
|
None
|
|
Comment: GPIOA_Set unused
|
|
GPIOB_Clear 00000000
|
|
|
|
Symbol: GPIOB_Clear
|
|
Definitions
|
|
At line 51 in file .\Driver\DriverJeuLaser.inc
|
|
Uses
|
|
None
|
|
Comment: GPIOB_Clear unused
|
|
GPIOB_Set 00000000
|
|
|
|
Symbol: GPIOB_Set
|
|
Definitions
|
|
At line 33 in file .\Driver\DriverJeuLaser.inc
|
|
Uses
|
|
None
|
|
Comment: GPIOB_Set unused
|
|
GPIOC_Clear 00000000
|
|
|
|
Symbol: GPIOC_Clear
|
|
Definitions
|
|
At line 54 in file .\Driver\DriverJeuLaser.inc
|
|
Uses
|
|
None
|
|
Comment: GPIOC_Clear unused
|
|
GPIOC_Set 00000000
|
|
|
|
Symbol: GPIOC_Set
|
|
Definitions
|
|
At line 36 in file .\Driver\DriverJeuLaser.inc
|
|
Uses
|
|
None
|
|
Comment: GPIOC_Set unused
|
|
LongueurSon 00000000
|
|
|
|
Symbol: LongueurSon
|
|
Definitions
|
|
At line 7 in file Src\GestionSon.s
|
|
Uses
|
|
At line 56 in file Src\GestionSon.s
|
|
Comment: LongueurSon used once
|
|
PWM_Set_Value_TIM3_Ch3 00000000
|
|
|
|
Symbol: PWM_Set_Value_TIM3_Ch3
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 2 Alphabetic symbol ordering
|
|
External symbols
|
|
|
|
Definitions
|
|
At line 18 in file .\Driver\DriverJeuLaser.inc
|
|
Uses
|
|
At line 85 in file Src\GestionSon.s
|
|
Comment: PWM_Set_Value_TIM3_Ch3 used once
|
|
Son 00000000
|
|
|
|
Symbol: Son
|
|
Definitions
|
|
At line 6 in file Src\GestionSon.s
|
|
Uses
|
|
At line 62 in file Src\GestionSon.s
|
|
Comment: Son used once
|
|
9 symbols
|
|
355 symbols in table
|