adc external trigger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-23 04:06 AM
i search in google and i can't find any adc external trigger example code i found timer trigger only.
i want adc start conversion when external pulse found.
i want any example code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-23 04:16 AM
Hello,
Which device are you using ?
To have more insight into ADC applications, I recommend you to check the ADC example in the Cube package relevant to the device that you are using.
E.g for STM32CubeF3 firmware package:
STM32Cube_FW_F3_V1.6.0\Projects\STM32303E_EVAL\Examples\ADC\ADC_TriggerModeThis example describes how to use the ADC and TIM2 to convert continuously data from ADC channel.You have to follow your reference manual in section Analog-to-digital converters (ADC)
Hope this help you.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-23 05:57 AM
i use stm32f103
you say example use ADC and TIM2 . i not want to use timer.
i want when external pulse coming i want enable adc start conversion
i use only one adc channel0.
reference manual give me adc Artitecture but i want how to use it in c/c++ code example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-23 07:11 AM
ok,
the problem not in google the problem in stm32 support not give us enough example
atmel and microchip give you all peripheral examples .
stm32 i spend alot of time to make peripheral work.
i make adc1 external triger.
hadc1.Init.ExternalTrigConv = ADC_EXTERNALTRIGCONV_EXT_IT11;
but when i put a pulse the adc not start conversion .
if (HAL_ADC_PollForConversion(&hadc1, 1000000) == HAL_OK)
{
value= HAL_ADC_GetValue(&hadc1);
}
adc not start conversion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-23 07:12 AM
Engineering is not about finding solutions on the Internet.
For Google to have an example, someone would have to write one and post one, without the help of Google.
Configure a TIM in Input Capture such that TIMx_CCx matched one of the external trigger settings for the ADC. Find an example in the SPL of doing Input Capture, and modify it, and merge into your ADC code.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-23 08:30 AM
... the problem in stm32 support not give us enough example
This is not a ST support hotline here, but a public forum.
The former will charge you for their help, while you can't 'demand' solutions from the latter.
There are many examples to trigger the ADC by hardware (Timer). And there are many examples on how to config a GPIO.
Shouldn't be too difficult to combine both.
atmel and microchip give you all peripheral examples .
I need to agree with Clive - embedded engineering is not about finding almost complete solutions with google.
You might soon come across a vendor like Cypress, without any public forum at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-23 09:08 AM
>>
stm32 i spend a lot of time to make peripheral work.
You might want to review how you approach problem solving. Apply some man-hours to understanding the hardware via the documentation, and provided examples. The people writing the examples don't have some magical talent.
>>
the problem in stm32 support not give us enough example
I think ST assumes that businesses using their chips will hire an engineering roster of their own.
What kind of hourly rate would you be willing to pay for support and examples tailored to your specific needs?
>>
atmel and microchip give you all peripheral examples.
Then use their parts, or apply the knowledge from those examples to other platforms, most of this stuff is more similar than dissimilar.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-04-17 04:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-20 11:19 AM
I know it's been a long time but have you found any solution for this ? i have the same problem...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-20 11:52 AM
Yes, you use the plumbing of the TIM's to take an external input, perhaps time-stamp it, but having the knock-on effect of triggering an ADC sample.
ie if you can use TIM2_CH2 as an ADC Trigger, do an Input Capture on a TIM2 Channel 2, have TIM2 maximal and free-running, and wire your trigger to the external pin associated with TIM2_CH2. This isn't rocket science
Up vote any posts that you find helpful, it shows what's working..