Hi,
Sorry for late post.
We have tried with uart_flush(uart_num) solution but it creates problem while re-configuring UART in existing running system like getting all bytes as garbage data while sending proper data.
So, It means that solution is not proper to consider for actual product.
Again, I have looked into ESP32-IDF UART Driver and found that issue I am getting exactly while configuring UART driver with "gpio_matrix_out(tx_io_num, tx_sig, 0, 0);" for TX Pin.
So, It means issue might be in configuring GPIO Matrix table and i have tried to go in details in that API but that is function of ROM and I didn't find any function definition for that.
Please let me know if anyone has fixed this issue from driver level which will be helpful for me as well.
Getting extra byte 0xFF while configuring UART
Re: Getting extra byte 0xFF while configuring UART
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Getting extra byte 0xFF while configuring UART
Hi,
Also the issue i am getting is random means sometimes I am getting garbage 0xFF as first byte randomly. So, The issue is in GPIO Matrix Output configurations which might cause this type of issue.
I have tried it with PULLUP and PULLDOWN configurations for that TX PIN but still issue remains same for that.
Also the issue i am getting is random means sometimes I am getting garbage 0xFF as first byte randomly. So, The issue is in GPIO Matrix Output configurations which might cause this type of issue.
I have tried it with PULLUP and PULLDOWN configurations for that TX PIN but still issue remains same for that.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Getting extra byte 0xFF while configuring UART
Hi,
Please let me know if anyone has faced this type of issue while configuring UART with which another any module is connected over UART.
I have tried to look definition of "gpio_matrix_out(tx_io_num, tx_sig, 0, 0);" but not found it.
Please let me know if anyone has faced this type of issue while configuring UART with which another any module is connected over UART.
I have tried to look definition of "gpio_matrix_out(tx_io_num, tx_sig, 0, 0);" but not found it.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Getting extra byte 0xFF while configuring UART
I'm having the same problem, did you find a fix?
Re: Getting extra byte 0xFF while configuring UART
Hi,
Yes. We have solved this issue with the help of Espressif System Developer.
Would you please let me know which ESP32-IDF RTOS SDK are you using for your development purpose? ESP32-IDF 2.0 or 2.1 or latest master branch?
The issue is in UART driver while configuring TX and RX Pins.
Yes. We have solved this issue with the help of Espressif System Developer.
Would you please let me know which ESP32-IDF RTOS SDK are you using for your development purpose? ESP32-IDF 2.0 or 2.1 or latest master branch?
The issue is in UART driver while configuring TX and RX Pins.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Getting extra byte 0xFF while configuring UART
Hi,
Please include following solution into UART driver specific to uart_set_pin function to solve issue of extra byte 0xFF while configuring UART.
if(tx_io_num >= 0) {
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[tx_io_num], PIN_FUNC_GPIO); PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[tx_io_num], PIN_FUNC_GPIO);
gpio_set_level(tx_io_num, 1); /// for uart garbage issue solution this line added
gpio_set_direction(tx_io_num, GPIO_MODE_OUTPUT); gpio_set_direction(tx_io_num, GPIO_MODE_OUTPUT);
gpio_matrix_out(tx_io_num, tx_sig, 0, 0); gpio_matrix_out(tx_io_num, tx_sig, 0, 0);
}
Let me know if you still have any doubt for that.
Please include following solution into UART driver specific to uart_set_pin function to solve issue of extra byte 0xFF while configuring UART.
if(tx_io_num >= 0) {
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[tx_io_num], PIN_FUNC_GPIO); PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[tx_io_num], PIN_FUNC_GPIO);
gpio_set_level(tx_io_num, 1); /// for uart garbage issue solution this line added
gpio_set_direction(tx_io_num, GPIO_MODE_OUTPUT); gpio_set_direction(tx_io_num, GPIO_MODE_OUTPUT);
gpio_matrix_out(tx_io_num, tx_sig, 0, 0); gpio_matrix_out(tx_io_num, tx_sig, 0, 0);
}
Let me know if you still have any doubt for that.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Getting extra byte 0xFF while configuring UART
Great, works like a charm! Thank you, was about to test that when I saw your answerRitesh wrote:Hi,
Please include following solution into UART driver specific to uart_set_pin function to solve issue of extra byte 0xFF while configuring UART.
if(tx_io_num >= 0) {
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[tx_io_num], PIN_FUNC_GPIO); PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[tx_io_num], PIN_FUNC_GPIO);
gpio_set_level(tx_io_num, 1); /// for uart garbage issue solution this line added
gpio_set_direction(tx_io_num, GPIO_MODE_OUTPUT); gpio_set_direction(tx_io_num, GPIO_MODE_OUTPUT);
gpio_matrix_out(tx_io_num, tx_sig, 0, 0); gpio_matrix_out(tx_io_num, tx_sig, 0, 0);
}
Let me know if you still have any doubt for that.
Re: Getting extra byte 0xFF while configuring UART
Good. Most Welcome.jakkra wrote:Great, works like a charm! Thank you, was about to test that when I saw your answerRitesh wrote:Hi,
Please include following solution into UART driver specific to uart_set_pin function to solve issue of extra byte 0xFF while configuring UART.
if(tx_io_num >= 0) {
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[tx_io_num], PIN_FUNC_GPIO); PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[tx_io_num], PIN_FUNC_GPIO);
gpio_set_level(tx_io_num, 1); /// for uart garbage issue solution this line added
gpio_set_direction(tx_io_num, GPIO_MODE_OUTPUT); gpio_set_direction(tx_io_num, GPIO_MODE_OUTPUT);
gpio_matrix_out(tx_io_num, tx_sig, 0, 0); gpio_matrix_out(tx_io_num, tx_sig, 0, 0);
}
Let me know if you still have any doubt for that.
Please let me know if you find any issue into ESP32 w.r.t. SDK or application development as we are right now working on ESP32 and validating different interface in parallel for newer ESP32 chip and module.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Who is online
Users browsing this forum: iancoullie, snutw_ and 90 guests