2024-06-07 08:10 PM
Dear experts,
i used stm32F407 ve make a project.
Through GPIOE connected parallel 16 bit ADC,ADC_busy pin connected F407 Tim4_ch3, enable Input Capture functions, and enable DMA (P to M mode).get a mounts of data one times.
i Referenced st demo,its demo is OK.
this demo is through DMA take tim4 register(CCR3) to internal RAM.
details:
HAL_StatusTypeDef HAL_TIM_IC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length)
in this function internal,
///////////////////////////////////
case TIM_CHANNEL_3:
{
/* Set the DMA capture callbacks */
htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMACaptureCplt;
htim->hdma[TIM_DMA_ID_CC3]->XferHalfCpltCallback = TIM_DMACaptureHalfCplt;
/* Set the DMA error callback */
htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAError ;
/* Enable the DMA stream */
if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC3], (uint32_t)&htim->Instance->CCR3, (uint32_t)pData,
Length) != HAL_OK)
{
/* Return error status */
return HAL_ERROR;
}
/* Enable the TIM Capture/Compare 3 DMA request */
__HAL_TIM_ENABLE_DMA(htim, TIM_DMA_CC3);
break;
}
/////////////////////////////
i want changed (uint32_t)&htim->Instance->CCR3 to (uint32_t)(&(GPIOE->IDR)),
to get ADC data,
but it not worked.
why?
thanks everybody!
my email:
wxqhit@126.com
2024-06-07 10:39 PM - edited 2024-06-07 10:40 PM
2024-06-07 11:19 PM
thank you very much@ waclawek.jan
i will try it......
2024-06-08 11:17 PM
today,
I select TIM8 to DMA get GPIOE IDR, it's work. well, i am exciting.
thanks