I want to use uart interrupt with esp32s2 but there are no clear code in this site.
I achieved to step in ISR function.
Problem is that I can get rx_fifo_len but I can not get any data
ISR function :
Code: Select all
static void IRAM_ATTR uart_intr_handle(void *arg)
{
uint16_t len,t=0;
len = UART1.status.rxfifo_cnt;
//printf("%d\r\n",len);
while(len){
buff[t++]=UART1.ahb_fifo.rw_byte;
len--;
}
ESP_EARLY_LOGI("hallo bro","this is is : %s",buff[t]);
//sprintf(buff,"this is it!%d",t);
//uart_write_bytes(EX_UART_NUM, (const char*) buff, 40);
uart_flush(EX_UART_NUM);
uart_clear_intr_status(EX_UART_NUM, UART_RXFIFO_FULL_INT_CLR|UART_RXFIFO_TOUT_INT_CLR);
flagdeneme=1;
}
Code: Select all
UART1.fifo.rw_byte
Code: Select all
UART1.ahb_fifo.rw_byte
I stuck with this 1 week and I want to use interrupt instead of freeRTOS(like examles of esp-idf ) thanks for your help!!!!
Note: I want to step in İSR byte by byte so I think there are some config about it . How can I config for step in byte by byte ?