-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
K22F USB Console/Shell #25811
Comments
regarding (1): There is a bug that prevents initialization of the USB device stack if DTR_WAIT is not enabled, I already mentioned it on the slack but forgot to fix. @asob Please try the patch below, I will open a PR later. diff --git a/drivers/console/uart_console.c b/drivers/console/uart_console.c
index b3c57366c3..660d0b5241 100644
--- a/drivers/console/uart_console.c
+++ b/drivers/console/uart_console.c
@@ -601,14 +601,14 @@ static int uart_console_init(struct device *arg)
__ASSERT_NO_MSG(uart_console_dev);
-#if defined(CONFIG_USB_UART_CONSOLE) && defined(CONFIG_USB_UART_DTR_WAIT)
+#if defined(CONFIG_USB_UART_CONSOLE)
int ret;
ret = usb_enable(NULL);
if (ret != 0) {
return ret;
}
-
+#if defined(CONFIG_USB_UART_DTR_WAIT)
while (1) {
u32_t dtr = 0U;
@@ -618,6 +618,7 @@ static int uart_console_init(struct device *arg)
}
}
k_busy_wait(1000000);
+#endif
#endif
uart_console_hook_install(); |
@jfischer-phytec-iot Thanks for the patch, for some reason
But I went ahead and just modified the
If after step (3) PuTTY is first closed instead of just disconnecting USB and then USB is disconnected and reconnected, console output re-appears. |
Initialize USB even if USB_UART_DTR_WAIT is not enabled. Fixes: zephyrproject-rtos#25811 Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Initialize USB even if USB_UART_DTR_WAIT is not enabled. Fixes: #25811 Signed-off-by: Johann Fischer <j.fischer@phytec.de>
I've been testing out Zephyr's USB connectivity options on FRDM-K22F and got some questions:
samples/subsys/usb/console/
compiles and runs okay as long as the USB is connected. If usb is not connected the application will not run, this happens, as I can see it because of flagCONFIG_USB_UART_DTR_WAIT=y
. My understanding was that if i compile the app withCONFIG_USB_UART_DTR_WAIT=n
the application will run immediately, however after compiling and uploading it to target the USB CDC Serial is not being recognized by the host operating system. Is it all possible to have a console via USB without the DTR flag?The text was updated successfully, but these errors were encountered: