Skip to main content
Suyog Buradkar
Visitor II
August 29, 2017
Question

NEC Infrared Remote Not Working With Timer+DMA+UART

  • August 29, 2017
  • 1 reply
  • 797 views
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.
    This topic has been closed for replies.

    1 reply

    waclawek.jan
    Super User
    August 30, 2017
    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