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.

AM13E23019: Set MCPWM pins to high impedance by software

Part Number: AM13E23019

Hello team,

is there any way to put the MCPWM pins into high-impedance mode by software to turn them off?

In AQSFRC register it is only configurable to high or low idle level but not high Z.

Best regards
Manuel

  • Hello Manuel,

    You are correct that the AQSFRC register (Chapter 18, offset 0x24) only allows forcing outputs high or low and does not natively support a high-impedance (high-Z) state. However, you have two software-based approaches to achieve this for the AM13E230x:

    Option 1: Trip-Zone (TZ) Submodule (Recommended)

    The Trip-Zone submodule (Chapter 18) is designed to safely disable PWM outputs, including forcing them to high-impedance. Configure it as follows:

    1. Set the trip action to high-Z in the TZCTL register (Chapter 18, offset 0x12). Set the TZA and/or TZB bitfields to 0,0 (see table below):

      TZCTL Bitfield
      Output State
      Comment
      0,0
      High-Impedance
      Tripped
      0,1
      Force High
      Tripped
      1,0
      Force Low
      Tripped
      1,1
      No Change
      Do Nothing
    2. Trigger the trip event by enabling a trip source in the TZSEL register (Chapter 18, offset 0xA0). You can use a One-Shot (OST) or Cycle-by-Cycle (CBC) trip signal. A software-forced trip event, triggered via TZFRC (Offset 0x18), will immediately place the outputs into high-Z.

    This approach provides per-output (A and B independently) control and utilizes hardware specifically designed for safe PWM shutdown [1]. Trip zones are active low - activating them requires setting the corresponding TZSEL bit for either one-shot or cycle by cycle operation [5]. A tripped state requires clearing using TZCLR(Offset 0x16) for OST sources.

    Option 2: IOMUX Pin Reconfiguration

    You can disconnect the MCPWM signal from the pin entirely by reconfiguring the pin’s mode in the IOMUX register to 0 (Disconnected) [7]. For example:

    • PA7 (IOMUX_PA7 at 0x400C_C01C): Mode 0 = Disconnected
    • PA8 (IOMUX_PA8 at 0x400C_C020): Mode 0 = Disconnected
    • PA11 (IOMUX_PA11 at 0x400C_C02C): Mode 0 = Disconnected

    Setting Mode 0 effectively tri-states the pin [4]. You must write the appropriate mode value back to re-enable the PWM function.

    Which Approach to Use?

    Criteria
    Trip-Zone
    IOMUX
    Response speed
    Fast (hardware-level)
    Slower (register write latency)
    Designed for PWM control
    Yes
    No (general pin mux)
    Per-output A/B control
    Yes
    Per-pin only
    Best for
    Fault handling, runtime on/off
    Static disable, unused channels

    For most use cases – especially where you need to dynamically enable/disable PWM outputs during operation – the Trip-Zone approach is the better choice. It’s designed specifically for this purpose and responds with hardware-level speed [5].

    References:

    1. AM13E230x TRM (SPRUJF2A) – MCPWM Module Overview, Ch. 18
    2. AM13E230x Datasheet (SPRSPC3) – MCPWM Base Addresses
    3. AM13E230x TRM (SPRUJF2A) – TZSEL Register, Offset 0xA0
    4. AM13E230x TRM (SPRUJF2A) – TZCTL Register, Offset 0x12
    5. AM13E230x TRM (SPRUJF2A) – Trip Zone Submodule
    6. AM13E230x TRM (SPRUJF2A) – MCPWM Register Map
    7. AM13E230x Datasheet (SPRSPC3) – IOMUX Pin Configuration

    Best Regards,

    Zackary Fleenor