Modified Driver_Timer to allow generic PWM configuration
This commit is contained in:
parent
d339c709f4
commit
3ed3a68f15
12 changed files with 110 additions and 83 deletions
|
@ -37,10 +37,41 @@ void MyTimer_Stop(MyTimer_Struct_TypeDef * Timer)
|
||||||
Timer->Timer->CR1 &= ~TIM_CR1_CEN;
|
Timer->Timer->CR1 &= ~TIM_CR1_CEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyTimer_ConfigurePWM(MyTimer_Struct_TypeDef *Timer, uint16_t duty_cycle) {
|
// Note : PWM Tested on PA0
|
||||||
Timer->Timer->CCMR1 |= 0x6 << 0xC;
|
void MyTimer_ConfigurePWM(MyTimer_Struct_TypeDef *Timer, uint8_t channel, uint16_t duty_cycle) {
|
||||||
Timer->Timer->CCR2 = (duty_cycle * Timer->ARR) / 100;
|
|
||||||
Timer->Timer->CCER |= TIM_CCER_CC2E;
|
uint16_t CCR_Value = (duty_cycle * TIM2->ARR) / 100;
|
||||||
|
|
||||||
|
// Configurer le Timer en mode PWM
|
||||||
|
|
||||||
|
|
||||||
|
// Configurer le Channel
|
||||||
|
if (channel == 1) {
|
||||||
|
Timer->Timer->CCMR1 = TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1;
|
||||||
|
Timer->Timer->CCMR1 |= TIM_CCMR1_OC1PE; // activer la précharge du registre de comparaison
|
||||||
|
Timer->Timer->CCER |= TIM_CCER_CC1E;
|
||||||
|
Timer->Timer->CCR1 = CCR_Value;
|
||||||
|
} else if (channel == 2) {
|
||||||
|
Timer->Timer->CCMR1 = TIM_CCMR1_OC2M_2 | TIM_CCMR1_OC2M_1;
|
||||||
|
Timer->Timer->CCMR1 |= TIM_CCMR1_OC2PE; // activer la précharge du registre de comparaison
|
||||||
|
Timer->Timer->CCER |= TIM_CCER_CC2E;
|
||||||
|
Timer->Timer->CCR2 = CCR_Value;
|
||||||
|
} else if (channel == 3) {
|
||||||
|
Timer->Timer->CCMR2 = TIM_CCMR2_OC3M_2 | TIM_CCMR2_OC3M_1;
|
||||||
|
Timer->Timer->CCMR2 |= TIM_CCMR2_OC3PE; // activer la précharge du registre de comparaison
|
||||||
|
Timer->Timer->CCER |= TIM_CCER_CC3E;
|
||||||
|
Timer->Timer->CCER &= ~TIM_CCER_CC3P;
|
||||||
|
Timer->Timer->CCR3 = CCR_Value;
|
||||||
|
} else if (channel == 4) {
|
||||||
|
Timer->Timer->CCMR2 = TIM_CCMR2_OC4M_2 | TIM_CCMR2_OC4M_1;
|
||||||
|
Timer->Timer->CCMR2 |= TIM_CCMR2_OC4PE; // activer la précharge du registre de comparaison
|
||||||
|
Timer->Timer->CCER |= TIM_CCER_CC4E;
|
||||||
|
Timer->Timer->CCR4 = CCR_Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bug (void)
|
void Bug (void)
|
||||||
|
|
|
@ -46,6 +46,6 @@ void MyTimer_ActiveIT (TIM_TypeDef * Timer, char Prio, void (*IT_function)(void)
|
||||||
*/
|
*/
|
||||||
void MyTimer_PWM(TIM_TypeDef * Timer, char Channel);
|
void MyTimer_PWM(TIM_TypeDef * Timer, char Channel);
|
||||||
|
|
||||||
void MyTimer_ConfigurePWM(MyTimer_Struct_TypeDef *Timer, uint16_t duty_cycle);
|
void MyTimer_ConfigurePWM(MyTimer_Struct_TypeDef *Timer, uint8_t pwm_channel, uint16_t duty_cycle);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -148,15 +148,15 @@ Image Symbol Table
|
||||||
[Anonymous Symbol] 0x080001e8 Section 0 driver_gpio.o(.text.MyGPIO_Set)
|
[Anonymous Symbol] 0x080001e8 Section 0 driver_gpio.o(.text.MyGPIO_Set)
|
||||||
[Anonymous Symbol] 0x080001f8 Section 0 driver_timer.o(.text.MyTimer_Base_Init)
|
[Anonymous Symbol] 0x080001f8 Section 0 driver_timer.o(.text.MyTimer_Base_Init)
|
||||||
[Anonymous Symbol] 0x08000284 Section 0 driver_timer.o(.text.MyTimer_ConfigurePWM)
|
[Anonymous Symbol] 0x08000284 Section 0 driver_timer.o(.text.MyTimer_ConfigurePWM)
|
||||||
[Anonymous Symbol] 0x080002ac Section 0 driver_timer.o(.text.MyTimer_Start)
|
[Anonymous Symbol] 0x0800032c Section 0 driver_timer.o(.text.MyTimer_Start)
|
||||||
[Anonymous Symbol] 0x080002b8 Section 0 system_stm32f10x.o(.text.SystemInit)
|
[Anonymous Symbol] 0x08000338 Section 0 system_stm32f10x.o(.text.SystemInit)
|
||||||
[Anonymous Symbol] 0x080003c8 Section 0 driver_timer.o(.text.TIM2_IRQHandler)
|
[Anonymous Symbol] 0x08000448 Section 0 driver_timer.o(.text.TIM2_IRQHandler)
|
||||||
[Anonymous Symbol] 0x080003e4 Section 0 driver_timer.o(.text.TIM3_IRQHandler)
|
[Anonymous Symbol] 0x08000464 Section 0 driver_timer.o(.text.TIM3_IRQHandler)
|
||||||
[Anonymous Symbol] 0x08000400 Section 0 driver_timer.o(.text.TIM4_IRQHandler)
|
[Anonymous Symbol] 0x08000480 Section 0 driver_timer.o(.text.TIM4_IRQHandler)
|
||||||
[Anonymous Symbol] 0x0800041c Section 0 main.o(.text.main)
|
[Anonymous Symbol] 0x0800049c Section 0 main.o(.text.main)
|
||||||
i.__scatterload_copy 0x0800047a Section 14 handlers.o(i.__scatterload_copy)
|
i.__scatterload_copy 0x080004fa Section 14 handlers.o(i.__scatterload_copy)
|
||||||
i.__scatterload_null 0x08000488 Section 2 handlers.o(i.__scatterload_null)
|
i.__scatterload_null 0x08000508 Section 2 handlers.o(i.__scatterload_null)
|
||||||
i.__scatterload_zeroinit 0x0800048a Section 14 handlers.o(i.__scatterload_zeroinit)
|
i.__scatterload_zeroinit 0x0800050a Section 14 handlers.o(i.__scatterload_zeroinit)
|
||||||
STACK 0x20000010 Section 1024 startup_stm32f10x_md.o(STACK)
|
STACK 0x20000010 Section 1024 startup_stm32f10x_md.o(STACK)
|
||||||
|
|
||||||
Global Symbols
|
Global Symbols
|
||||||
|
@ -237,18 +237,18 @@ Image Symbol Table
|
||||||
MyGPIO_Init 0x0800014d Thumb Code 140 driver_gpio.o(.text.MyGPIO_Init)
|
MyGPIO_Init 0x0800014d Thumb Code 140 driver_gpio.o(.text.MyGPIO_Init)
|
||||||
MyGPIO_Set 0x080001e9 Thumb Code 14 driver_gpio.o(.text.MyGPIO_Set)
|
MyGPIO_Set 0x080001e9 Thumb Code 14 driver_gpio.o(.text.MyGPIO_Set)
|
||||||
MyTimer_Base_Init 0x080001f9 Thumb Code 140 driver_timer.o(.text.MyTimer_Base_Init)
|
MyTimer_Base_Init 0x080001f9 Thumb Code 140 driver_timer.o(.text.MyTimer_Base_Init)
|
||||||
MyTimer_ConfigurePWM 0x08000285 Thumb Code 40 driver_timer.o(.text.MyTimer_ConfigurePWM)
|
MyTimer_ConfigurePWM 0x08000285 Thumb Code 168 driver_timer.o(.text.MyTimer_ConfigurePWM)
|
||||||
MyTimer_Start 0x080002ad Thumb Code 12 driver_timer.o(.text.MyTimer_Start)
|
MyTimer_Start 0x0800032d Thumb Code 12 driver_timer.o(.text.MyTimer_Start)
|
||||||
SystemInit 0x080002b9 Thumb Code 272 system_stm32f10x.o(.text.SystemInit)
|
SystemInit 0x08000339 Thumb Code 272 system_stm32f10x.o(.text.SystemInit)
|
||||||
TIM2_IRQHandler 0x080003c9 Thumb Code 26 driver_timer.o(.text.TIM2_IRQHandler)
|
TIM2_IRQHandler 0x08000449 Thumb Code 26 driver_timer.o(.text.TIM2_IRQHandler)
|
||||||
TIM3_IRQHandler 0x080003e5 Thumb Code 28 driver_timer.o(.text.TIM3_IRQHandler)
|
TIM3_IRQHandler 0x08000465 Thumb Code 28 driver_timer.o(.text.TIM3_IRQHandler)
|
||||||
TIM4_IRQHandler 0x08000401 Thumb Code 28 driver_timer.o(.text.TIM4_IRQHandler)
|
TIM4_IRQHandler 0x08000481 Thumb Code 28 driver_timer.o(.text.TIM4_IRQHandler)
|
||||||
main 0x0800041d Thumb Code 94 main.o(.text.main)
|
main 0x0800049d Thumb Code 94 main.o(.text.main)
|
||||||
__scatterload_copy 0x0800047b Thumb Code 14 handlers.o(i.__scatterload_copy)
|
__scatterload_copy 0x080004fb Thumb Code 14 handlers.o(i.__scatterload_copy)
|
||||||
__scatterload_null 0x08000489 Thumb Code 2 handlers.o(i.__scatterload_null)
|
__scatterload_null 0x08000509 Thumb Code 2 handlers.o(i.__scatterload_null)
|
||||||
__scatterload_zeroinit 0x0800048b Thumb Code 14 handlers.o(i.__scatterload_zeroinit)
|
__scatterload_zeroinit 0x0800050b Thumb Code 14 handlers.o(i.__scatterload_zeroinit)
|
||||||
Region$$Table$$Base 0x08000498 Number 0 anon$$obj.o(Region$$Table)
|
Region$$Table$$Base 0x08000518 Number 0 anon$$obj.o(Region$$Table)
|
||||||
Region$$Table$$Limit 0x080004b8 Number 0 anon$$obj.o(Region$$Table)
|
Region$$Table$$Limit 0x08000538 Number 0 anon$$obj.o(Region$$Table)
|
||||||
TIM2_fx 0x20000000 Data 4 driver_timer.o(.data.TIM2_fx)
|
TIM2_fx 0x20000000 Data 4 driver_timer.o(.data.TIM2_fx)
|
||||||
TIM3_fx 0x20000004 Data 4 driver_timer.o(.data.TIM3_fx)
|
TIM3_fx 0x20000004 Data 4 driver_timer.o(.data.TIM3_fx)
|
||||||
TIM4_fx 0x20000008 Data 4 driver_timer.o(.data.TIM4_fx)
|
TIM4_fx 0x20000008 Data 4 driver_timer.o(.data.TIM4_fx)
|
||||||
|
@ -262,9 +262,9 @@ Memory Map of the image
|
||||||
|
|
||||||
Image Entry point : 0x08000101
|
Image Entry point : 0x08000101
|
||||||
|
|
||||||
Load Region LR_1 (Base: 0x08000000, Size: 0x000004c4, Max: 0xffffffff, ABSOLUTE)
|
Load Region LR_1 (Base: 0x08000000, Size: 0x00000544, Max: 0xffffffff, ABSOLUTE)
|
||||||
|
|
||||||
Execution Region ER_RO (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x000004b8, Max: 0xffffffff, ABSOLUTE)
|
Execution Region ER_RO (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x00000538, Max: 0xffffffff, ABSOLUTE)
|
||||||
|
|
||||||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||||
|
|
||||||
|
@ -286,30 +286,30 @@ Memory Map of the image
|
||||||
0x080001e8 0x080001e8 0x0000000e Code RO 15 .text.MyGPIO_Set driver_gpio.o
|
0x080001e8 0x080001e8 0x0000000e Code RO 15 .text.MyGPIO_Set driver_gpio.o
|
||||||
0x080001f6 0x080001f6 0x00000002 PAD
|
0x080001f6 0x080001f6 0x00000002 PAD
|
||||||
0x080001f8 0x080001f8 0x0000008c Code RO 29 .text.MyTimer_Base_Init driver_timer.o
|
0x080001f8 0x080001f8 0x0000008c Code RO 29 .text.MyTimer_Base_Init driver_timer.o
|
||||||
0x08000284 0x08000284 0x00000028 Code RO 35 .text.MyTimer_ConfigurePWM driver_timer.o
|
0x08000284 0x08000284 0x000000a8 Code RO 35 .text.MyTimer_ConfigurePWM driver_timer.o
|
||||||
0x080002ac 0x080002ac 0x0000000c Code RO 31 .text.MyTimer_Start driver_timer.o
|
0x0800032c 0x0800032c 0x0000000c Code RO 31 .text.MyTimer_Start driver_timer.o
|
||||||
0x080002b8 0x080002b8 0x00000110 Code RO 68 .text.SystemInit system_stm32f10x.o
|
0x08000338 0x08000338 0x00000110 Code RO 68 .text.SystemInit system_stm32f10x.o
|
||||||
0x080003c8 0x080003c8 0x0000001a Code RO 41 .text.TIM2_IRQHandler driver_timer.o
|
0x08000448 0x08000448 0x0000001a Code RO 41 .text.TIM2_IRQHandler driver_timer.o
|
||||||
0x080003e2 0x080003e2 0x00000002 PAD
|
0x08000462 0x08000462 0x00000002 PAD
|
||||||
0x080003e4 0x080003e4 0x0000001c Code RO 43 .text.TIM3_IRQHandler driver_timer.o
|
0x08000464 0x08000464 0x0000001c Code RO 43 .text.TIM3_IRQHandler driver_timer.o
|
||||||
0x08000400 0x08000400 0x0000001c Code RO 45 .text.TIM4_IRQHandler driver_timer.o
|
0x08000480 0x08000480 0x0000001c Code RO 45 .text.TIM4_IRQHandler driver_timer.o
|
||||||
0x0800041c 0x0800041c 0x0000005e Code RO 2 .text.main main.o
|
0x0800049c 0x0800049c 0x0000005e Code RO 2 .text.main main.o
|
||||||
0x0800047a 0x0800047a 0x0000000e Code RO 102 i.__scatterload_copy mc_w.l(handlers.o)
|
0x080004fa 0x080004fa 0x0000000e Code RO 102 i.__scatterload_copy mc_w.l(handlers.o)
|
||||||
0x08000488 0x08000488 0x00000002 Code RO 103 i.__scatterload_null mc_w.l(handlers.o)
|
0x08000508 0x08000508 0x00000002 Code RO 103 i.__scatterload_null mc_w.l(handlers.o)
|
||||||
0x0800048a 0x0800048a 0x0000000e Code RO 104 i.__scatterload_zeroinit mc_w.l(handlers.o)
|
0x0800050a 0x0800050a 0x0000000e Code RO 104 i.__scatterload_zeroinit mc_w.l(handlers.o)
|
||||||
0x08000498 0x08000498 0x00000020 Data RO 101 Region$$Table anon$$obj.o
|
0x08000518 0x08000518 0x00000020 Data RO 101 Region$$Table anon$$obj.o
|
||||||
|
|
||||||
|
|
||||||
Execution Region ER_RW (Exec base: 0x20000000, Load base: 0x080004b8, Size: 0x0000000c, Max: 0xffffffff, ABSOLUTE)
|
Execution Region ER_RW (Exec base: 0x20000000, Load base: 0x08000538, Size: 0x0000000c, Max: 0xffffffff, ABSOLUTE)
|
||||||
|
|
||||||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||||
|
|
||||||
0x20000000 0x080004b8 0x00000004 Data RW 47 .data.TIM2_fx driver_timer.o
|
0x20000000 0x08000538 0x00000004 Data RW 47 .data.TIM2_fx driver_timer.o
|
||||||
0x20000004 0x080004bc 0x00000004 Data RW 48 .data.TIM3_fx driver_timer.o
|
0x20000004 0x0800053c 0x00000004 Data RW 48 .data.TIM3_fx driver_timer.o
|
||||||
0x20000008 0x080004c0 0x00000004 Data RW 49 .data.TIM4_fx driver_timer.o
|
0x20000008 0x08000540 0x00000004 Data RW 49 .data.TIM4_fx driver_timer.o
|
||||||
|
|
||||||
|
|
||||||
Execution Region ER_ZI (Exec base: 0x20000010, Load base: 0x080004c4, Size: 0x00000400, Max: 0xffffffff, ABSOLUTE)
|
Execution Region ER_ZI (Exec base: 0x20000010, Load base: 0x08000544, Size: 0x00000400, Max: 0xffffffff, ABSOLUTE)
|
||||||
|
|
||||||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||||
|
|
||||||
|
@ -324,13 +324,13 @@ Image component sizes
|
||||||
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
|
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
|
||||||
|
|
||||||
170 16 0 0 0 2108 driver_gpio.o
|
170 16 0 0 0 2108 driver_gpio.o
|
||||||
276 0 0 12 0 6396 driver_timer.o
|
404 4 0 12 0 6789 driver_timer.o
|
||||||
94 0 0 0 0 2087 main.o
|
94 0 0 0 0 2087 main.o
|
||||||
36 8 236 0 1024 860 startup_stm32f10x_md.o
|
36 8 236 0 1024 860 startup_stm32f10x_md.o
|
||||||
272 0 0 0 0 2813 system_stm32f10x.o
|
272 0 0 0 0 2813 system_stm32f10x.o
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
854 24 268 12 1024 14264 Object Totals
|
982 28 268 12 1024 14657 Object Totals
|
||||||
0 0 32 0 0 0 (incl. Generated)
|
0 0 32 0 0 0 (incl. Generated)
|
||||||
6 0 0 0 0 0 (incl. Padding)
|
6 0 0 0 0 0 (incl. Padding)
|
||||||
|
|
||||||
|
@ -369,15 +369,15 @@ Image component sizes
|
||||||
|
|
||||||
Code (inc. data) RO Data RW Data ZI Data Debug
|
Code (inc. data) RO Data RW Data ZI Data Debug
|
||||||
|
|
||||||
940 40 268 12 1024 14424 Grand Totals
|
1068 44 268 12 1024 14817 Grand Totals
|
||||||
940 40 268 12 1024 14424 ELF Image Totals
|
1068 44 268 12 1024 14817 ELF Image Totals
|
||||||
940 40 268 12 0 0 ROM Totals
|
1068 44 268 12 0 0 ROM Totals
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
Total RO Size (Code + RO Data) 1208 ( 1.18kB)
|
Total RO Size (Code + RO Data) 1336 ( 1.30kB)
|
||||||
Total RW Size (RW Data + ZI Data) 1036 ( 1.01kB)
|
Total RW Size (RW Data + ZI Data) 1036 ( 1.01kB)
|
||||||
Total ROM Size (Code + RO Data + RW Data) 1220 ( 1.19kB)
|
Total ROM Size (Code + RO Data + RW Data) 1348 ( 1.32kB)
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -34,7 +34,7 @@ compiling system_stm32f10x.c...
|
||||||
compiling Driver_GPIO.c...
|
compiling Driver_GPIO.c...
|
||||||
compiling Driver_Timer.c...
|
compiling Driver_Timer.c...
|
||||||
linking...
|
linking...
|
||||||
Program Size: Code=940 RO-data=268 RW-data=12 ZI-data=1024
|
Program Size: Code=1068 RO-data=268 RW-data=12 ZI-data=1024
|
||||||
".\Objects\projet-voilier_reel.axf" - 0 Error(s), 0 Warning(s).
|
".\Objects\projet-voilier_reel.axf" - 0 Error(s), 0 Warning(s).
|
||||||
|
|
||||||
<h2>Software Packages used:</h2>
|
<h2>Software Packages used:</h2>
|
||||||
|
@ -63,8 +63,8 @@ Package Vendor: Keil
|
||||||
|
|
||||||
* Component: Keil::Device:Startup:1.0.0
|
* Component: Keil::Device:Startup:1.0.0
|
||||||
Source file: Device/Source/ARM/startup_stm32f10x_md.s
|
Source file: Device/Source/ARM/startup_stm32f10x_md.s
|
||||||
Source file: Device/Source/ARM/STM32F1xx_OPT.s
|
|
||||||
Include file: RTE_Driver/Config/RTE_Device.h
|
Include file: RTE_Driver/Config/RTE_Device.h
|
||||||
|
Source file: Device/Source/ARM/STM32F1xx_OPT.s
|
||||||
Source file: Device/Source/system_stm32f10x.c
|
Source file: Device/Source/system_stm32f10x.c
|
||||||
Build Time Elapsed: 00:00:01
|
Build Time Elapsed: 00:00:01
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Dependencies for Project 'projet-voilier', Target 'reel': (DO NOT MODIFY !)
|
Dependencies for Project 'projet-voilier', Target 'reel': (DO NOT MODIFY !)
|
||||||
CompilerVersion: 6190000::V6.19::ARMCLANG
|
CompilerVersion: 6190000::V6.19::ARMCLANG
|
||||||
F (.\src\main.c)(0x6421A69F)(-xc -std=c90 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-D__EVAL -D__MICROLIB -gdwarf-4 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./src -I ../driver
-I./RTE/Device/STM32F103RB
-I./RTE/_reel
-IC:/Users/robin/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Users/robin/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.4.0/Device/Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o ./objects/main.o -MD)
|
F (.\src\main.c)(0x6425D0CF)(-xc -std=c90 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-D__EVAL -D__MICROLIB -gdwarf-4 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./src -I ../driver
-I./RTE/Device/STM32F103RB
-I./RTE/_reel
-IC:/Users/robin/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Users/robin/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.4.0/Device/Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o ./objects/main.o -MD)
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\stm32f10x.h)(0x61ADDBCE)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\stm32f10x.h)(0x61ADDBCE)
|
||||||
I (RTE\_reel\RTE_Components.h)(0x64218849)
|
I (RTE\_reel\RTE_Components.h)(0x64218849)
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\core_cm3.h)(0x626FAD4E)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\core_cm3.h)(0x626FAD4E)
|
||||||
|
@ -10,7 +10,7 @@ I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\cms
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\cmsis_armclang.h)(0x626FAD4E)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\cmsis_armclang.h)(0x626FAD4E)
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\system_stm32f10x.h)(0x61ADDBCE)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\system_stm32f10x.h)(0x61ADDBCE)
|
||||||
I (..\driver\Driver_GPIO.h)(0x641B050C)
|
I (..\driver\Driver_GPIO.h)(0x641B050C)
|
||||||
I (..\driver\Driver_Timer.h)(0x6421A591)
|
I (..\driver\Driver_Timer.h)(0x6421D747)
|
||||||
F (..\driver\Driver_GPIO.c)(0x641B050C)(-xc -std=c90 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-D__EVAL -D__MICROLIB -gdwarf-4 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./src -I ../driver
-I./RTE/Device/STM32F103RB
-I./RTE/_reel
-IC:/Users/robin/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Users/robin/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.4.0/Device/Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o ./objects/driver_gpio.o -MD)
|
F (..\driver\Driver_GPIO.c)(0x641B050C)(-xc -std=c90 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-D__EVAL -D__MICROLIB -gdwarf-4 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./src -I ../driver
-I./RTE/Device/STM32F103RB
-I./RTE/_reel
-IC:/Users/robin/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Users/robin/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.4.0/Device/Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o ./objects/driver_gpio.o -MD)
|
||||||
I (..\driver\Driver_GPIO.h)(0x641B050C)
|
I (..\driver\Driver_GPIO.h)(0x641B050C)
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\stm32f10x.h)(0x61ADDBCE)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\stm32f10x.h)(0x61ADDBCE)
|
||||||
|
@ -23,8 +23,8 @@ I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\cms
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\system_stm32f10x.h)(0x61ADDBCE)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\system_stm32f10x.h)(0x61ADDBCE)
|
||||||
I (C:\Keil_v5\ARM\ARMCLANG\include\stdio.h)(0x6388AB78)
|
I (C:\Keil_v5\ARM\ARMCLANG\include\stdio.h)(0x6388AB78)
|
||||||
F (..\driver\Driver_GPIO.h)(0x641B050C)()
|
F (..\driver\Driver_GPIO.h)(0x641B050C)()
|
||||||
F (..\driver\Driver_Timer.c)(0x6421A5B1)(-xc -std=c90 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-D__EVAL -D__MICROLIB -gdwarf-4 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./src -I ../driver
-I./RTE/Device/STM32F103RB
-I./RTE/_reel
-IC:/Users/robin/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Users/robin/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.4.0/Device/Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o ./objects/driver_timer.o -MD)
|
F (..\driver\Driver_Timer.c)(0x6425CEE2)(-xc -std=c90 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-D__EVAL -D__MICROLIB -gdwarf-4 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./src -I ../driver
-I./RTE/Device/STM32F103RB
-I./RTE/_reel
-IC:/Users/robin/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Users/robin/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.4.0/Device/Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o ./objects/driver_timer.o -MD)
|
||||||
I (..\driver\Driver_Timer.h)(0x6421A591)
|
I (..\driver\Driver_Timer.h)(0x6421D747)
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\stm32f10x.h)(0x61ADDBCE)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\stm32f10x.h)(0x61ADDBCE)
|
||||||
I (RTE\_reel\RTE_Components.h)(0x64218849)
|
I (RTE\_reel\RTE_Components.h)(0x64218849)
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\core_cm3.h)(0x626FAD4E)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\core_cm3.h)(0x626FAD4E)
|
||||||
|
@ -34,7 +34,7 @@ I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\cms
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\cmsis_armclang.h)(0x626FAD4E)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Core\Include\cmsis_armclang.h)(0x626FAD4E)
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\system_stm32f10x.h)(0x61ADDBCE)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\system_stm32f10x.h)(0x61ADDBCE)
|
||||||
I (C:\Keil_v5\ARM\ARMCLANG\include\stdio.h)(0x6388AB78)
|
I (C:\Keil_v5\ARM\ARMCLANG\include\stdio.h)(0x6388AB78)
|
||||||
F (..\driver\Driver_Timer.h)(0x6421A591)()
|
F (..\driver\Driver_Timer.h)(0x6421D747)()
|
||||||
F (..\driver\Driver_UART.c)(0x642195B9)(-xc -std=c90 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-D__EVAL -D__MICROLIB -gdwarf-4 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./src -I ../driver
-I./RTE/Device/STM32F103RB
-I./RTE/_reel
-IC:/Users/robin/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Users/robin/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.4.0/Device/Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o ./objects/driver_uart.o -MD)
|
F (..\driver\Driver_UART.c)(0x642195B9)(-xc -std=c90 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-D__EVAL -D__MICROLIB -gdwarf-4 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./src -I ../driver
-I./RTE/Device/STM32F103RB
-I./RTE/_reel
-IC:/Users/robin/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Users/robin/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.4.0/Device/Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o ./objects/driver_uart.o -MD)
|
||||||
I (..\driver\Driver_UART.h)(0x6421962C)
|
I (..\driver\Driver_UART.h)(0x6421962C)
|
||||||
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\stm32f10x.h)(0x61ADDBCE)
|
I (C:\Users\robin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include\stm32f10x.h)(0x61ADDBCE)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<title>Static Call Graph - [.\Objects\projet-voilier_reel.axf]</title></head>
|
<title>Static Call Graph - [.\Objects\projet-voilier_reel.axf]</title></head>
|
||||||
<body><HR>
|
<body><HR>
|
||||||
<H1>Static Call Graph for image .\Objects\projet-voilier_reel.axf</H1><HR>
|
<H1>Static Call Graph for image .\Objects\projet-voilier_reel.axf</H1><HR>
|
||||||
<BR><P>#<CALLGRAPH># ARM Linker, 6190004: Last Updated: Mon Mar 27 16:22:51 2023
|
<BR><P>#<CALLGRAPH># ARM Linker, 6190004: Last Updated: Thu Mar 30 20:11:36 2023
|
||||||
<BR><P>
|
<BR><P>
|
||||||
<H3>Maximum Stack Usage = 32 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
|
<H3>Maximum Stack Usage = 32 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
|
||||||
Call chain for Maximum Stack Depth:</H3>
|
Call chain for Maximum Stack Depth:</H3>
|
||||||
|
@ -335,7 +335,7 @@ Global Symbols
|
||||||
<BR><BR>[Called By]<UL><LI><a href="#[35]">>></a> main
|
<BR><BR>[Called By]<UL><LI><a href="#[35]">>></a> main
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
<P><STRONG><a name="[3f]"></a>MyTimer_ConfigurePWM</STRONG> (Thumb, 40 bytes, Stack size 0 bytes, driver_timer.o(.text.MyTimer_ConfigurePWM))
|
<P><STRONG><a name="[3f]"></a>MyTimer_ConfigurePWM</STRONG> (Thumb, 168 bytes, Stack size 0 bytes, driver_timer.o(.text.MyTimer_ConfigurePWM))
|
||||||
<BR><BR>[Called By]<UL><LI><a href="#[35]">>></a> main
|
<BR><BR>[Called By]<UL><LI><a href="#[35]">>></a> main
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -322,7 +322,7 @@
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>DLGTARM</Key>
|
<Key>DLGTARM</Key>
|
||||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=819,183,1240,588,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=105,137,504,482,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=120,153,405,449,0)(130=-1,-1,-1,-1,0)(131=1144,190,1738,884,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=966,202,1387,607,0)(121=961,76,1382,481,0)(122=920,173,1341,578,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=105,137,504,482,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=120,153,405,449,0)(130=-1,-1,-1,-1,0)(131=1179,98,1773,792,0)(132=207,214,801,908,0)(133=442,222,1036,916,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
|
|
|
@ -12,21 +12,17 @@ int main() {
|
||||||
MyGPIO_Set(LED.GPIO, LED.GPIO_Pin);
|
MyGPIO_Set(LED.GPIO, LED.GPIO_Pin);
|
||||||
|
|
||||||
MyGPIO_Struct_TypeDef PWM_GPIO;
|
MyGPIO_Struct_TypeDef PWM_GPIO;
|
||||||
PWM_GPIO.GPIO_Pin = 7;
|
PWM_GPIO.GPIO_Pin = 0;
|
||||||
PWM_GPIO.GPIO_Conf = AltOut_Ppull;
|
PWM_GPIO.GPIO_Conf = AltOut_Ppull;
|
||||||
PWM_GPIO.GPIO = GPIOC;
|
PWM_GPIO.GPIO = GPIOA;
|
||||||
MyGPIO_Init(&PWM_GPIO);
|
MyGPIO_Init(&PWM_GPIO);
|
||||||
|
|
||||||
//PC7
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MyTimer_Struct_TypeDef PWM;
|
MyTimer_Struct_TypeDef PWM;
|
||||||
PWM.Timer = TIM3;
|
PWM.Timer = TIM2;
|
||||||
PWM.PSC = 7200;
|
PWM.PSC = 7200;
|
||||||
PWM.ARR = 5000;
|
PWM.ARR = 5000;
|
||||||
MyTimer_Base_Init(&PWM);
|
MyTimer_Base_Init(&PWM);
|
||||||
MyTimer_ConfigurePWM(&PWM, 40);
|
MyTimer_ConfigurePWM(&PWM, 1, 40);
|
||||||
MyTimer_Start(&PWM);
|
MyTimer_Start(&PWM);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue