2025-05-23 8:50 PM
Hi,
I a using a NUCLEO-H755ZI-Q on STMCubeide 1.18.0
i am trying to use the Timer 1 to capture on the rising edge using the analog to digital converter
those are my signals the lase one (pink is my signal that i want to capture at this frequency)
those are my IOC settings
on the input of the ADC I have an analog signal Syncronised on timer one for capture
i try using this Tutorial and only obtain those results:
Sample 0: 1184
Sample 1: 1160
Sample 2: 1187
Sample 3: 1116
Sample 4: 1170
Sample 5: 1146
Sample 6: 1176
Sample 7: 1188
Sample 8: 1168
Sample 9: 1187
(i an not sure that i am
my code for this is
#define CCDBuffer 6000
volatile uint16_t CCDPixelBuffer[CCDBuffer];
uint16_t ProcessingBuffer[CCDBuffer];
[...]
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_1); //sh
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)CCDPixelBuffer, CCDBuffer);
[...]
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc) {
// Copier les données du buffer ADC dans le buffer de traitement
for (int i = 0; i < CCDBuffer; i++) {
ProcessingBuffer[i] = CCDPixelBuffer[i];
//tempory code to make the adc work and show data
}
}
so i get data once and nothig after i had the impression the i was supose to capture data when the timer one is active but seem like it only work one time
my plan is to gather data in a buffer to later make mathematical operation but cant get it to work propelly all the time the timer one is active
Thanks for any help, I am new to STM32 sorry for any spelling error english isn't my first language