avancement spi
This commit is contained in:
parent
9bad192109
commit
aef738bd8a
17 changed files with 167 additions and 151 deletions
|
@ -45,9 +45,10 @@ void SPI_init_master(SPI_TypeDef * SPI) {
|
|||
//on met la polarité à 1 par défaut
|
||||
SPI->CR1 |= SPI_CR1_CPOL ;
|
||||
|
||||
//Baud rate : fpclok/128
|
||||
SPI->CR1 |= (SPI_CR1_BR_1 | SPI_CR1_BR_2) ;
|
||||
SPI->CR1 &= ~SPI_CR1_BR_0 ;
|
||||
//Baud rate : fpclock/16 (011)
|
||||
SPI->CR1 &= ~SPI_CR1_BR_2;
|
||||
SPI->CR1 |= SPI_CR1_BR_1;
|
||||
SPI->CR1 |= SPI_CR1_BR_0;
|
||||
|
||||
//On met la clock phase à 1
|
||||
SPI->CR1 |= SPI_CR1_CPHA;
|
||||
|
|
25
Includes/tourniquet.c
Normal file
25
Includes/tourniquet.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
char tourniquet_curseur ;
|
||||
char maximum ;
|
||||
|
||||
void (* IT_TOURNIQUET_1) (void) = chavirement_handler();
|
||||
void (* IT_TOURNIQUET_2) (void) = 0x0;
|
||||
|
||||
|
||||
void tourniquet_init() {
|
||||
tourniquet_curseur = 1;
|
||||
maximum = 2
|
||||
}
|
||||
|
||||
|
||||
void tourniquet_handler() {
|
||||
switch(tourniquet_curseur) {
|
||||
case 1: IT_TOURNIQUET_1(); break;
|
||||
case 2: IT_TOURNIQUET_2(); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
tourniquet_curseur++;
|
||||
if(tourniquet_curseur > maximum) {
|
||||
tourniquet_curseur = 1;
|
||||
}
|
||||
}
|
9
Includes/tourniquet.h
Normal file
9
Includes/tourniquet.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef TOURNIQUET_H
|
||||
#define TOURNIQUET_H
|
||||
|
||||
#include "stm32f10x.h"
|
||||
|
||||
void tourniquet_init() ;
|
||||
void tourniquet_handler() ;
|
||||
|
||||
#endif
|
|
@ -18,7 +18,6 @@ Section Cross References
|
|||
mytimer.o(i.TIM4_IRQHandler) refers to mytimer.o(.data) for PtrF
|
||||
principal.o(i.main) refers to driver_gpio.o(i.MyGPIO_Activate) for MyGPIO_Activate
|
||||
principal.o(i.main) refers to chavirement.o(i.chavirement_init) for chavirement_init
|
||||
principal.o(i.main) refers to bordage.o(i.Roulis_Handler) for Roulis_Handler
|
||||
principal.o(i.main) refers to chavirement.o(i.chavirement_handler) for chavirement_handler
|
||||
principal.o(i.main) refers to principal.o(.data) for value
|
||||
chavirement.o(i.chavirement_handler) refers to chavirement.o(i.lire) for lire
|
||||
|
@ -211,27 +210,27 @@ Image Symbol Table
|
|||
i.Roulis_Handler 0x08000774 Section 0 bordage.o(i.Roulis_Handler)
|
||||
i.SPI_activate_clock 0x08000780 Section 0 driver_spi.o(i.SPI_activate_clock)
|
||||
i.SPI_init_master 0x080007bc Section 0 driver_spi.o(i.SPI_init_master)
|
||||
i.SPI_rcv 0x0800087c Section 0 driver_spi.o(i.SPI_rcv)
|
||||
i.SPI_send 0x080008a0 Section 0 driver_spi.o(i.SPI_send)
|
||||
i.SetSysClock 0x080008be Section 0 system_stm32f10x.o(i.SetSysClock)
|
||||
SetSysClock 0x080008bf Thumb Code 8 system_stm32f10x.o(i.SetSysClock)
|
||||
i.SetSysClockTo72 0x080008c8 Section 0 system_stm32f10x.o(i.SetSysClockTo72)
|
||||
SetSysClockTo72 0x080008c9 Thumb Code 214 system_stm32f10x.o(i.SetSysClockTo72)
|
||||
i.Set_Duty_Cycle 0x080009a8 Section 0 mytimer.o(i.Set_Duty_Cycle)
|
||||
i.SystemInit 0x080009f4 Section 0 system_stm32f10x.o(i.SystemInit)
|
||||
i.TIM1_UP_IRQHandler 0x08000a54 Section 0 mytimer.o(i.TIM1_UP_IRQHandler)
|
||||
i.TIM2_IRQHandler 0x08000a78 Section 0 mytimer.o(i.TIM2_IRQHandler)
|
||||
i.TIM3_IRQHandler 0x08000a9c Section 0 mytimer.o(i.TIM3_IRQHandler)
|
||||
i.TIM4_IRQHandler 0x08000ac0 Section 0 mytimer.o(i.TIM4_IRQHandler)
|
||||
i.__scatterload_copy 0x08000ae4 Section 14 handlers.o(i.__scatterload_copy)
|
||||
i.__scatterload_null 0x08000af2 Section 2 handlers.o(i.__scatterload_null)
|
||||
i.__scatterload_zeroinit 0x08000af4 Section 14 handlers.o(i.__scatterload_zeroinit)
|
||||
i.bordage 0x08000b04 Section 0 bordage.o(i.bordage)
|
||||
i.chavirement_handler 0x08000bac Section 0 chavirement.o(i.chavirement_handler)
|
||||
i.chavirement_init 0x08000bd0 Section 0 chavirement.o(i.chavirement_init)
|
||||
i.ecrire 0x08000bf4 Section 0 chavirement.o(i.ecrire)
|
||||
i.lire 0x08000c34 Section 0 chavirement.o(i.lire)
|
||||
i.main 0x08000c78 Section 0 principal.o(i.main)
|
||||
i.SPI_rcv 0x08000884 Section 0 driver_spi.o(i.SPI_rcv)
|
||||
i.SPI_send 0x080008a8 Section 0 driver_spi.o(i.SPI_send)
|
||||
i.SetSysClock 0x080008c6 Section 0 system_stm32f10x.o(i.SetSysClock)
|
||||
SetSysClock 0x080008c7 Thumb Code 8 system_stm32f10x.o(i.SetSysClock)
|
||||
i.SetSysClockTo72 0x080008d0 Section 0 system_stm32f10x.o(i.SetSysClockTo72)
|
||||
SetSysClockTo72 0x080008d1 Thumb Code 214 system_stm32f10x.o(i.SetSysClockTo72)
|
||||
i.Set_Duty_Cycle 0x080009b0 Section 0 mytimer.o(i.Set_Duty_Cycle)
|
||||
i.SystemInit 0x080009fc Section 0 system_stm32f10x.o(i.SystemInit)
|
||||
i.TIM1_UP_IRQHandler 0x08000a5c Section 0 mytimer.o(i.TIM1_UP_IRQHandler)
|
||||
i.TIM2_IRQHandler 0x08000a80 Section 0 mytimer.o(i.TIM2_IRQHandler)
|
||||
i.TIM3_IRQHandler 0x08000aa4 Section 0 mytimer.o(i.TIM3_IRQHandler)
|
||||
i.TIM4_IRQHandler 0x08000ac8 Section 0 mytimer.o(i.TIM4_IRQHandler)
|
||||
i.__scatterload_copy 0x08000aec Section 14 handlers.o(i.__scatterload_copy)
|
||||
i.__scatterload_null 0x08000afa Section 2 handlers.o(i.__scatterload_null)
|
||||
i.__scatterload_zeroinit 0x08000afc Section 14 handlers.o(i.__scatterload_zeroinit)
|
||||
i.bordage 0x08000b0c Section 0 bordage.o(i.bordage)
|
||||
i.chavirement_handler 0x08000bb4 Section 0 chavirement.o(i.chavirement_handler)
|
||||
i.chavirement_init 0x08000bd8 Section 0 chavirement.o(i.chavirement_init)
|
||||
i.ecrire 0x08000bfc Section 0 chavirement.o(i.ecrire)
|
||||
i.lire 0x08000c3c Section 0 chavirement.o(i.lire)
|
||||
i.main 0x08000c80 Section 0 principal.o(i.main)
|
||||
.data 0x20000000 Section 8 driver_spi.o(.data)
|
||||
.data 0x20000008 Section 4 mytimer.o(.data)
|
||||
.data 0x2000000c Section 2 principal.o(.data)
|
||||
|
@ -341,26 +340,26 @@ Image Symbol Table
|
|||
MyTimer_PWM 0x080006fd Thumb Code 120 mytimer.o(i.MyTimer_PWM)
|
||||
Roulis_Handler 0x08000775 Thumb Code 10 bordage.o(i.Roulis_Handler)
|
||||
SPI_activate_clock 0x08000781 Thumb Code 54 driver_spi.o(i.SPI_activate_clock)
|
||||
SPI_init_master 0x080007bd Thumb Code 182 driver_spi.o(i.SPI_init_master)
|
||||
SPI_rcv 0x0800087d Thumb Code 36 driver_spi.o(i.SPI_rcv)
|
||||
SPI_send 0x080008a1 Thumb Code 30 driver_spi.o(i.SPI_send)
|
||||
Set_Duty_Cycle 0x080009a9 Thumb Code 76 mytimer.o(i.Set_Duty_Cycle)
|
||||
SystemInit 0x080009f5 Thumb Code 78 system_stm32f10x.o(i.SystemInit)
|
||||
TIM1_UP_IRQHandler 0x08000a55 Thumb Code 28 mytimer.o(i.TIM1_UP_IRQHandler)
|
||||
TIM2_IRQHandler 0x08000a79 Thumb Code 32 mytimer.o(i.TIM2_IRQHandler)
|
||||
TIM3_IRQHandler 0x08000a9d Thumb Code 28 mytimer.o(i.TIM3_IRQHandler)
|
||||
TIM4_IRQHandler 0x08000ac1 Thumb Code 28 mytimer.o(i.TIM4_IRQHandler)
|
||||
__scatterload_copy 0x08000ae5 Thumb Code 14 handlers.o(i.__scatterload_copy)
|
||||
__scatterload_null 0x08000af3 Thumb Code 2 handlers.o(i.__scatterload_null)
|
||||
__scatterload_zeroinit 0x08000af5 Thumb Code 14 handlers.o(i.__scatterload_zeroinit)
|
||||
bordage 0x08000b05 Thumb Code 146 bordage.o(i.bordage)
|
||||
chavirement_handler 0x08000bad Thumb Code 36 chavirement.o(i.chavirement_handler)
|
||||
chavirement_init 0x08000bd1 Thumb Code 28 chavirement.o(i.chavirement_init)
|
||||
ecrire 0x08000bf5 Thumb Code 54 chavirement.o(i.ecrire)
|
||||
lire 0x08000c35 Thumb Code 58 chavirement.o(i.lire)
|
||||
main 0x08000c79 Thumb Code 34 principal.o(i.main)
|
||||
Region$$Table$$Base 0x08000ca0 Number 0 anon$$obj.o(Region$$Table)
|
||||
Region$$Table$$Limit 0x08000cc0 Number 0 anon$$obj.o(Region$$Table)
|
||||
SPI_init_master 0x080007bd Thumb Code 190 driver_spi.o(i.SPI_init_master)
|
||||
SPI_rcv 0x08000885 Thumb Code 36 driver_spi.o(i.SPI_rcv)
|
||||
SPI_send 0x080008a9 Thumb Code 30 driver_spi.o(i.SPI_send)
|
||||
Set_Duty_Cycle 0x080009b1 Thumb Code 76 mytimer.o(i.Set_Duty_Cycle)
|
||||
SystemInit 0x080009fd Thumb Code 78 system_stm32f10x.o(i.SystemInit)
|
||||
TIM1_UP_IRQHandler 0x08000a5d Thumb Code 28 mytimer.o(i.TIM1_UP_IRQHandler)
|
||||
TIM2_IRQHandler 0x08000a81 Thumb Code 32 mytimer.o(i.TIM2_IRQHandler)
|
||||
TIM3_IRQHandler 0x08000aa5 Thumb Code 28 mytimer.o(i.TIM3_IRQHandler)
|
||||
TIM4_IRQHandler 0x08000ac9 Thumb Code 28 mytimer.o(i.TIM4_IRQHandler)
|
||||
__scatterload_copy 0x08000aed Thumb Code 14 handlers.o(i.__scatterload_copy)
|
||||
__scatterload_null 0x08000afb Thumb Code 2 handlers.o(i.__scatterload_null)
|
||||
__scatterload_zeroinit 0x08000afd Thumb Code 14 handlers.o(i.__scatterload_zeroinit)
|
||||
bordage 0x08000b0d Thumb Code 146 bordage.o(i.bordage)
|
||||
chavirement_handler 0x08000bb5 Thumb Code 36 chavirement.o(i.chavirement_handler)
|
||||
chavirement_init 0x08000bd9 Thumb Code 28 chavirement.o(i.chavirement_init)
|
||||
ecrire 0x08000bfd Thumb Code 54 chavirement.o(i.ecrire)
|
||||
lire 0x08000c3d Thumb Code 58 chavirement.o(i.lire)
|
||||
main 0x08000c81 Thumb Code 30 principal.o(i.main)
|
||||
Region$$Table$$Base 0x08000ca4 Number 0 anon$$obj.o(Region$$Table)
|
||||
Region$$Table$$Limit 0x08000cc4 Number 0 anon$$obj.o(Region$$Table)
|
||||
sortieSPI 0x20000000 Data 8 driver_spi.o(.data)
|
||||
PtrF 0x20000008 Data 4 mytimer.o(.data)
|
||||
value 0x2000000c Data 2 principal.o(.data)
|
||||
|
@ -375,9 +374,9 @@ Memory Map of the image
|
|||
|
||||
Image Entry point : 0x08000105
|
||||
|
||||
Load Region LR_1 (Base: 0x08000000, Size: 0x00000cd4, Max: 0xffffffff, ABSOLUTE)
|
||||
Load Region LR_1 (Base: 0x08000000, Size: 0x00000cd8, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
Execution Region ER_RO (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x00000cc0, Max: 0xffffffff, ABSOLUTE)
|
||||
Execution Region ER_RO (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x00000cc4, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||
|
||||
|
@ -417,47 +416,47 @@ Memory Map of the image
|
|||
0x08000774 0x08000774 0x0000000a Code RO 294 i.Roulis_Handler bordage.o
|
||||
0x0800077e 0x0800077e 0x00000002 PAD
|
||||
0x08000780 0x08000780 0x0000003c Code RO 90 i.SPI_activate_clock driver_spi.o
|
||||
0x080007bc 0x080007bc 0x000000c0 Code RO 91 i.SPI_init_master driver_spi.o
|
||||
0x0800087c 0x0800087c 0x00000024 Code RO 92 i.SPI_rcv driver_spi.o
|
||||
0x080008a0 0x080008a0 0x0000001e Code RO 93 i.SPI_send driver_spi.o
|
||||
0x080008be 0x080008be 0x00000008 Code RO 331 i.SetSysClock system_stm32f10x.o
|
||||
0x080008c6 0x080008c6 0x00000002 PAD
|
||||
0x080008c8 0x080008c8 0x000000e0 Code RO 332 i.SetSysClockTo72 system_stm32f10x.o
|
||||
0x080009a8 0x080009a8 0x0000004c Code RO 142 i.Set_Duty_Cycle mytimer.o
|
||||
0x080009f4 0x080009f4 0x00000060 Code RO 334 i.SystemInit system_stm32f10x.o
|
||||
0x08000a54 0x08000a54 0x00000024 Code RO 143 i.TIM1_UP_IRQHandler mytimer.o
|
||||
0x08000a78 0x08000a78 0x00000024 Code RO 144 i.TIM2_IRQHandler mytimer.o
|
||||
0x08000a9c 0x08000a9c 0x00000024 Code RO 145 i.TIM3_IRQHandler mytimer.o
|
||||
0x08000ac0 0x08000ac0 0x00000024 Code RO 146 i.TIM4_IRQHandler mytimer.o
|
||||
0x08000ae4 0x08000ae4 0x0000000e Code RO 420 i.__scatterload_copy mc_w.l(handlers.o)
|
||||
0x08000af2 0x08000af2 0x00000002 Code RO 421 i.__scatterload_null mc_w.l(handlers.o)
|
||||
0x08000af4 0x08000af4 0x0000000e Code RO 422 i.__scatterload_zeroinit mc_w.l(handlers.o)
|
||||
0x08000b02 0x08000b02 0x00000002 PAD
|
||||
0x08000b04 0x08000b04 0x000000a8 Code RO 295 i.bordage bordage.o
|
||||
0x08000bac 0x08000bac 0x00000024 Code RO 249 i.chavirement_handler chavirement.o
|
||||
0x08000bd0 0x08000bd0 0x00000024 Code RO 250 i.chavirement_init chavirement.o
|
||||
0x08000bf4 0x08000bf4 0x00000040 Code RO 251 i.ecrire chavirement.o
|
||||
0x08000c34 0x08000c34 0x00000044 Code RO 252 i.lire chavirement.o
|
||||
0x08000c78 0x08000c78 0x00000028 Code RO 216 i.main principal.o
|
||||
0x08000ca0 0x08000ca0 0x00000020 Data RO 418 Region$$Table anon$$obj.o
|
||||
0x080007bc 0x080007bc 0x000000c8 Code RO 91 i.SPI_init_master driver_spi.o
|
||||
0x08000884 0x08000884 0x00000024 Code RO 92 i.SPI_rcv driver_spi.o
|
||||
0x080008a8 0x080008a8 0x0000001e Code RO 93 i.SPI_send driver_spi.o
|
||||
0x080008c6 0x080008c6 0x00000008 Code RO 331 i.SetSysClock system_stm32f10x.o
|
||||
0x080008ce 0x080008ce 0x00000002 PAD
|
||||
0x080008d0 0x080008d0 0x000000e0 Code RO 332 i.SetSysClockTo72 system_stm32f10x.o
|
||||
0x080009b0 0x080009b0 0x0000004c Code RO 142 i.Set_Duty_Cycle mytimer.o
|
||||
0x080009fc 0x080009fc 0x00000060 Code RO 334 i.SystemInit system_stm32f10x.o
|
||||
0x08000a5c 0x08000a5c 0x00000024 Code RO 143 i.TIM1_UP_IRQHandler mytimer.o
|
||||
0x08000a80 0x08000a80 0x00000024 Code RO 144 i.TIM2_IRQHandler mytimer.o
|
||||
0x08000aa4 0x08000aa4 0x00000024 Code RO 145 i.TIM3_IRQHandler mytimer.o
|
||||
0x08000ac8 0x08000ac8 0x00000024 Code RO 146 i.TIM4_IRQHandler mytimer.o
|
||||
0x08000aec 0x08000aec 0x0000000e Code RO 420 i.__scatterload_copy mc_w.l(handlers.o)
|
||||
0x08000afa 0x08000afa 0x00000002 Code RO 421 i.__scatterload_null mc_w.l(handlers.o)
|
||||
0x08000afc 0x08000afc 0x0000000e Code RO 422 i.__scatterload_zeroinit mc_w.l(handlers.o)
|
||||
0x08000b0a 0x08000b0a 0x00000002 PAD
|
||||
0x08000b0c 0x08000b0c 0x000000a8 Code RO 295 i.bordage bordage.o
|
||||
0x08000bb4 0x08000bb4 0x00000024 Code RO 249 i.chavirement_handler chavirement.o
|
||||
0x08000bd8 0x08000bd8 0x00000024 Code RO 250 i.chavirement_init chavirement.o
|
||||
0x08000bfc 0x08000bfc 0x00000040 Code RO 251 i.ecrire chavirement.o
|
||||
0x08000c3c 0x08000c3c 0x00000044 Code RO 252 i.lire chavirement.o
|
||||
0x08000c80 0x08000c80 0x00000024 Code RO 216 i.main principal.o
|
||||
0x08000ca4 0x08000ca4 0x00000020 Data RO 418 Region$$Table anon$$obj.o
|
||||
|
||||
|
||||
Execution Region ER_RW (Exec base: 0x20000000, Load base: 0x08000cc0, Size: 0x00000014, Max: 0xffffffff, ABSOLUTE)
|
||||
Execution Region ER_RW (Exec base: 0x20000000, Load base: 0x08000cc4, Size: 0x00000014, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||
|
||||
0x20000000 0x08000cc0 0x00000008 Data RW 94 .data driver_spi.o
|
||||
0x20000008 0x08000cc8 0x00000004 Data RW 147 .data mytimer.o
|
||||
0x2000000c 0x08000ccc 0x00000002 Data RW 217 .data principal.o
|
||||
0x2000000e 0x08000cce 0x00000002 PAD
|
||||
0x20000010 0x08000cd0 0x00000004 Data RW 253 .data chavirement.o
|
||||
0x20000000 0x08000cc4 0x00000008 Data RW 94 .data driver_spi.o
|
||||
0x20000008 0x08000ccc 0x00000004 Data RW 147 .data mytimer.o
|
||||
0x2000000c 0x08000cd0 0x00000002 Data RW 217 .data principal.o
|
||||
0x2000000e 0x08000cd2 0x00000002 PAD
|
||||
0x20000010 0x08000cd4 0x00000004 Data RW 253 .data chavirement.o
|
||||
|
||||
|
||||
Execution Region ER_ZI (Exec base: 0x20000014, Load base: 0x08000cd4, Size: 0x00000404, Max: 0xffffffff, ABSOLUTE)
|
||||
Execution Region ER_ZI (Exec base: 0x20000014, Load base: 0x08000cd8, Size: 0x00000404, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||
|
||||
0x20000014 0x08000cd4 0x00000004 PAD
|
||||
0x20000014 0x08000cd8 0x00000004 PAD
|
||||
0x20000018 - 0x00000400 Zero RW 321 STACK startup_stm32f10x_md.o
|
||||
|
||||
|
||||
|
@ -471,14 +470,14 @@ Image component sizes
|
|||
178 22 0 0 0 1183 bordage.o
|
||||
204 28 0 4 0 2513 chavirement.o
|
||||
210 6 0 0 0 209488 driver_gpio.o
|
||||
318 16 0 8 0 2880 driver_spi.o
|
||||
326 16 0 8 0 2884 driver_spi.o
|
||||
464 46 0 4 0 4877 mytimer.o
|
||||
40 6 0 2 0 747 principal.o
|
||||
36 6 0 2 0 743 principal.o
|
||||
36 8 236 0 1024 852 startup_stm32f10x_md.o
|
||||
328 28 0 0 0 2149 system_stm32f10x.o
|
||||
|
||||
----------------------------------------------------------------------
|
||||
1784 160 268 20 1028 224689 Object Totals
|
||||
1788 160 268 20 1028 224689 Object Totals
|
||||
0 0 32 0 0 0 (incl. Generated)
|
||||
6 0 0 2 4 0 (incl. Padding)
|
||||
|
||||
|
@ -531,15 +530,15 @@ Image component sizes
|
|||
|
||||
Code (inc. data) RO Data RW Data ZI Data Debug
|
||||
|
||||
2996 176 268 20 1028 224341 Grand Totals
|
||||
2996 176 268 20 1028 224341 ELF Image Totals
|
||||
2996 176 268 20 0 0 ROM Totals
|
||||
3000 176 268 20 1028 224341 Grand Totals
|
||||
3000 176 268 20 1028 224341 ELF Image Totals
|
||||
3000 176 268 20 0 0 ROM Totals
|
||||
|
||||
==============================================================================
|
||||
|
||||
Total RO Size (Code + RO Data) 3264 ( 3.19kB)
|
||||
Total RO Size (Code + RO Data) 3268 ( 3.19kB)
|
||||
Total RW Size (RW Data + ZI Data) 1048 ( 1.02kB)
|
||||
Total ROM Size (Code + RO Data + RW Data) 3284 ( 3.21kB)
|
||||
Total ROM Size (Code + RO Data + RW Data) 3288 ( 3.21kB)
|
||||
|
||||
==============================================================================
|
||||
|
||||
|
|
|
@ -18,8 +18,6 @@ int main(void) {
|
|||
//on init le système de chavirement
|
||||
chavirement_init();
|
||||
|
||||
Roulis_Handler();
|
||||
|
||||
while (1) {
|
||||
//on lance le contrôle du chavirement
|
||||
/*while( i < 1000000 ) {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -27,9 +27,6 @@ Project File Date: 11/05/2021
|
|||
<h2>Output:</h2>
|
||||
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
|
||||
Build target 'CarteSTM'
|
||||
compiling chavirement.c...
|
||||
linking...
|
||||
Program Size: Code=2996 RO-data=268 RW-data=20 ZI-data=1028
|
||||
".\Objects\projet_chavirement.axf" - 0 Error(s), 0 Warning(s).
|
||||
|
||||
<h2>Software Packages used:</h2>
|
||||
|
@ -57,11 +54,11 @@ Package Vendor: Keil
|
|||
* Component: ARM::CMSIS:CORE:5.4.0
|
||||
|
||||
* Component: Keil::Device:Startup:1.0.0
|
||||
Source file: Device\Source\system_stm32f10x.c
|
||||
Include file: RTE_Driver\Config\RTE_Device.h
|
||||
Source file: Device\Source\ARM\startup_stm32f10x_md.s
|
||||
Source file: Device\Source\system_stm32f10x.c
|
||||
Source file: Device\Source\ARM\STM32F1xx_OPT.s
|
||||
Build Time Elapsed: 00:00:01
|
||||
Build Time Elapsed: 00:00:00
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<title>Static Call Graph - [.\Objects\projet_chavirement.axf]</title></head>
|
||||
<body><HR>
|
||||
<H1>Static Call Graph for image .\Objects\projet_chavirement.axf</H1><HR>
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Mon Nov 08 19:47:45 2021
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Mon Nov 15 10:07:44 2021
|
||||
<BR><P>
|
||||
<H3>Maximum Stack Usage = 168 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
|
||||
Call chain for Maximum Stack Depth:</H3>
|
||||
|
@ -448,14 +448,13 @@ Global Symbols
|
|||
<BR>[Calls]<UL><LI><a href="#[4b]">>></a> bordage
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[55]">>></a> chavirement_handler
|
||||
<LI><a href="#[35]">>></a> main
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[4d]"></a>SPI_activate_clock</STRONG> (Thumb, 54 bytes, Stack size 0 bytes, driver_spi.o(i.SPI_activate_clock))
|
||||
<BR><BR>[Called By]<UL><LI><a href="#[4c]">>></a> SPI_init_master
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[4c]"></a>SPI_init_master</STRONG> (Thumb, 182 bytes, Stack size 8 bytes, driver_spi.o(i.SPI_init_master))
|
||||
<P><STRONG><a name="[4c]"></a>SPI_init_master</STRONG> (Thumb, 190 bytes, Stack size 8 bytes, driver_spi.o(i.SPI_init_master))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 12<LI>Call Chain = SPI_init_master ⇒ MyGPIO_Init
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[4d]">>></a> SPI_activate_clock
|
||||
|
@ -534,8 +533,8 @@ Global Symbols
|
|||
<P><STRONG><a name="[55]"></a>chavirement_handler</STRONG> (Thumb, 36 bytes, Stack size 16 bytes, chavirement.o(i.chavirement_handler))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 168<LI>Call Chain = chavirement_handler ⇒ Roulis_Handler ⇒ bordage ⇒ __aeabi_drsub ⇒ __aeabi_dadd ⇒ _double_epilogue ⇒ _double_round
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[56]">>></a> lire
|
||||
<LI><a href="#[4a]">>></a> Roulis_Handler
|
||||
<BR>[Calls]<UL><LI><a href="#[4a]">>></a> Roulis_Handler
|
||||
<LI><a href="#[56]">>></a> lire
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[35]">>></a> main
|
||||
</UL>
|
||||
|
@ -572,12 +571,11 @@ Global Symbols
|
|||
<LI><a href="#[55]">>></a> chavirement_handler
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[35]"></a>main</STRONG> (Thumb, 34 bytes, Stack size 0 bytes, principal.o(i.main))
|
||||
<P><STRONG><a name="[35]"></a>main</STRONG> (Thumb, 30 bytes, Stack size 0 bytes, principal.o(i.main))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 168<LI>Call Chain = main ⇒ chavirement_handler ⇒ Roulis_Handler ⇒ bordage ⇒ __aeabi_drsub ⇒ __aeabi_dadd ⇒ _double_epilogue ⇒ _double_round
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[57]">>></a> chavirement_init
|
||||
<LI><a href="#[55]">>></a> chavirement_handler
|
||||
<LI><a href="#[4a]">>></a> Roulis_Handler
|
||||
<LI><a href="#[5c]">>></a> MyGPIO_Activate
|
||||
</UL>
|
||||
<BR>[Address Reference Count : 1]<UL><LI> entry9a.o(.ARM.Collect$$$$0000000B)
|
||||
|
|
|
@ -11,7 +11,7 @@ I (C:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cms
|
|||
I (C:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F3392)
|
||||
I (C:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\system_stm32f10x.h)(0x58259ADC)
|
||||
F (..\Drivers\Driver_GPIO.h)(0x6155C0E0)()
|
||||
F (..\Drivers\Driver_SPI.c)(0x6189672A)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I ..\Includes -I ..\Sources -I ..\Drivers
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="533" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\driver_spi.o --omf_browse .\objects\driver_spi.crf --depend .\objects\driver_spi.d)
|
||||
F (..\Drivers\Driver_SPI.c)(0x6192235F)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I ..\Includes -I ..\Sources -I ..\Drivers
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="533" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\driver_spi.o --omf_browse .\objects\driver_spi.crf --depend .\objects\driver_spi.d)
|
||||
I (..\Drivers\Driver_SPI.h)(0x616FFEDD)
|
||||
I (C:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\stm32f10x.h)(0x58259ADC)
|
||||
I (.\RTE\_CarteSTM\RTE_Components.h)(0x61852267)
|
||||
|
@ -34,7 +34,7 @@ I (C:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cms
|
|||
I (C:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F3392)
|
||||
I (C:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\system_stm32f10x.h)(0x58259ADC)
|
||||
F (..\Drivers\MyTimer.h)(0x61852D2E)()
|
||||
F (.\Local_Sources\principal.c)(0x61896D74)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I ..\Includes -I ..\Sources -I ..\Drivers
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="533" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\principal.o --omf_browse .\objects\principal.crf --depend .\objects\principal.d)
|
||||
F (.\Local_Sources\principal.c)(0x6192217B)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I ..\Includes -I ..\Sources -I ..\Drivers
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="533" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\principal.o --omf_browse .\objects\principal.crf --depend .\objects\principal.d)
|
||||
I (..\Sources\chavirement.h)(0x61853E09)
|
||||
I (C:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\stm32f10x.h)(0x58259ADC)
|
||||
I (.\RTE\_CarteSTM\RTE_Components.h)(0x61852267)
|
||||
|
@ -46,7 +46,7 @@ I (C:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cms
|
|||
I (C:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\system_stm32f10x.h)(0x58259ADC)
|
||||
I (..\Drivers\Driver_GPIO.h)(0x6155C0E0)
|
||||
I (..\Sources\bordage.h)(0x618526E6)
|
||||
F (..\Sources\chavirement.c)(0x618970CE)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I ..\Includes -I ..\Sources -I ..\Drivers
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="533" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\chavirement.o --omf_browse .\objects\chavirement.crf --depend .\objects\chavirement.d)
|
||||
F (..\Sources\chavirement.c)(0x619222E1)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I ..\Includes -I ..\Sources -I ..\Drivers
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="533" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\chavirement.o --omf_browse .\objects\chavirement.crf --depend .\objects\chavirement.d)
|
||||
I (..\Sources\chavirement.h)(0x61853E09)
|
||||
I (C:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\stm32f10x.h)(0x58259ADC)
|
||||
I (.\RTE\_CarteSTM\RTE_Components.h)(0x61852267)
|
||||
|
@ -74,7 +74,7 @@ I (..\Drivers\MyTimer.h)(0x61852D2E)
|
|||
I (..\Sources\bordage.h)(0x618526E6)
|
||||
F (..\Sources\bordage.h)(0x618526E6)()
|
||||
F (RTE\Device\STM32F103RB\RTE_Device.h)(0x61852267)()
|
||||
F (RTE\Device\STM32F103RB\startup_stm32f10x_md.s)(0x6189683A)(--cpu Cortex-M3 --pd "__EVAL SETA 1" -g --apcs=interwork --pd "__MICROLIB SETA 1"
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
--pd "__UVISION_VERSION SETA 533" --pd "_RTE_ SETA 1" --pd "STM32F10X_MD SETA 1" --pd "_RTE_ SETA 1"
--list .\listings\startup_stm32f10x_md.lst --xref -o .\objects\startup_stm32f10x_md.o --depend .\objects\startup_stm32f10x_md.d)
|
||||
F (RTE\Device\STM32F103RB\startup_stm32f10x_md.s)(0x61897141)(--cpu Cortex-M3 --pd "__EVAL SETA 1" -g --apcs=interwork --pd "__MICROLIB SETA 1"
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
--pd "__UVISION_VERSION SETA 533" --pd "_RTE_ SETA 1" --pd "STM32F10X_MD SETA 1" --pd "_RTE_ SETA 1"
--list .\listings\startup_stm32f10x_md.lst --xref -o .\objects\startup_stm32f10x_md.o --depend .\objects\startup_stm32f10x_md.d)
|
||||
F (RTE\Device\STM32F103RB\system_stm32f10x.c)(0x61852267)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I ..\Includes -I ..\Sources -I ..\Drivers
-I.\RTE\Device\STM32F103RB
-I.\RTE\_CarteSTM
-IC:\Users\chauz\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="533" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\system_stm32f10x.o --omf_browse .\objects\system_stm32f10x.crf --depend .\objects\system_stm32f10x.d)
|
||||
I (C:\Users\chauz\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\stm32f10x.h)(0x58259ADC)
|
||||
I (.\RTE\_CarteSTM\RTE_Components.h)(0x61852267)
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -40,8 +40,6 @@ void chavirement_init(void){
|
|||
//activer measure du power_ctl
|
||||
ecrire(0x2D, 1<<3);
|
||||
device_id = (int) lire(0x0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue