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.

MSPM0C1104: MSPM0 Not even one example of reading a pin.

Part Number: MSPM0C1104
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG, , MSPM0C1103

Tool/software:

How about adding some examples of reading the button press of the Launchpad?

Can i setup a pin for input pullup without using some childish GUI? EG: pinMode(PA22, INPUT_PULLUP)

I'm ready to throw this devkit out the window.

The IDE fights you every step of the way.

  • nevermind, launchpad is bricked. Factory reset tool (web-based lol) just has a blank button on chrome based and safari based browser. They should call this a "Crashpad"

  • Hello Derek,

    This example in the SDK shows reading the button on the Launchpad, which is connect to PA16: https://dev.ti.com/tirex/explore/node?node=A__APkdnNC2rhYJ00DqHR32FA__MSPM0-SDK__a3PaaoK__LATEST 

    Can you give more context on the issue you are seeing with the factory reset GUI tool?  It works well on my chrome browser.  You can also factory reset the device via CCS and Uniflash (both available locally and cloud).  

    Thanks

    JD

  • I am struggling. I luckily bought two launchpads and I'm still banging my head.

    I can't get PA16 (The user button that's on the launchpad) to trigger a "wakeup"

    I just want to turn on an LED and then deep sleep when the button is pressed again. I got the power consumption down to 200na so that's a plus.

    I've used the sysconfig to replace PA1 in the sleep example, and PA1 is still triggering wake on the sketch below.

    I've also checked the generated dl_config files:

    /* Defines for CONFIG_0: GPIOA.16 with pinCMx 17 on package pin 12 */
    #define GPIO_INPUT_CONFIG_0_PIN (DL_GPIO_PIN_16)
    #define GPIO_INPUT_CONFIG_0_IOMUX (IOMUX_PINCM17)

    Ideally it just operates like a flashlight when hitting PA16.
    Here's my full sketch:

    #include "ti_msp_dl_config.h"
    
    int main(void)
    {
    volatile DL_SYSCTL_RESET_CAUSE rstCause;
    
    SYSCFG_DL_init();
    SYSCFG_DL_GPIO_init();
    
    rstCause = DL_SYSCTL_getResetCause();
    //This executes on 1st boot, after just the delay is running per amp meter? No Blinks
    for (int blink = 0; blink < 30; blink++)
    {
    DL_GPIO_togglePins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
    delay_cycles(3000000);
    }
    
    if (DL_SYSCTL_RESET_CAUSE_BOR_WAKE_FROM_SHUTDOWN == rstCause)
    {
    /* Release IO after Shutdown before initializing any peripherals */
    DL_SYSCTL_releaseShutdownIO();
    
    for (int blink = 0; blink < 10; blink++)
    {
    DL_GPIO_togglePins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
    delay_cycles(6000000);
    }
    }
    DL_SYSCTL_setPowerPolicySHUTDOWN();
    while (1)
    {
    __WFI(); /* Enter selected power policy */
    }
    }
  • Hey Derek,

    So I think the issue is that on these particular MSPM0C1103/MSPM0C1104 don't actually have any Wake-up capable GPIO.  The only way for these devices to wake from Shutdown is via nRST or via SWD debugger.  PA16 can not wake from shutdown.  

    You can try using Standby0 instead which would be ~5uA, or you can use the nRST button to reset/wake the MSPM0.  Your code would differentiate between the reset cause being sourced from either a BOR reset or a nRST.

    As for the Launchpad you say is locked, as long as you were not intentionally erasing/configuring NONMAIN then you should be able to recover it via a Factory reset. NONMAIN controls all debug security and access settings, and does have the feature of completely locking down the device forever, so if you are configuring it then you do have to be extra cautious.  (and I would recommend having some backup units on hand just in case.)  

    Hope this helps.

    JD

  • Also, There are future devices coming for the M0Cxx family that will have more GPIOs and some of those GPIO will be shutdown wake-up capable.

    Thanks,

    JD   

  • Thanks JD, that was helpful. When it says SWD as the second wake option, I'm assuming I can't use SWDIO or SWCLK pins to act as a button interupt?

    The whole reason we were considering TI was the packaging options on these new chips is smaller than what we can get with AVR at the moment.

  • Hey Derek,

    To wake the MCU from shutdown you'd have to send actually SWD commands to the DebugSS.  If that's not what you are asking and you just want to use those pins as GPIO, it is possible to disable SWD and then re-use those pins as GPIO (they just don't have the wake-up logic attached to them.)

    Do you have to use shutdown for you application?   Will waking via the nRST button work for you?

    Thanks,

    JD