My Vcc-gnd.com STM32F407VET6 Mini issues

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

User avatar
russian
Posts: 310
Joined: Mon Oct 29, 2012 3:17 am
Location: Jersey City, USA
Has thanked: 12 times
Been thanked: 5 times

My Vcc-gnd.com STM32F407VET6 Mini issues

Postby russian » Mon Jan 28, 2019 2:31 am

I've got myself a couple of Vcc-gnd.com STM32F407VET6 Mini boards like https://wiki.stm32duino.com/index.php?t ... 7VET6_Mini and I have two problems with them - so far I am unable to get my code to start on these.

(Boards are happy to blink user LED with default firmware so they seem to be alive)

1) these boards use 25MHz osc, which *conf.h values should I change from my usual 8MHz settings? So far I've changed STM32_PLLM_VALUE and STM32_RTCPRE_VALUE from 8 to 25. Are there any more values I would need to change from my typical stm32f4discovery settings?

2) [not ChibioOS problem at all] ST-Link/SWD flashing/debug is not working unless I toggle BOOT0. So far on my other boards ST-Link/SWD is never asking for BOOT0, why does this board not work without BOOT0? I believe this stands in the way of me being able to debug my firmware.

I am able to flash with BOOT0=VCC via USB in DFU mode.
http://rusefi.com/ - electronic fuel injection

User avatar
russian
Posts: 310
Joined: Mon Oct 29, 2012 3:17 am
Location: Jersey City, USA
Has thanked: 12 times
Been thanked: 5 times

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby russian » Mon Jan 28, 2019 2:38 am

Board schematics is available at https://wiki.stm32duino.com/images/6/69 ... ematic.pdf - it shows R5 R6 BOOT* pull-downs
http://rusefi.com/ - electronic fuel injection

User avatar
Giovanni
Site Admin
Posts: 11831
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 522 times
Been thanked: 433 times
Contact:

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby Giovanni » Mon Jan 28, 2019 6:03 am

Hi,

Clock setting looks right, you should verify GPIO settings in board.h, especially those GPIOs used for JTAG/SWD.

Giovanni

User avatar
RoccoMarco
Posts: 610
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 73 times
Been thanked: 56 times
Contact:

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby RoccoMarco » Mon Jan 28, 2019 7:09 am

Configure properly boot pin to boot from flash. It should be boot 0 to gnd but to be sure make some comparisons with F407 DISCOVERY schematic
Ciao,
RM

User avatar
alex31
Posts: 267
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 16 times
Been thanked: 32 times
Contact:

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby alex31 » Wed Jan 30, 2019 6:06 pm

Hi,

[1) these boards use 25MHz osc, which *conf.h values should I change from my usual 8MHz settings? So far I've changed STM32_PLLM_VALUE and STM32_RTCPRE_VALUE from 8 to 25. Are there any more values I would need to change from my typical stm32f4discovery settings?


You should probably define STM32_HSECLK to 25000000 in board.h

IMHO, it's a good habit to launch STM32Cubemx, you select the exact processor you use, and do the pin affactation, and clock configuration with this tool. It's easy after to match the values to the chibios *conf.h files.

Let us know if you succeed running chibios on theses boards.

Alexandre

User avatar
russian
Posts: 310
Joined: Mon Oct 29, 2012 3:17 am
Location: Jersey City, USA
Has thanked: 12 times
Been thanked: 5 times

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby russian » Wed Jan 30, 2019 11:58 pm

alex31 wrote:You should probably define STM32_HSECLK to 25000000 in board.h


STM32_HSECLK=25000000U
STM32_PLLM_VALUE=25
STM32_RTCPRE_VALUE=25

Still no luck.

Another weird fact that I get readout protection warning only while programming my firmware into this board.

Another weird fact is that behavior is different between my master branch which is still ChibiOS17 and my ChibiOS18 migration branch - on ChibiOS18 at least I get the user LED half-on (expected to blink at 1Hz maybe time to plug in logic analyzer see if it blinks at a very different speed). Too many weird things about this board while discovery and black large 8MHz osc board just work as is.
Attachments
unexpected_read_out.png
http://rusefi.com/ - electronic fuel injection

User avatar
Giovanni
Site Admin
Posts: 11831
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 522 times
Been thanked: 433 times
Contact:

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby Giovanni » Thu Jan 31, 2019 6:28 am

Try to run from internal oscillator, this will tell you if it is clock related.

Giovanni

User avatar
russian
Posts: 310
Joined: Mon Oct 29, 2012 3:17 am
Location: Jersey City, USA
Has thanked: 12 times
Been thanked: 5 times

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby russian » Thu Jan 31, 2019 6:52 am

Minor update: we are trying to get trivial LED blinking code to work BEFORE halInit(); and this did NOT work until we've replaced crt0_v7m.S with a more plain https://raw.githubusercontent.com/progr ... tm32f4xx.s

Will solder the pin so that I can hook logic analyzer tomorrow.

See https://github.com/rusefi/rusefi/pull/686/files
http://rusefi.com/ - electronic fuel injection

User avatar
RoccoMarco
Posts: 610
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 73 times
Been thanked: 56 times
Contact:

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby RoccoMarco » Thu Jan 31, 2019 7:18 am

Can you share the whole mcuconf.h?
Ciao,
RM

User avatar
russian
Posts: 310
Joined: Mon Oct 29, 2012 3:17 am
Location: Jersey City, USA
Has thanked: 12 times
Been thanked: 5 times

Re: My Vcc-gnd.com STM32F407VET6 Mini issues

Postby russian » Fri Feb 01, 2019 5:52 am

Something is weird with this board.

On the one hand I got it working couple of times with https://github.com/rusefi/rusefi
https://github.com/rusefi/rusefi/blob/m ... 6_Mini.bat parameters https://github.com/rusefi/rusefi/tree/m ... stm32f4ems configs

I definitely had both LED blinking and USB serial working at some point. Not I have a funny state: if I flash using 4 wires SWD I have my LED blink definitely at expected frequency. I also get USB working if I plug micro USB cable.

BUT the moment I hit "reset" button I get no blinking LED and no USB? WAT? How is my firmware only works once after SWD programming and never later?

This is unusual, very different from what I get on discovery or only own brain boards https://github.com/rusefi/rusefi/tree/m ... rain_board
http://rusefi.com/ - electronic fuel injection


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 1 guest