Good afternoon,
I am working with an Esp32S3. In the sdkconfig file, I have
defined the USB/JTAG port as output for the console.
So, when the firmware is resetted, I can see outputs from the firmware on this console.
Now, I would like to write thing to this console from my firmware manually. So I have installed the usb_jtag driver this way :
usb_serial_jtag_driver_config_t usb_serial_jtag_config;
usb_serial_jtag_config.rx_buffer_size = COM_MSG_MAX_LEN;
usb_serial_jtag_config.tx_buffer_size = COM_MSG_MAX_LEN;
Err = usb_serial_jtag_driver_install(&usb_serial_jtag_config);
Using the usb_serial_jtag_read_bytes(DataRead, COM_MSG_MAX_LEN, 50); I can get string that I enter in my firmware and do some actions. Here, everything is ok.
However, when I use the usb_serial_jtag_write_bytes(Msg, Length, 0); function in order to write thing to the console.
The strings that I want to output are not written at all... I need to wait that the firmware write something to the console automatically (For example, when I start a driver or something like that), in order to see my lines...
Do you know why please ?
Could you help me on this subject please ?
Best regards,
ESP32S3 : Write to the USB/JTAG port does not work properly !
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32S3 : Write to the USB/JTAG port does not work properly !
The USB-serial-JTAG unit buffers up to 64 bytes before sending it to the host, to make optimal use of the USB protocol bandwidth. If you write less than that and want the host to get it, you'll need to call the function to flush it make it send the buffer.
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: ESP32S3 : Write to the USB/JTAG port does not work properly !
Could you tell me what is the function to use in order to flush the datas ?
I don't see it in the library.
Or could you please provide me an example to send the 64 bytes of datas at each call of the write methods ?
Best regards,
I don't see it in the library.
Or could you please provide me an example to send the 64 bytes of datas at each call of the write methods ?
Best regards,
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32S3 : Write to the USB/JTAG port does not work properly !
Hm, looking at the code, the driver should actually be smart enough to do the flush automatically. I think that code changed a bit recently, though. What ESP-IDF version are you using?
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: ESP32S3 : Write to the USB/JTAG port does not work properly !
Ok,
what is strange is that two weeks ago, printing on the console using usb_jtag_write worked properly.
Now, I try with the ESP-IDF 5.1.4 and it dos not work.
I have also tried with the 5.2.0 and 5.2.1 version and the result is the same.
I don't understand what has changed since two weeks ago.
Best regards,
what is strange is that two weeks ago, printing on the console using usb_jtag_write worked properly.
Now, I try with the ESP-IDF 5.1.4 and it dos not work.
I have also tried with the 5.2.0 and 5.2.1 version and the result is the same.
I don't understand what has changed since two weeks ago.
Best regards,
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: ESP32S3 : Write to the USB/JTAG port does not work properly !
Do you have other ideas please ?
When I install the driver, I define the tx and rx buffer size to 256 bytes. (This is not 64 bytes but it worked before).
Do you think 64 is the max size I should define ??
When I send datas to the usb_jtag driver do you think I should
always but 64 as tx size when I cann the usb_jtag_write function ?
When I install the driver, I define the tx and rx buffer size to 256 bytes. (This is not 64 bytes but it worked before).
Do you think 64 is the max size I should define ??
When I send datas to the usb_jtag driver do you think I should
always but 64 as tx size when I cann the usb_jtag_write function ?
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: ESP32S3 : Write to the USB/JTAG port does not work properly !
The problem was the ESP-IDF version.
Using the 5.3 Release solve the problem.
Thank you !
Using the 5.3 Release solve the problem.
Thank you !
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32S3 : Write to the USB/JTAG port does not work properly !
Glad you got it to work with the new esp-idf version!
Who is online
Users browsing this forum: No registered users and 93 guests