Hello Alan,

In addition to the ID pin, there is another pin, VBUS, which is optional.

In the case of the VBUS pin, it is set on the board.

Similar procedures must be done.

Best regards,

Flavio

Em dom., 21 de mar. de 2021 às 09:35, Alan Carvalho de Assis
<acas...@gmail.com> escreveu:
>
> Hi Flávio,
>
> I agree, this pin is optional and only will be active when OTG is really used.
>
> Maybe a solution should be verifying if the USB Host support is
> enabled, since the pin is not required when using as USB Device:
>
> #ifdef CONFIG_USBHOST
>   stm32_configgpio(GPIO_OTGFS_ID);    /* Only needed for OTG */
> #endif
>
> I think this the right solution, but let hear from others to know if
> there is a better solution.
>
> BR,
>
> Alan
>
> On 3/21/21, Flavio Castro Alves Filho <flavio.al...@gmail.com> wrote:
> > Hello Allan,
> >
> > I found the solution.
> >
> > The PA10 pin has been initialized as a GPIO in USB OTG driver. More
> > specifically, in file stm32_otgfsdev.c file, line 5602.
> >
> > I commented this line and everything worked.
> >
> > This is a solution for me, but it is a problem for the project,
> > because it is better that this pin be flexible. The ID pin is not
> > mandatory when we intend to implement USB device software.
> >
> > I will think of an option in menuconfig and I will propose to you.
> >
> > Best regards,
> >
> > Flavio
> >
> >
> >
> > Em sáb., 20 de mar. de 2021 às 14:59, Flavio Castro Alves Filho
> > <flavio.al...@gmail.com> escreveu:
> >>
> >> Hello Allan,
> >>
> >> I believe that rx pin from usart1 (PA10) is not yet operational.
> >>
> >> I could not find in code why.
> >>
> >> Best regards,
> >>
> >> Flavio
> >>
> >>
> >>
> >> Em sáb, 20 de mar de 2021 14:18, Alan Carvalho de Assis
> >> <acas...@gmail.com> escreveu:
> >>>
> >>> On 3/20/21, Flavio Castro Alves Filho <flavio.al...@gmail.com> wrote:
> >>> > 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.
> >>> >
> >>>
> >>> Of course, you need to run in the NuttX terminal:
> >>>
> >>> nsh> sercon
> >>> DCD register : 0000
> >>> sercon: Registering CDC/ACM serial driver
> >>> sercon: Successfully registered the CDC/ACM serial driver
> >>> stm32_usbsuspend: resume: 0
> >>>
> >>> nsh> ls /dev
> >>> /dev:
> >>> console
> >>> null
> >>> ttyACM0
> >>> ttyS0
> >>> nsh>
> >>>
> >>> After doing it the USB CDC/ACM will be detected.
> >>>
> >>> BR,
> >>>
> >>> Alan
> >
> >
> >
> > --
> > Flavio de Castro Alves Filho
> >
> > flavio.al...@gmail.com
> > Twitter: http://twitter.com/#!/fraviofii
> > LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> >



-- 
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