john2020
Full Member level 5
hi all,
The problem is when I start the uart_interrupt to get user input from keyboard, I found that the web server will be slow down and even stop echoing our request. If I disable the uart_interrupt, the web server works well again. It is strange that I didn't do anything special in our UART ISR.
Hopes you can help me
void uart_interrupt (void) small interrupt 4 using 0
/* ------------------------------------------------------------------------ --
* Purpose : Interrupt function. Save received char in buffer.
* Remarks : interrupt "4": seriel port interrupt, using cpu internal mem. bank "2"
************************************************************************ */
{
unsigned char ch;
int i;
// GPIO_LED = 0;//Light on LED
P3RxD = 1; //Force pull high //<<<<<<
ES = 0;
EA = 0;
if (RI) {/**************** Second problem ******************/
RI = 0;
/* save any framing error */
if (SM0) {
// uart_framing_error = TRUE;
SM0 = 0;
}
ch = SBUF;
rx_buf[rx_head] = ch;//save into ring buffer
rx_head = (rx_head + 1) & (RX_BUF_SIZE - 1);
}
P3TxD = 1; //Force pull high //<<<<<<
EA = 1;
ES = 1;
}
reply me as early as possible.
regards
john
The problem is when I start the uart_interrupt to get user input from keyboard, I found that the web server will be slow down and even stop echoing our request. If I disable the uart_interrupt, the web server works well again. It is strange that I didn't do anything special in our UART ISR.
Hopes you can help me
void uart_interrupt (void) small interrupt 4 using 0
/* ------------------------------------------------------------------------ --
* Purpose : Interrupt function. Save received char in buffer.
* Remarks : interrupt "4": seriel port interrupt, using cpu internal mem. bank "2"
************************************************************************ */
{
unsigned char ch;
int i;
// GPIO_LED = 0;//Light on LED
P3RxD = 1; //Force pull high //<<<<<<
ES = 0;
EA = 0;
if (RI) {/**************** Second problem ******************/
RI = 0;
/* save any framing error */
if (SM0) {
// uart_framing_error = TRUE;
SM0 = 0;
}
ch = SBUF;
rx_buf[rx_head] = ch;//save into ring buffer
rx_head = (rx_head + 1) & (RX_BUF_SIZE - 1);
}
P3TxD = 1; //Force pull high //<<<<<<
EA = 1;
ES = 1;
}
reply me as early as possible.
regards
john