Skip to main content
Visitor II
October 10, 2011
Question

Does the an2781(software uart) must use the tx

  • October 10, 2011
  • 3 replies
  • 778 views
Posted on October 10, 2011 at 03:26

I found if i disable the SWUART_TRANSMIT_USED ,it will hang in TIMERx_UPD_OVF_BRK_IRQHandler and can not run out of it. In this function:

#ifdef SWUART_TRANSMIT_USED

 uart_Tx_timing();

#endif

 The clear_owerflow_flag define is called in uart_Tx_timing, so should i move this sentence out?

void TIM2_UPD_OVF_BRK_IRQHandler(void) interrupt 13

{

clear_owerflow_flag;

#ifdef SWUART_TRANSMIT_USED

 uart_Tx_timing();

#endif

}

Thanks,

Cgha

    This topic has been closed for replies.

    3 replies

    cgh21Author
    Visitor II
    October 10, 2011
    Posted on October 10, 2011 at 03:29

    I only want to use rx pin,so tx need to be disabled,How to diable Tx function

    cgh21Author
    Visitor II
    October 10, 2011
    Posted on October 10, 2011 at 04:05

    Can the uart  be waked up by rx pin change?

    cgh21Author
    Visitor II
    October 10, 2011
    Posted on October 10, 2011 at 09:15

    I've commented the sentence

    TIM2_ITConfig(TIM2_IT_UPDATE, ENABLE);\

    in init_UART_timing,it seems ok.

    So I think here need a ifdef SWUART_TRANSMIT_USED to comment out the Tx function

    and this can also lead to lower cpu consumption.