cancel
Showing results for 
Search instead for 
Did you mean: 

Transmit buffer generated by HAL_DCMI_Start_DMA over UART interface in Snapshot mode of low-resolution image

Junaid
Associate II

Can I transfer buffer generated HAL_DCMI_Start_DMA through UART interface. I am using STM32f4 discovery board. My UART stop working after HAL_DCMI_Start_DMA call. My main function is attached.

int main(void)

{

 /* USER CODE BEGIN 1 */

OV9655_IDTypeDef OV9655ID;

 /* USER CODE END 1 */

  

 /* MCU Configuration--------------------------------------------------------*/

 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */

 HAL_Init();

 /* USER CODE BEGIN Init */

 /* USER CODE END Init */

 /* Configure the system clock */

 SystemClock_Config();

 /* USER CODE BEGIN SysInit */

 /* USER CODE END SysInit */

 /* Initialize all configured peripherals */

 MX_GPIO_Init();

 MX_DMA_Init();

 MX_DCMI_Init();

 MX_I2C2_Init();

 MX_UART4_Init();

 /* USER CODE BEGIN 2 */

 printf("Demo Start\r\n");

  if(DCMI_OV9655_ReadID(&OV9655ID) == 0)

  {

   printf("OV9655 ID: 0x%x 0x%x 0x%x 0x%x\r\n", OV9655ID.Manufacturer_ID1, OV9655ID.Manufacturer_ID2, OV9655ID.PID, OV9655ID.Version);

  }

  else

  {

   printf("Read ID error\r\n");

  }

  printf("OV9655 Init: ");

  if(DCMI_OV9655Config() == 0)

  {

   printf("OK\r\n");

  }

  else

  {

   printf("failed\r\n");

  }

  HAL_DCMI_Start_DMA(&hdcmi,DCMI_MODE_SNAPSHOT,camera_buffer,BUFFER_LEN);

  HAL_Delay(500);

 /* USER CODE END 2 */

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

  while (1)

   {

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

  HAL_UART_Transmit(&huart4,"SomeData",9,10); // Does not get transmitted 

  HAL_Delay(100);

   }

 /* USER CODE END 3 */

}

Would anyone please suggest

1 REPLY 1

Hi. Use debug and find problem. Maybe processor halted in HardFault handler.