Re: Porting micropython to STM32Nucleo-F4
Posted: Thu Aug 27, 2015 12:13 am
I happen to have a 401NUCLEO board sitting on my shelf, so I cloned your repository and flashed using stlink.
I was able to reproduce your results. I tried A0 thru A10 (skipping A2/A3 since those are are REPL UART) and on all of them except A9, the pullup seemed to work fine.
Since A9 is used for VBUS sensing, I theorized that some USB circuitry was being connected.
I modified your mpconfigbord.h file and commented out the line, but that didn't seem to make any difference.
You may need to completely disable the USB device completely (which IIRC is non-trivial with the current codebase) in order to get the internal A9 pullup to behave properly.
I was able to reproduce your results. I tried A0 thru A10 (skipping A2/A3 since those are are REPL UART) and on all of them except A9, the pullup seemed to work fine.
Since A9 is used for VBUS sensing, I theorized that some USB circuitry was being connected.
I modified your mpconfigbord.h file and commented out the
Code: Select all
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
You may need to completely disable the USB device completely (which IIRC is non-trivial with the current codebase) in order to get the internal A9 pullup to behave properly.