I have attached a generic powerstage to an stm32f407 discovery board, and have gotten it working on the motor drive part.
However, for some reason when I change and upload a non-default motor/app configuration, it will reset to default upon power cycling/resetting the board.
If I do not reset the board, vesc tool will read out the correct value I wrote. bit hte value resets to default as soon as a reset occurs.
I have tried in 2 discovery boards. one with the stlink removed.
The firmware and bootloader upload from vesc tool works fine. So the mcu can write to it's own flash.
I have tried the default vesc6_mk3 firmware from a completely cleared board and it still won't save the values.
The same firmware uploaded to a stm32f405 works fine.
Is there some difference between the stm32f405 and 407 I am missing for flash modification? The whole vesc project seems to be built for the 407 and just only uses the pins of the 405 so I don't see what the problem could be?