Need help regarding UART1 and UART2 communication for ESP32

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby Ritesh » Thu Oct 27, 2016 10:41 am

Hi,

Sorry. We just checked UART2 in polling based mechanism to verify our hardware which is attached on UART2.

We haven't implemented ISR based or callback based code for UART2 communication interface.

Also, we have compiled ESP-idf RTOS in Linux as well as in Windows Environment..

I will let you know after implementing ISR code.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby Ritesh » Thu Oct 27, 2016 6:51 pm

Hi,

We have verified both UART1 and UART2 by taking reference of Arduino UART interface code and it works fine without any issue.

So, it seems we can transmit and received data over both UART.

Thanks again for your valuable support to achieve this.
Regards,
Ritesh Prajapati

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby rudi ;-) » Thu Oct 27, 2016 6:57 pm

Ritesh wrote:Hi,

We have verified both UART1 and UART2 by taking reference of Arduino UART interface code and it works fine without any issue.

So, it seems we can transmit and received data over both UART.

Thanks again for your valuable support to achieve this.

How you use Rx Int ?
Do you use handshake too and how you use it in the isr, second or same by mask?
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby Ritesh » Thu Oct 27, 2016 7:27 pm

Hi,

That part of ISR is still remaining. We just verified both UART1 and UART2 interfaces using pooling mechanism as a part of our ESP32 board bringup.

I will let you know after implementing ISR based service routine for both UART.
Regards,
Ritesh Prajapati

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby rudi ;-) » Thu Oct 27, 2016 7:36 pm

Ritesh wrote:Hi,

That part of ISR is still remaining. We just verified both UART1 and UART2 interfaces using pooling mechanism as a part of our ESP32 board bringup.

I will let you know after implementing ISR based service routine for both UART.
thanks.
because serial itself is interrupt driven, ( arduino )
it is unwise to assign a seperate interrupt to it. ( normal )

so i asked - can we we do by own INT pins or must we use the serial interrupt driven or can it be crossed or disabled.. and so on .

so i thinked you are better just checking for serial at various times in your code. ( not sure because i am code outside arduino ide )

thank you!

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby Ritesh » Thu Oct 27, 2016 7:50 pm

Hi,

That I need to check how Interrupt pin can be used for serial console. Let me check and will let you know later.

Also, we have just integrated Arduino code but we are using ESP-idf RTOS SDK for our ESP32 development stuffs.

Please let me know your exact requirements regarding ISR UART interrupt mechanism so that I can check into code as well.
Regards,
Ritesh Prajapati

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby rudi ;-) » Thu Oct 27, 2016 7:58 pm

Ritesh wrote:Hi,

That I need to check how Interrupt pin can be used for serial console. Let me check and will let you know later.

Also, we have just integrated Arduino code but we are using ESP-idf RTOS SDK for our ESP32 development stuffs.

Please let me know your exact requirements regarding ISR UART interrupt mechanism so that I can check into code as well.
thanks
i use esp-idf RTOS sdk too, eclipse c code.
ISR on received char ( Rx )
handshake can be done by usually gpio isr
best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby rudi ;-) » Sat Nov 19, 2016 5:11 pm

ESP_Me-no-dev wrote:Ritesh, you can look into HardwareSerial.cpp as well and see what happens when you start arduino Serial :) it's pretty straight forward.
hi Me-no-dev,

ok - UART runs in IDF environment :)

btw:

Code: Select all

void checkForData()
can we trigger this?
or do we must create a task for lookup?
txs!

best wishes
rudi ;-)


( FYI )
on 115200 -is ur uart bitbang?- there is the first byte 0xFF then comes data
on 9600 the data are fine, but i will check all again
FYI_small_thing.png
FYI_small_thing.png (29.28 KiB) Viewed 14959 times
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby rudi ;-) » Sat Nov 19, 2016 5:49 pm

have see the uart driver now in IDF - and WiFive gave me tip for find the watchdog docu fpr CPU 0 .. and other.
think we can now use the driver/uart in IDF too and there is ISR func described. will try this now too.
thank you for you work on this! the things work good.

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding UART1 and UART2 communication for ESP32

Postby Ritesh » Tue Nov 29, 2016 1:45 pm

Hi,

I think UART driver is released into ESP32-idf stack. So, does anyone has verified that code with UART0, UART1 and UART2 interfaces?

Please provide me sample code to verify that code in polling as well as in ISR mode.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 94 guests