if i come up with way to keep things synchronized between the two.
There are infinite ways to do this, complex to simple, unreliable to bulletproof. I'd suggest trying to avoid having to synchronise data as much as possible, otherwise things can get hairy quickly.
I'm kinda hoping to get away sharing just one or two values. First would be 0-100%(or 0-255 doesn't
matter i guess), and later i might do some "position/angle calc" on the other mcu, which would be the
one that might require synchronising more accurately.
Wondering if it would help running the slave by clock output by new master ? Found out there's a
possibility to output a clock by a pin w/"RCC_CCO"(which can apparently be "muxed" by optionbyte).
might be the most fun
I'd be running for the hills!
What sort of jobs do you want to split up between the two micros?
Mostly everything beside the main thing it does, which is complementary pwm for the three phases.
Would prefer not modifying things on the pcb as far as possible(i do have a soldering iron, but the less
i need to use it the better). Short list of what i would move completely:
- communication with display
- throttle
- any other possible input by user not including brakes
The main pcb has current sensor only on one phase, and i will look at moving current sensing/limiting
to the other mcu as well - while the main board will still have original overcurrent input by a opamp.