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.

MSPM0L1306: PWM with frequency of 38KHz does not work

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG

hello, I'm using MSPM0L1306 to generate a 38KHz pwm, I'm using the Resourse Explorer examples. I changed the "timer clock prescaler" to 84 and the "PWM Period Count" to 10 in the .syscfg file so that the "Calculated PWM Frequency (Hz)" is 38KHz. But I didn't get the 38kHz outputs... from 16KHz the output doesn't respond... Below 16KHz it's ok.

  • Hi Tiago,

    I just tested the code with a modified version of the timx_timer_mode_pwm_edge_sleep, so it fits the desired PWM frequency, and I got the correct 38KHz result. I'll attach the project, measurements, and SYSCONFIG configuration below. Please confirm that the code I'm attaching also works for you.

    modified_38KHz_PWM.zip


    Best Regards,
    Diego Abad

  • preciso usar a saída PA17 do VQFN32, pino físico numero 21, com o timer TIMG4, porem ele não consta como opção no arquivo .syscfg..

    no datasheet mostra PA17 como opçao do TIMG4...

    Como faço para usar o PA17 no TIMG4 ?

  • Hi Tiago,

    In the future, please create a new E2E Question if the original E2E thread question one was solved. That way, we can keep better track of your needs.

    As for how to use the TIMG4, I recommend unclicking PWM Channel 0 in your SYSCONFIG, changing the Timer Peripheral to TIMG4, and re-selecting PWM Channel 0. By doing so, you should be able to choose PA17 as your Counter Compare.

    Best Regards,
    Diego Abad

  • Hi Diego

    Thank you so far.

    Option PA17 appears, but none of the pin options for channel 0 work. For channel 1 it's ok. And I need to use the PA17.

  • Hi Tiago,
    Most likely you have some jumpers that are not allowing you to use those pins. Please refer to the MSPM0L1306 LaunchPad Development Kit to find how to set up your jumpers. Moreover, be aware that PA17 is a Standard with Wake kind of pin.

    Best Regards,

    Diego Abad

  • Previously I had looked at the schematic of the kit, to seek answers, actually the pin is connected between micro and terminal... not jumpers

    Do I need to be concerned about your quote "be aware that the PA17 is a standard pin type with Wake" ?

  • Hi Tiago,

    Since you have a PIN that has UART as its option, there are some jumpers you may need to re-arrange in order to make it work due that sometimes it can think you are trying to use UART rather than TIMG. That's why you need to see if there might be any jumpers that could be interfering with your PIN. 

    For the latter, that's something you should just be aware of. For more information, please refer to the datasheet.

    Best Regards,

    Diego Abad

  • Diego, I don't understand, the PA17 is connected directly to the micro, without jumpers, I can use it as a digital output, but it doesn't work as PWM of the TIMG4...

  • Hi Tiago,
    I'll look over this problem today and tomorrow.

    Regarding what I meant by jumpers, please refer to the following pictures. You have multiple of these jumpers around your launchpad, and sometimes depending on how they are connected, they can affect the functionality of some PINs of the launchpad. That's why I want you to make sure that the jumpers are not affecting that specific PIN.

    Best Regards,

    Diego Abad

  • hi Diego

    According to the diagram, the PA17 does not have a jumper connection. From what I saw in the manual, no jumper has action on the functionality of the PA17.

  • Hi Tiago,

    Thank you for your patience. E2E went down for a couple of days.

    I tested the PIN using a modified version of the PWM edge sleep from the SDK and got an output from the PINA17. I'll attach my results and the Launchpad jumper configuration I used. Please try the jumper configuration and the project attached to this message, and let me know if it works.

      Modified_Edge_Sleep_PINA17.zip

    Best Regards,
    Diego Abad

  • Hi Diego, Thanks for the support.

    At the beginning I couldn't generate frequencies higher than 16Khz on the PA17, CH0. And on CH0 PA15 normally. This morning I started again and I was not successful, until I changed the timer parameters so much, it worked, now it is working, including all jumpers in the standard way. I don't know where the problem was, or if there was a problem.

    But thank you for your effort to help me solve it.

    Thanks