Hello! I'm trying to run MicroPython on subject board. I take config file from Olimex E407, edited ports with LEDs and buttons, build and upload to board. Everything run well, but I have some questions
Why ttyACM and Flash drive appears only if BOTH usb-ttl adapter and usb cable connected to board? If I use usb only for powering device and attach usb-ttl adapter, I still can't access filesystem and REPL console. Same situation for usb-only connection to PC.
I've attached mpconfigboard.h. Maybe i need to make some changes to config file to get board working properly?
Thanks in advance.
And sorry for my english, not my native.
Waveshare Port407Z
Re: Waveshare Port407Z
I guess it might depend on how the board is wired.
If your configuration has MICROPY_HW_USB_VBUS_DETECT_PIN set to a pin and VBUS is not actually connected to that pin then that could cause problems.
Looking at the schematic, it seems that board uses PA9 for UART TX, and don't connect VBUS up, so you'll need to make sure that MICROPY_HW_USB_VBUS_DETECT_PIN is not defined.
If your configuration has MICROPY_HW_USB_VBUS_DETECT_PIN set to a pin and VBUS is not actually connected to that pin then that could cause problems.
Looking at the schematic, it seems that board uses PA9 for UART TX, and don't connect VBUS up, so you'll need to make sure that MICROPY_HW_USB_VBUS_DETECT_PIN is not defined.
Re: Waveshare Port407Z
Thanks for answer! I forgot to attach config file, so here is: http://pastebin.com/r5Ln76Rv
MICROPY_HW_USB_VBUS_DETECT_PIN is set, you right. I try to change the configuration and see what happens.
is there somewhere a description of all the variables of the configuration file?
MICROPY_HW_USB_VBUS_DETECT_PIN is set, you right. I try to change the configuration and see what happens.
is there somewhere a description of all the variables of the configuration file?
Re: Waveshare Port407Z
I'm not aware of any documentation of the configuration options other than reading the source code.
Re: Waveshare Port407Z
JFYI, there is a jumper (USB.P3 on scheme), that connecting 5V to PA9.
I'm totally wrong - jumper is used only for USB host powering. Right way to get the USB working - undefine corresponding variable.
And one more question. As datasheet says, STM32F4 have internal ethernet MAC and can do ethernet via external PHY like DP83848. Is it supported by the project?
Thanks
Code: Select all
I've short it and everything became well.
Or, I can undefine MICROPY_HW_USB_VBUS_DETECT_PIN, open jumper and everithing is also good.
As I can understand, VBUS pin on USB jack is connected only to power source, not to CPU. USB.P3 jumper eliminates this "flaw".
And one more question. As datasheet says, STM32F4 have internal ethernet MAC and can do ethernet via external PHY like DP83848. Is it supported by the project?
Thanks
Re: Waveshare Port407Z
There aren't currently any drivers written to support this.fomichevk wrote:And one more question. As datasheet says, STM32F4 have internal ethernet MAC and can do ethernet via external PHY like DP83848. Is it supported by the project?
Re: Waveshare Port407Z
And one more question:
For what purpose PA9 is used? And MICROPY_HW_USB_VBUS_DETECT_PIN?
I mean, board working properly in both cases: when i connect VBUS to PA9 and left variable set, and when PA9 left unconnected and variable is unset. Which way is right? How I can understand, micropython not using USB OTG, so PA9 must be down, I am right?
Thanks
For what purpose PA9 is used? And MICROPY_HW_USB_VBUS_DETECT_PIN?
I mean, board working properly in both cases: when i connect VBUS to PA9 and left variable set, and when PA9 left unconnected and variable is unset. Which way is right? How I can understand, micropython not using USB OTG, so PA9 must be down, I am right?
Thanks
Re: Waveshare Port407Z
If you look in the datasheet, PA9 can be used for a variety of purposes. It can be used for TIM1_CH2, I2C3_SMBA, USART1_TX, DCMI_D0 as a GPIO, or as OTG_FS_VBUS.
When you configure MICROPY_HW_USB_VBUS_DETECT_PIN you're basically saying you want to use PA9 for the OTG_FS_VBUS configuration.
The software then tells the FS USB that it should use VBUS detection. If the FS USB is configured this way, then it won't work unless a logic high is detected on PA9.
The reason plugging in your serial adapter made it work is because USART1_TX idles in a logic high state.
The "right" way is to configure it to match how the board is wired. In your case PA9 is NOT connected to VBUS, so you should have MICROPY_HW_USB_VBUS_DETECT_PIN undefined.
When you configure MICROPY_HW_USB_VBUS_DETECT_PIN you're basically saying you want to use PA9 for the OTG_FS_VBUS configuration.
The software then tells the FS USB that it should use VBUS detection. If the FS USB is configured this way, then it won't work unless a logic high is detected on PA9.
The reason plugging in your serial adapter made it work is because USART1_TX idles in a logic high state.
The "right" way is to configure it to match how the board is wired. In your case PA9 is NOT connected to VBUS, so you should have MICROPY_HW_USB_VBUS_DETECT_PIN undefined.