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.

TMS320F28075: Resetting all peripheral registers simply

Part Number: TMS320F28075


I'm trying to find the simplest, easiest, and cleanest way to reset all register values in the PWM peripherals of the TM320F28075, without doing a soft/hard reset.  In other processors, I've seen that you can disable the clock to the peripheral and it will reset all registers automatically.

I have two separate operating behaviors for the PWM peripheral - and the two operations need to context switch without losing power and while maintaining all RAM values.   I'd like to not have to reset every. single. register. on the PWMs individually, but do a complete reset of the whole peripheral.

  • Dan,

    Edit: I was corrected by a colleague my edits are inline.

    There are two ways that you can do this:
    1) toggle the Peripheral Software Reset bit for the specific EPWM module - SOFTPRES2.
    2) toggle the Peripheral Clock Gating bit for the specific EPWM module - PCLKCR2  Edit: this only blocks updates to the register, when you re-enable the clock, the previous values will still be there. 

    Toggling either of these  the Peripheral Software Reset bits will accomplish what you are looking for. You will need to completely re-initialize all of the EPWM configuration registers after toggling the bits

    Thanks,
    Mark