Updating:

* with the great help from Allan, I could verify that that using usart2 it
works fine
  - stm32f4discovery uses usart2 as console
  - my board, similar to stm32f4discovery, uses usart1 as console

* there is a conflict between the usart1 pins and usb device for
stm32f4discovery configuration in nuttx
  - according to the kit, the same pins (pa9 and pa10) are used for USB
host device detection

What I have done:

* replaced the vbus pin (pa9) to another not used pin
* searched for references about pa10 on the source code, and I couldn't
find anything

For now, I can see the nuttshell prompt on the serial, but it is not
accepting inputs from the keyboard.

And USB device is not working. PC is not detecting the device.

The debug outputs are all turned on, and it shows only the ABC.

I am new on nuttx and I would some advice on how to debug this early stage
initialization of the software, to identify what's running wrong.

Best regards,

Flavio


Em sáb, 20 de mar de 2021 08:11, Flavio Castro Alves Filho <
flavio.al...@gmail.com> escreveu:

> Hello,
>
> I am trying to enable USB CDC support with base NSH Serial in a
> STM32F4 Discovery board.
>
> When I build using usbnsh configuration, it works.
> When I build using nsh configuration (in my case, replacing USART2 to
> USART1), it works.
>
> Now, when I try to add USB CDC support in nsh configuration, I cannot
> see the nsh prompt on the serial anymore. And USB is not initializing
> either.
>
> Here is the defconfig file that I am using. Am I missing something?
>
> # CONFIG_ARCH_FPU is not set
> # CONFIG_NSH_ARGCAT is not set
> # CONFIG_NSH_CMDOPT_HEXDUMP is not set
> # CONFIG_NSH_CMDPARMS is not set
> # CONFIG_STM32_CCMEXCLUDE is not set
> CONFIG_ARCH="arm"
> CONFIG_ARCH_BOARD="stm32f4discovery"
> CONFIG_ARCH_BOARD_STM32F4_DISCOVERY=y
> CONFIG_ARCH_BUTTONS=y
> CONFIG_ARCH_CHIP="stm32"
> CONFIG_ARCH_CHIP_STM32=y
> CONFIG_ARCH_CHIP_STM32F407VG=y
> CONFIG_ARCH_STACKDUMP=y
> CONFIG_BOARD_LATE_INITIALIZE=y
> CONFIG_BOARD_LOOPSPERMSEC=16717
> CONFIG_BUILTIN=y
> CONFIG_CDCACM=y
> CONFIG_EXAMPLES_HELLO=y
> CONFIG_FS_PROCFS=y
> CONFIG_HAVE_CXX=y
> CONFIG_HAVE_CXXINITIALIZE=y
> CONFIG_INTELHEX_BINARY=y
> CONFIG_MAX_TASKS=16
> CONFIG_MM_REGIONS=2
> CONFIG_NFILE_DESCRIPTORS=8
> CONFIG_NSH_BUILTIN_APPS=y
> CONFIG_NSH_FILEIOSIZE=512
> CONFIG_NSH_LINELEN=64
> CONFIG_NSH_READLINE=y
> CONFIG_PREALLOC_TIMERS=4
> CONFIG_RAM_SIZE=114688
> CONFIG_RAM_START=0x20000000
> CONFIG_RAW_BINARY=y
> CONFIG_RR_INTERVAL=200
> CONFIG_SCHED_WAITPID=y
> CONFIG_SDCLONE_DISABLE=y
> CONFIG_START_DAY=6
> CONFIG_START_MONTH=12
> CONFIG_START_YEAR=2011
> CONFIG_STM32_DMA1=y
> CONFIG_STM32_JTAG_SW_ENABLE=y
> CONFIG_STM32_OTGFS=y
> CONFIG_STM32_PWR=y
> CONFIG_STM32_SPI1=y
> CONFIG_STM32_USART1=y
> CONFIG_SYSTEM_CDCACM=y
> CONFIG_SYSTEM_NSH=y
> CONFIG_USART1_RXBUFSIZE=128
> CONFIG_USART1_SERIAL_CONSOLE=y
> CONFIG_USART1_TXBUFSIZE=128
> CONFIG_USBDEV=y
> CONFIG_USER_ENTRYPOINT="nsh_main"
>
>
> Best regards,
>
> Flavio
>
> --
> Flavio de Castro Alves Filho
>
> flavio.al...@gmail.com
> Twitter: http://twitter.com/#!/fraviofii
> LinkedIn profile: www.linkedin.com/in/flaviocastroalves
>

Reply via email to