1) Compile option for each Pinout and CPU - sharing the same code base.
#define for - Each of 6 CPUs
#define for CCT and HiAmp user selects on higher pinout CPU
#define for Flash vs EEprom
#define for AL8863 vs MP24833
If these 8 features below are implemented, we have success
1) read each of the GPIO inputs
2) setup the physical analog inputs and the internal band gap reference and temperature, 1 ms sampling to 12 bits is needed. DMA to an array.
3) convert the pot analog value into pwm outputs. MP and 0-10v are 3300 steps, PNP is 1024 steps, 1200 khz
4) send a 416 us low pulse to the DALI out pin each time sw1 changes state - requires 104 us timer interrupt functioning
5) create an internal state machine that toggles each time sw1 is pulsed low
6) save the state of that in eeprom ( or flash) and restore that value on power up
7) Drive fan mode off at power up - do not attempt to enable fan mode if vled is greater than 12v, can probably just leave fan mode disabled until the entire code base is loaded
8) sample sw1 and n-way every 1ms
9) sample Dali in every 104 us
Bonus points
10) set rdp 30 ms after first code execution
11) reset rdp as part of the programming script
Today we program the stm32 from a dos command line batch file. Need a single click method to reset rdp and program the device