2024-01-19 02:25 AM
I am using multiple channel and multiple ADC's and I am trying to use the Interrupt method ,
My first doubt was lets say we are using End Of Sequence Conversion flag So, the interrupt will be triggered when all conversion will be complete then how we will get all the converted value or I should use End Of Single Conversion.
Second was , Lets say I have 8 Channels to convert in ADC1 , So will the Sample Conversion Time be Added for the 8 channels in a sequence like 640.5+640.5 ADC Clock cycles ..... or it will be 640.5 only Or does it depend on the Flag of conversion .
2024-01-22 08:09 AM
Hi @Tushar_4
The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.
Regards,
Billy
2024-01-22 09:42 AM
My first doubt was......
For multiple channels, use DMA to save the results in a buffer.
Second was......
Configure each channel for the Sample time needed. Yes, the time will be added for a sequence of channels.
I recommend looking at the ADC DMA examples provided with the HAL Library package for your processor.
2024-01-23 10:01 PM
Can we use User context pointer as the way to check if let's say in the context we can pass the ADC Module and Channel number then when the conversion is complete than we check its instance and channel number and assign the value to the respective variable , then if the callback is triggered for the second time then we can again check the user context.
Is this a good approach ?
Thanks in advance.
2024-01-24 07:33 AM
I'll be honest - I have no knowledge of User context pointer. Perhaps someone else can educate us.
I use breakpoints to locate problems.
2024-06-19 03:49 AM
@raptorhal2 wrote:[...]
I recommend looking at the ADC DMA examples provided with the HAL Library package for your processor.
That would have been my first idea as well, unfortunately as of STM32Cube_FW_G4_V1.5.2 there's no such example.