Page 1 of 1

Documentation of STM32 inputs and outputs

Posted: Tue Mar 29, 2022 11:28 pm
by catphish
I'm interested in running my own firmware on an OpenInverter SDU board. Is there any documentation of the STM32 pins and their function? A lot of them are self-explanatry (PWM, encoder, digital IO), but I would like to make sure I understand all of them, most importantly the error and overcurrent control pins (ocurlim, pwm_inhibit, desat, etc).

Thanks! :idea:

Re: Documentation of STM32 inputs and outputs

Posted: Wed Mar 30, 2022 9:25 am
by johu
See if that helps

It was just for me personally, so contains a lot of crap

Re: Documentation of STM32 inputs and outputs

Posted: Wed Mar 30, 2022 11:31 am
by catphish
johu wrote: Wed Mar 30, 2022 9:25 am It was just for me personally, so contains a lot of crap
This is a very helpful start, thanks!

I will attempt to document my understanding (specifically with regard to the SDU). Please let me know if I've misunderstood anything and I will update the post accordingly.

ocurlim_pos and ocurlim_neg - analog DAC outputs to set the positive and negative current limits at which ocur_in will activate.
ocur_in - active only when there is an overcurrent fault based on the level defined by ocurlim_pos and ocurlim_neg
pwm_inhibit - ative if ANY hardware fault is detected, including power state faults, UVLO, HVIL, or overcurrent

uvlo_in - not connected in SDU board
mprot_in - not connected in SDU board
emcystop_in - not connected in SDU board
desat - not conected in SDU board

err_out, bms_in - controls mutiplexer for temperature inputs tempm and temphs
tmpm,tmphs - multiplexed analog temperature inputs for motor and inverter

il1, il2 - analog phase current sensor inputs

vtg_out - dc_disch - what does this do? it sounds important.

Re: Documentation of STM32 inputs and outputs

Posted: Wed Mar 30, 2022 4:41 pm
by johu
ocurlim_pos/neg are not true DAC outputs but PWM that is then filtered. Works in the same way though.

dc_disch - never paid attention to it. It activates the bus discharge resistor. I think signal high meant resistor disabled. So vtg_out doesn't really control this in a meaningful manner. I think it should be off (i.e. high) all the time while the logic board is powered. Except maybe when pwm_inhibit inhibits