Trriger ADC injected
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-04-21 3:32 AM
Posted on April 21, 2015 at 12:32
Hi,
I would like to trigger ADC1 by TIM2 update. I checked and injected group workd fine by software triggering, i have checked in debug the sampled value. TIM2 cnt register also runs, so i probably enabled it correctly. But when trying to trigger ADC injected group by TIM update, ADC does not preform any sampling on injected group. Here is what i have added for the TIM2 for triggering:/* Timer TRGO selection */
master_timer_config.MasterOutputTrigger = TIM_TRGO_UPDATE;
master_timer_config.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&TimHandle, &master_timer_config) != HAL_OK)
{
/* Timer TRGO selection Error */
Error_Handler();
}
Here is what i added to ADC1 for triggering:
sConfigInjected.ExternalTrigInjecConv = ADC_EXTERNALTRIGINJECCONV_T2_TRGO;
//
?
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-04-21 5:04 AM
Posted on April 21, 2015 at 14:04 O.K, I got it, Just in case someone else encounter it, I should used the ADC injected group start function for
interruption
:HAL_ADCEx_InjectedStart_IT()