This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CAPCOM6 PWM erzeugen???

Hallo, jemand da der sich mit dem Infineon XC167 und dessen CAPCOM6 auskennt? Ich möchte ein PWM Signal erzeugen. In den Regs siehts gut aus aber an den Pins kommt noch nichts an.
-

Parents
  • In the Debugger i can see that the Registers are loaded correctly and that the State Bit switches from 1 to 0 depending on the actual Counter Value. That works allright.
    But I cannot see a PWM signal on the output COUT63 (Pin123) of my microcontroller. Do I have to enable any more Bits or Registers to see the signal on the pin?
    What about Multichannel Mode?

    Here is my code (as far as until now)
    ++++++++++++++++++++++++++++++++++++

    CCU6_TCTR0 = 0x0400; //Prescaler and CLK
    CCU6_T13 = 326; //Counter predefinition
    CCU6_CC63SR = 500; //Duty Cycle=50%
    CCU6_T13PR = 1000; //Period=1000 counts
    CCU6_TCTR4 = 0x0400; //T13 reset
    CCU6_TCTR4 = 0x4000; //Make Shadow Transfer

    // Here I am in doubt:
    CCU6_CMPSTAT = 0x0000;//Passive Level=0, TIM=0

    CCU6_MODCTR = 0x8000; //ECT13O=1
    CCU6_TCTR4 = 0x0200; //start Timer

    *********************************
    I'm thankful for help
    Martin

Reply
  • In the Debugger i can see that the Registers are loaded correctly and that the State Bit switches from 1 to 0 depending on the actual Counter Value. That works allright.
    But I cannot see a PWM signal on the output COUT63 (Pin123) of my microcontroller. Do I have to enable any more Bits or Registers to see the signal on the pin?
    What about Multichannel Mode?

    Here is my code (as far as until now)
    ++++++++++++++++++++++++++++++++++++

    CCU6_TCTR0 = 0x0400; //Prescaler and CLK
    CCU6_T13 = 326; //Counter predefinition
    CCU6_CC63SR = 500; //Duty Cycle=50%
    CCU6_T13PR = 1000; //Period=1000 counts
    CCU6_TCTR4 = 0x0400; //T13 reset
    CCU6_TCTR4 = 0x4000; //Make Shadow Transfer

    // Here I am in doubt:
    CCU6_CMPSTAT = 0x0000;//Passive Level=0, TIM=0

    CCU6_MODCTR = 0x8000; //ECT13O=1
    CCU6_TCTR4 = 0x0200; //start Timer

    *********************************
    I'm thankful for help
    Martin

Children