[Solved]UART rx ISR not working

blackpearl21
Posts: 12
Joined: Wed Feb 21, 2018 4:28 pm

Re: UART rx ISR not working

Postby blackpearl21 » Fri May 18, 2018 4:58 pm

i got the solution,

i have to use ESP_ERROR_CHECK(uart_isr_free(EX_UART_NUM)); before uart_isr_register, as install driver also initialise interrupt subroutine.

Thank for help

ningappa BS
Posts: 51
Joined: Sat Mar 17, 2018 4:49 am

Re: [Solved]UART rx ISR not working

Postby ningappa BS » Thu May 24, 2018 7:03 am

hi,
am also looking for the same, am trying separate uart interrupt there am little confuse about the interrupt API's ,can u share that code.
thanks

blackpearl21
Posts: 12
Joined: Wed Feb 21, 2018 4:28 pm

Re: [Solved]UART rx ISR not working

Postby blackpearl21 » Mon Jul 02, 2018 6:13 am

ningappa BS wrote:hi,
am also looking for the same, am trying separate uart interrupt there am little confuse about the interrupt API's ,can u share that code.
thanks
sorry for late reply

here is the code on github
https://github.com/theElementZero/ESP32 ... nterrupt.c

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: [Solved]UART rx ISR not working

Postby snahmad75 » Wed Jul 25, 2018 10:32 pm

Hi,

I am new to esp32 uart uage.

Is your custom interrupt handler is transmit / write to uart?

on esp32 I received message through CAN bus and i need to transmit to uart.

so far only UART2 is working for me.
only printf write to uart as far i can see. it is same uart as my debug console.

Any idea about to how to receive data via uart as well.

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: [Solved]UART rx ISR not working

Postby snahmad75 » Fri Jul 27, 2018 3:44 pm

here is the code on github
https://github.com/theElementZero/ESP32 ... nterrupt.c[/quote]


The above example program is not working for me. I tried with both UART 0 and UART 2 on esp32 board. interrupt does not gets trigger.

How can I interrupt it.

vinimac
Posts: 24
Joined: Sun May 06, 2018 1:04 pm

Re: [Solved]UART rx ISR not working

Postby vinimac » Wed Aug 19, 2020 5:54 pm

Dont forget to call usr_isr_free before uart_isr_register

Code: Select all

// release the pre registered UART handler/subroutine
    ESP_ERROR_CHECK(uart_isr_free(EX_UART_NUM));

luisyge
Posts: 3
Joined: Thu Jan 13, 2022 1:39 pm

Re: [Solved]UART rx ISR not working

Postby luisyge » Thu Jan 13, 2022 1:40 pm

I solved by placing uart_isr_free(UART_PORT) before registering the new isr

Who is online

Users browsing this forum: No registered users and 120 guests