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 not coming out

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I am designing a proof of concept using early samples of MSPM0L1306. It uses 4 PWMs to drive the windings of a motor. 4 PWMs are configured in the same way, with the exception of one generating interrupts for the control laws. 

The project uses Sysconfig for the MCU configuration.

When I run the code, there are no signals coming out of one of the PWM pair (TIMG1). All other PWMs work as expected. 

The Sysconfig file is as follows : 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "MSPM0L130X" --package "VQFN-24(RGE)" --part "Default" --product "mspm0_sdk@0.57.00.00"
* @versions {"tool":"1.15.0+2826"}
*/
/**
* Import the modules used in this configuration.
*/
const Board = scripting.addModule("/ti/driverlib/Board");
const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
const GPIO1 = GPIO.addInstance();
const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
const PWM1 = PWM.addInstance();
const PWM2 = PWM.addInstance();
const PWM3 = PWM.addInstance();
const PWM4 = PWM.addInstance();
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
const UART = scripting.addModule("/ti/driverlib/UART", {}, false);
const UART1 = UART.addInstance();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Surprisingly, the TIMG1 is not present in the pinmux section at the end, which would explain why. However, its absence is strange, and adding it manually by editing the sysconfig fil in text mode doesn't solve the issue.

Sysconfig doesn't indicate any conflict on the pin attribution, and the function highlighted in the device representation is correct. 

Any idea why this PWM has no output ?

Thanks in advance, 

Best regards,

Adrien

  • Hi Adrien, 

     

    The pins (PA0 and PA1) you use for TIMG1 are open-drained. This means they need a pull-up resistor while being used. Are you using the pins like that?

    If not, can you test if that solves the issue? Here’s a post with information about open-drained pins.

    Alternatively, you can use different pins that can use TIMG1. For more information on this, please refer to the MSPM0L130x Mixed-Signal Microcontrollers datasheet (Pin Attributes table)

     

    Best Regards,

    Diego Abad

  • Hi Diego,

    Thank you very much. We have not been able to add pull up resistors on these pins (QFN are tough to work with), but I have been able to measure the PWMs when using a different pin set. At this stage, this is the most likely explanation for my issue. 

    Thank you very much for your help,

    Best regards,

    Adrien Thurin