Topics

Enable shell through usb cdc-amc #nrf52840

Dark0 <darko.petrovic.85@...>
 

Hi community,

I'm trying to enable the shell module through the USBD peripheral on the nRF52840 chip (with the nrf52840_pca10056 board). I'm using the example in "samples/subsys/usb/cdc_acm/". This example is working fine with the following configuration:

CONFIG_STDOUT_CONSOLE=y
CONFIG_SYS_LOG=y
CONFIG_GPIO=y
 
CONFIG_USB=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM sample"
CONFIG_SYS_LOG_USB_DRIVER_LEVEL=1
CONFIG_USB_CDC_ACM=y
CONFIG_SYS_LOG_USB_DEVICE_LEVEL=1
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
 
CONFIG_USB_COMPOSITE_DEVICE=n
CONFIG_USB_MASS_STORAGE=n
CONFIG_DISK_ACCESS_RAM=n
 
CONFIG_BT=n
CONFIG_BT_CTLR=n
 
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=64000000

CONFIG_USB_UART_CONSOLE=y
I'm trying to enable the shell with:

CONFIG_CONSOLE_SHELL=y
CONFIG_KERNEL_SHELL=y
CONFIG_INIT_STACKS=y
...but then the program doesn't start. The system falls in a fault handler. 

I'm quite new with the Zephyr OS. Is it possible to enable the shell throught the usbd on the nrf52840 ? Does anybody know how can we fix this, what configuration to use? 

Thanks for your help.

Darko Petrovic





Carles Cufi
 

Hi Darko,

 

Yes, it should be possible to enable the USB  CDC ACM shell using the nRF52840. That said the USB driver for the nRF52840 is currently being rewritten by Pawel (on copy).

Maybe he can confirm that this is being fixed.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of Dark0
Sent: 26 June 2018 16:15
To: users@...
Subject: [Zephyr-users] Enable shell through usb cdc-amc #nrf52840

 

Hi community,

I'm trying to enable the shell module through the USBD peripheral on the nRF52840 chip (with the nrf52840_pca10056 board). I'm using the example in "samples/subsys/usb/cdc_acm/". This example is working fine with the following configuration:

CONFIG_STDOUT_CONSOLE=y

CONFIG_SYS_LOG=y

CONFIG_GPIO=y

 

CONFIG_USB=y

CONFIG_USB_DEVICE_STACK=y

CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM sample"

CONFIG_SYS_LOG_USB_DRIVER_LEVEL=1

CONFIG_USB_CDC_ACM=y

CONFIG_SYS_LOG_USB_DEVICE_LEVEL=1

CONFIG_SERIAL=y

CONFIG_UART_INTERRUPT_DRIVEN=y

CONFIG_UART_LINE_CTRL=y

 

CONFIG_USB_COMPOSITE_DEVICE=n

CONFIG_USB_MASS_STORAGE=n

CONFIG_DISK_ACCESS_RAM=n

 

CONFIG_BT=n

CONFIG_BT_CTLR=n

 

CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=64000000

CONFIG_USB_UART_CONSOLE=y

I'm trying to enable the shell with:

CONFIG_CONSOLE_SHELL=y

CONFIG_KERNEL_SHELL=y

CONFIG_INIT_STACKS=y

...but then the program doesn't start. The system falls in a fault handler. 

I'm quite new with the Zephyr OS. Is it possible to enable the shell throught the usbd on the nrf52840 ? Does anybody know how can we fix this, what configuration to use? 

Thanks for your help.

Darko Petrovic