Page 3 of 17

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Mon Mar 06, 2017 2:13 pm
by kid06
Indeed one more mistake.

You need to put

Code: Select all

#define MICROPY_HW_RTC_USE_LSE      (1)
***AFTER*** pll definitions or you'll get wrong cpu freq. e.g.:

Code: Select all

#define STM32F407COREV

#define MICROPY_HW_BOARD_NAME       "Black STM32F407CORE (8MHz HSE)"
#define MICROPY_HW_MCU_NAME         "STM32F407"

#define MICROPY_HW_HAS_SWITCH       (1)
#define MICROPY_HW_HAS_FLASH        (1)
#define MICROPY_HW_HAS_SDCARD       (1)   /* XXX */
#define MICROPY_HW_HAS_MMA7660      (0)
#define MICROPY_HW_HAS_LIS3DSH      (0)
#define MICROPY_HW_HAS_LCD          (0)
#define MICROPY_HW_ENABLE_RNG       (1)
#define MICROPY_HW_ENABLE_RTC       (1)
#define MICROPY_HW_ENABLE_TIMER     (1)
#define MICROPY_HW_ENABLE_SERVO     (1)
#define MICROPY_HW_ENABLE_DAC       (1)
#define MICROPY_HW_ENABLE_CAN       (1)

// HSE is 8MHz
#define MICROPY_HW_CLK_PLLM (8)
#define MICROPY_HW_CLK_PLLN (336)
#define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV2)
#define MICROPY_HW_CLK_PLLQ (7)
#define MICROPY_HW_RTC_USE_LSE      (1)

// UART config
#define MICROPY_HW_UART1_TX     (pin_A9)   // PA9,PB6
[.....]
Now I continue some checks...

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Mon Mar 06, 2017 2:21 pm
by mcauser
That's how all of the other mpconfigboard.h's do it. RTC is defined after HW_CLK
eg. https://github.com/mcauser/micropython/ ... figboard.h

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Mon Mar 06, 2017 2:49 pm
by kid06
Thank you mcauser.

I'm a MicroPython newbie, and I've just started looking at source code.

I've done some more tests.
Servo:

Code: Select all

>>> sr=pyb.Servo(1)
>>> sr.angle(-90)
>>> sr.angle(90)
>>> sr.angle(-90)
>>> sr.angle(90)
>>> sr.angle()
85
>>> sr.angle(-90)
>>> sr.angle()
-79
>>> sr.angle(-90)
>>> sr.angle(0)
>>> sr.angle()
0
>>>
correct, apart from calibration.

cpufreq & RTC:

Code: Select all

>>> pyb.freq()
(168000000, 168000000, 42000000, 84000000)
>>> rtc=pyb.RTC()
>>> rtc.datetime()                                                              
(2017, 3, 6, 1, 15, 36, 4, 206)                                                 
>>> 
Cpu freq are identical to your fork.

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Fri Mar 10, 2017 4:19 pm
by SpotlightKid
Got my Black STM32F407VET6 board today and it was very easy to get it up and running. Thanks for your good work, guys!

A very minor hick-up I encountered: to get the board enumerated as a DFU device in Linux, it wasn't enough to set the jumper between BOOT0 and 3V3 and press reset, I had to actually disconnect and reconnect the USB cable for the device to show up and to be able to do the the "make deploy". This just as a heads up to anybody getting started with this board too.

Connecting with rhell then worked at first attempt and the RTC was initialised correctly from the start and rtc.datetime() gave the correct output.

I think I'm going to order one of the small blue VCC-GND boards too...

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Fri Mar 10, 2017 6:56 pm
by dhylands
I have a suspicion about the DFU problem. On my VCC_GND_F407 board it will enter DFU mode but not leave it. Looking at the schematic I see a 1.5k pull down resistor on the D+ line. This overrides the MCU's ability to add/remove a pulldown to simulate a cable unplug/replug, so I have it on my TODO list to remove that resistor and see if that makes things behave better.

The 407 doesn't need the external pulldown resistor, and the pyboard doesn't have one either.

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Sat Mar 18, 2017 11:25 pm
by dhylands
If you remove R8 (highlighted in the picture) then you can switch between DFU mode and REPL mode without needing to unplug the USB cable.

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Tue Jun 20, 2017 6:42 am
by pragmantic
Hi guys!
So nubeeeee here... is there a place I could download a .bin for the VET6 board? I spent hours trying to compile this and no luck; get a "wrong board " message when I try to make.... Running on windows, even set up an old laptop with Ubuntu to try to do this... nada!

tnx!

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Tue Jun 20, 2017 7:08 am
by mcauser
I have compiled the latest v1.9.1-29 firmware for the BLACK_F407VE board and attached to the release:
https://github.com/mcauser/BLACK_F407VE ... tag/v1.0.0

Logged output here:
https://gist.github.com/mcauser/8d0e75d ... 0a29aa01bf

Also compiled v1.9.1 for my other STM32 boards:
https://github.com/mcauser/BLACK_F407ZE ... tag/v1.0.0
https://github.com/mcauser/VCC_GND_F407 ... tag/v1.0.0

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Tue Jun 20, 2017 5:09 pm
by pragmantic
Thanx!!! I will try it today!

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Posted: Tue Jun 20, 2017 6:58 pm
by pragmantic
IT'S ALIVE!!!! THANX!!!