This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28335: Safe mosfet bridge operation with PWM

Hi all,

I would like to know how can I guarantee that in any case of halting of the dsp, the output of the PWMs I am using latches in high state, to avoid feeding the load directly with the power supply.

When I am using a PWM, if I halt and run (shift+F5 and F5) the dsp several times, the output can get latch in high o low state. I know that nobody will halt the dsp in such way during operation, but in case of it getting stuck or something similar, I would like to avoid to fed the load directly with voltage of the power supply.

 

Thank you in advance.

Ricardo

  •  

     I don't know what is your configuration. Did you know that you can put the PWM module in free running mode (FREE_SOFT bit in TBCTL) so it will continue operating when the DSC is halted?

     Regards.

  • Hi,

    you could set all the action qualifiers to the desired values (high or low) and then freeze the PWM or you could set the ports to output instead PWM.

    Regards,

     

    Raffaele

  • Hi all!

    It seems that the problem was already resolved, but I have to say that I don't fully understand.

    This is the thing: I am controlling a full mosfet bridge with the dsp, and I want that in any kind of stop of the dsp the control signals get latch in a safe state (high in my case). For that I suposed that setting the pullup resistor would be enough. But testing it without the PWM pins connected to anything, the outputs gets latch to high o low state randomly when I run and halt the dsp many times.

    But with the PWMs connected to the whole system, they always get latch to the high state as I want (may be casuality? I will see).

    Thank you for the answers. In fact, I didn't know the FREE SOFT function, so I have learnt something.

     

    Regards,

    Ricardo.

  •  Yes, that is a frequent issue. I am not aware of a mechanism that detects that the core is halted and configures the PIOs to go to a certain state (high or high impedance in your case). The way you usually prevent those problems in the DSC is to run the debugger in real-time mode (in case you have RT requirements) or to use RTDX to transfer data without affecting the operation of your program. If you need a safe way to avoid problems like transistors transconducting, you will need to solve that in hardware with a bridge driver that prevents that state.

     Regards.

  • Hi all again,

    As I said, it seems that enabling the pull-up resistor in the pins I use for the PWM, I have the state I want when the DSP is halted.

    Now, I would like to go one step ahead. I would like to know if it is possible to have that little portion of configuration saved in the DSP, in order to have the pull-up resistors enabled when I switch on the board. Is this possible? or whatever I do, I have to wait that the program set the pullup resistor enabled?

     

    Thank you!

    Ricardo