Finalisation de step dft reel OK
This commit is contained in:
parent
09a2ab0105
commit
5f460e9380
3 changed files with 47 additions and 8 deletions
21
PjtKEIL_StepDFTREEL/RTE/_CibleSondeKEIL/RTE_Components.h
Normal file
21
PjtKEIL_StepDFTREEL/RTE/_CibleSondeKEIL/RTE_Components.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
/*
|
||||
* Auto generated Run-Time-Environment Configuration File
|
||||
* *** Do not modify ! ***
|
||||
*
|
||||
* Project: 'StepDFT'
|
||||
* Target: 'CibleSondeKEIL'
|
||||
*/
|
||||
|
||||
#ifndef RTE_COMPONENTS_H
|
||||
#define RTE_COMPONENTS_H
|
||||
|
||||
|
||||
/*
|
||||
* Define the Device Header File:
|
||||
*/
|
||||
#define CMSIS_device_header "stm32f10x.h"
|
||||
|
||||
|
||||
|
||||
#endif /* RTE_COMPONENTS_H */
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
export DFT_ModuleAuCarre
|
||||
|
||||
|
||||
; ===============================================================================================
|
||||
|
||||
|
||||
|
|
|
@ -8,10 +8,27 @@ extern int DFT_ModuleAuCarre(short int*, char);
|
|||
|
||||
extern short int LeSignal;
|
||||
|
||||
short int dma_buff[64] ;
|
||||
|
||||
int res[64];
|
||||
|
||||
void faire_dft() {
|
||||
|
||||
//on fait la mesure
|
||||
|
||||
Start_DMA1(64);
|
||||
Wait_On_End_Of_DMA1();
|
||||
Stop_DMA1;
|
||||
|
||||
|
||||
//on l'exploite
|
||||
char k;
|
||||
|
||||
for(k=0;k<64;k++){
|
||||
res[k] = DFT_ModuleAuCarre(dma_buff, k);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,18 +46,18 @@ CLOCK_Configure();
|
|||
// ? ticks pour 5*10^-3 s
|
||||
// règle de trois.
|
||||
|
||||
//on décide de faire une DFT toutes les 5 ms
|
||||
Systick_Period_ff(360000);
|
||||
Systick_Prio_IT(1,faire_dft);
|
||||
SysTick_On;
|
||||
SysTick_Enable_IT; // valider une interruption??????
|
||||
SysTick_Enable_IT; // activer l'interruption configurée
|
||||
Init_Conversion_On_Trig_Timer_ff( ADC1, TIM2_CC2, 225 );
|
||||
|
||||
char k;
|
||||
|
||||
|
||||
|
||||
for(k=0;k<64;k++){
|
||||
res[k] = DFT_ModuleAuCarre(&LeSignal, k);
|
||||
}
|
||||
//il faut configurer la fréquence d'échantillonage de l'ADC
|
||||
Init_TimingADC_ActiveADC_ff(ADC1,72);
|
||||
Single_Channel_ADC(ADC1,2);
|
||||
Init_Conversion_On_Trig_Timer_ff( ADC1, TIM2_CC2, 225 );
|
||||
Init_ADC1_DMA1( 0, dma_buff );
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
|
Loading…
Reference in a new issue