ARM Macro Assembler Page 1 1 00000000 PRESERVE8 2 00000000 THUMB 3 00000000 include ./Driver/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 44 00000000 ; * @retval None 45 00000000 ; */ 46 00000000 47 00000000 ;void GPIOA_Clear(char Broche); 48 00000000 import GPIOA_Clear 49 00000000 ARM Macro Assembler Page 2 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 4 00000000 5 00000000 6 00000000 ; ====================== zone de r�servation de donnï¿ ½es, ====================================== 7 00000000 ;Section RAM (read only) : 8 00000000 area mesdata,data,readonly 9 00000000 extern Son 10 00000000 extern LongueurSon 11 00000000 12 00000000 ;Section RAM (read write): 13 00000000 area maram,data,readwrite 14 00000000 15 00000000 export SortieSon 16 00000000 00 00 SortieSon dcw 0 ;Declaration d'une variable sur 16bits 17 00000002 00 00 00000000 index dcd 0 18 00000008 19 00000008 20 00000008 21 00000008 ; ====================================================== ========================================= 22 00000008 23 00000008 24 00000008 25 00000008 26 00000008 ;Section ROM code (read only) : 27 00000008 area moncode,code,readonly 28 00000000 ; �crire le code ici 29 00000000 30 00000000 export CallbackSon 31 00000000 CallbackSon proc 32 00000000 33 00000000 B500 push {lr} 34 00000002 B420 push {r5} 35 00000004 36 00000004 4812 ldr r0, =Son ;r0=&Son 37 00000006 4A13 ldr r2, =index ; r2=&index 38 00000008 6811 ldr r1, [r2] ; r1 = index 39 0000000A 40 0000000A 4D13 ldr r5, = LongueurSon ; r5 = &LongueurSon 41 0000000C 682D ldr r5, [r5] ; r5 = LongueurSon ; r5 = LongueurSon 42 0000000E EA4F 0545 lsl r5, #1 ; r5 = 2 x Longueur Son 43 00000012 44 00000012 42A9 cmp r1, r5 ; compare index et ARM Macro Assembler Page 3 length 45 00000014 DC14 bgt done 46 00000016 47 00000016 5E43 ldrsh r3, [r0, r1] ;r3=son[index] 48 00000018 ; on aurait pu faire ldrsh r3, [r0, r1, lsl #1] et incre menter de 1 49 00000018 F101 0102 add r1, #2 ; index +=2 50 0000001C 6011 str r1, [r2] ; index en memoire= r1 51 0000001E 52 0000001E ;Normalisation de la valeur son [index] 53 0000001E F503 4300 add r3, #32768 ;r3+=32278 54 00000022 55 00000022 B410 push {r4} 56 00000024 F240 24CF mov r4, #719 ; r4 = 719 57 00000028 FB03 F304 mul r3,r4 ;r3*=719 58 0000002C EA4F 4323 asr r3, #16 ;r3/=65536 59 00000030 BC10 pop {r4} 60 00000032 61 00000032 ;On met la valeur modifiee dans SortieSon 62 00000032 480A ldr r0, =SortieSon ;r0=&SortieSon 63 00000034 6003 str r3, [r0] 64 00000036 65 00000036 B40F push {r0-r3} 66 00000038 4618 mov r0,r3 67 0000003A F7FF FFFE bl PWM_Set_Value_TIM3_Ch3 68 0000003E BC0F pop {r0-r3} 69 00000040 70 00000040 done 71 00000040 72 00000040 BC20 pop {r5} 73 00000042 BD00 pop {pc} 74 00000044 endp 75 00000044 76 00000044 77 00000044 export StartSon 78 00000044 StartSon proc 79 00000044 B500 push {lr} 80 00000046 4A03 ldr r2, =index ; r2=&index 81 00000048 F04F 0100 mov r1, #0 ;r1 =0 82 0000004C 6011 str r1, [r2] ;on ecrit 0 dans in dex 83 0000004E 84 0000004E 85 0000004E BD00 pop {pc} 86 00000050 endp 87 00000050 88 00000050 89 00000050 90 00000050 91 00000050 92 00000050 93 00000050 END 00000000 00000000 00000000 00000000 Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw ARM Macro Assembler Page 4 ork --depend=.\obj\gestionson.d -o.\obj\gestionson.o -I.\Src -I.\RTE\_Simu -IC: \Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Programdata \Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include --predefine="__EVAL SET A 1" --predefine="__MICROLIB SETA 1" --predefine="__UVISION_VERSION SETA 534" - -predefine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1" --predefine="_RTE_ 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 8 in file Src\GestionSon.s Uses None Comment: mesdata unused 1 symbol ARM Macro Assembler Page 1 Alphabetic symbol ordering Relocatable symbols SortieSon 00000000 Symbol: SortieSon Definitions At line 16 in file Src\GestionSon.s Uses At line 15 in file Src\GestionSon.s At line 62 in file Src\GestionSon.s index 00000004 Symbol: index Definitions At line 17 in file Src\GestionSon.s Uses At line 37 in file Src\GestionSon.s At line 80 in file Src\GestionSon.s maram 00000000 Symbol: maram Definitions At line 13 in file Src\GestionSon.s Uses None Comment: maram unused 3 symbols ARM Macro Assembler Page 1 Alphabetic symbol ordering Relocatable symbols CallbackSon 00000000 Symbol: CallbackSon Definitions At line 31 in file Src\GestionSon.s Uses At line 30 in file Src\GestionSon.s Comment: CallbackSon used once StartSon 00000044 Symbol: StartSon Definitions At line 78 in file Src\GestionSon.s Uses At line 77 in file Src\GestionSon.s Comment: StartSon used once done 00000040 Symbol: done Definitions At line 70 in file Src\GestionSon.s Uses At line 45 in file Src\GestionSon.s Comment: done used once moncode 00000000 Symbol: moncode Definitions At line 27 in file Src\GestionSon.s Uses None Comment: moncode unused 4 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 10 in file Src\GestionSon.s Uses At line 40 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 67 in file Src\GestionSon.s Comment: PWM_Set_Value_TIM3_Ch3 used once Son 00000000 Symbol: Son Definitions At line 9 in file Src\GestionSon.s Uses At line 36 in file Src\GestionSon.s Comment: Son used once 9 symbols 354 symbols in table