Skip to main content
Ray1
Associate
Aug 9, 2019 10:35 AM UTC
Question

How to configure flex pwm pins for PWMX.

I am working on SPC56xL Discovery+ kit(spc56el70l5) and i'm unable to generate pwm signal on PWMX pins. We are able to generate pwm signals on PWMA & PWMB pins respectively but not on PWMX pins.

    This topic has been closed for replies.

    3 replies

    Erwan YVIN
    ST Technical Moderator
    Aug 14, 2019 12:43 PM UTC

    Hello Ray ,

    Have you checked these application

    SPC56ELxx_RLA PWM-ICU Test Application for DiscoveryPlus in SPC5Studio ?

    0690X00000A9ZYBQA3.png

    It is maybe a configuration issue.

    Best regards

    Erwan

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
    Ray1
    Ray1Author
    Associate
    Aug 16, 2019 7:47 AM UTC

    I tried demo application, and also checked the pin configuration. Its not working.

    I am setting PWM driver 1, and channel 2 for Hardware pin 26 (pwmx_0).

    pwm_lld_start(&PWMD1, &pwm_config_pwmconfig);

    pwm_lld_enable_channel(&PWMD1, 2, PWM_PERCENTAGE_TO_WIDTH(&PWMD1, 5000));

    Ray1
    Ray1Author
    Associate
    Aug 21, 2019 5:19 AM UTC

    Hi Erwan,

    I am unable to generate pwm signal on PWMX pins, can you provide sample code for generating pwm signal on Hardware pin 26 (pwmx_0).