cancel
Showing results for 
Search instead for 
Did you mean: 

NEC Infrared Remote Not Working With Timer+DMA+UART

Suyog Buradkar
Associate
Posted on August 29, 2017 at 09:34

The original post was too long to process during our migration. Please click on the attachment to read the original post.
1 REPLY 1
Posted on August 30, 2017 at 17:20

void myNecRepeatCallback() {

char* msg = 'Repeat!\n';

HAL_UART_Transmit_DMA(&huart1, (uint8_t*) msg, strlen(msg));

HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);

HAL_Delay(10);

NEC_Read(&nec);

}

This callback is called from the timer ISR. I don't believe it's  a good idea to transmit both from ISR and main().

JW