Receive parallel data in Nucleo_H743ZI2
Hi
I am following the AN4666 document to receive parallel gpio data, with on clock input.
this is the code I wrote : I was expecting to receive gpio data and save to memory by triggering the DMA at every rising edge my issue is that the timer (input capture mode ) only detects the first rising once and save GPIO value in the first array once and then stops making whats left of my buffer equal to 0.
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stm32h7xx_ll_tim.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#define BUFFER_SIZE 100
static uint8_t aDST_Buffer[BUFFER_SIZE] = {0};
int main(void)
{
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART3_UART_Init();
MX_USB_OTG_FS_PCD_Init();
MX_TIM1_Init();
MX_DMA_Init();
// Start DMA in interrupt mode, specify source and destination
HAL_DMA_Start_IT(htim1.hdma[TIM_DMA_ID_CC1], GPIOC_IDR, (uint32_t) &aDST_Buffer, 10);
// Enable timer to trigger DMA transfer - CC1DE bit
__HAL_TIM_ENABLE_DMA(&htim1, TIM_DMA_CC1);
// Enable timer to trigger DMA transfer - CC1DE bit
__HAL_TIM_ENABLE_DMA(&htim1, TIM_DMA_CC1);
while (1) {}
}