Documentation of STM32 inputs and outputs

Post Reply
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Documentation of STM32 inputs and outputs

Post 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:
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Documentation of STM32 inputs and outputs

Post by johu »

See if that helps

It was just for me personally, so contains a lot of crap
Attachments
stm32_pins.ods
(19.48 KiB) Downloaded 104 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: Documentation of STM32 inputs and outputs

Post 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.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Documentation of STM32 inputs and outputs

Post 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
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply