cancel
Showing results for 
Search instead for 
Did you mean: 

Does the an2781(software uart) must use the tx

cgh21
Associate II
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

3 REPLIES 3
cgh21
Associate II
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

cgh21
Associate II
Posted on October 10, 2011 at 04:05

Can the uart  be waked up by rx pin change?

cgh21
Associate II
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.