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.

MSPM0G3507-Q1: MSPM0G3507-Q1

Other Parts Discussed in Thread: MSPM0G3507-Q1, CCSTUDIO, SYSCONFIG, UNIFLASH

art Number: MSPM0G3507-Q1

I'm using an LP-MSPM0G5307 evb.

I'm trying to turn on consecutive GPIOs with delays between them, and need help operating the ccstudio. The code is written and "DL_GPIO_clearPins" + "DL_GPIO_setPins" functions are used however pins aren't consistently rising to a logic "1". Looks like we might not have them configured as outputs and trying to do so using gpio_toggle_output.syscfg is confusing and I need help.

Code Used:

#include "ti_msp_dl_config.h"

/* This results in approximately 0.5s of delay assuming 32MHz CPU_CLK */
#define DELAY (16000000)

int main(void)
{
/* Power on GPIO, initialize pins as digital outputs */
SYSCFG_DL_init();

/* Default: LED1 and LED3 ON, LED2 OFF */
//DL_GPIO_clearPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_2_PIN);
//DL_GPIO_setPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN |
// GPIO_LEDS_USER_LED_3_PIN |
// GPIO_LEDS_USER_TEST_PIN);


DL_GPIO_clearPins(GPIOB,DL_GPIO_PIN_16);
delay_cycles(DELAY);
DL_GPIO_setPins(GPIOB,DL_GPIO_PIN_16);
delay_cycles(DELAY);

DL_GPIO_clearPins(GPIOB,DL_GPIO_PIN_15);
delay_cycles(DELAY);
DL_GPIO_setPins(GPIOB,DL_GPIO_PIN_15);
delay_cycles(DELAY);

DL_GPIO_clearPins(GPIOA,DL_GPIO_PIN_27);
delay_cycles(DELAY);
DL_GPIO_setPins(GPIOA,DL_GPIO_PIN_27);
delay_cycles(DELAY);

DL_GPIO_clearPins(GPIOA,DL_GPIO_PIN_26);
delay_cycles(DELAY);
DL_GPIO_setPins(GPIOA,DL_GPIO_PIN_26);
delay_cycles(DELAY);

// while (1) {
// /*
// * Call togglePins API to flip the current value of LEDs 1-3. This
// * API causes the corresponding HW bits to be flipped by the GPIO HW
// * without need for additional R-M-W cycles by the processor.
// */
// delay_cycles(DELAY);
// DL_GPIO_togglePins(GPIO_LEDS_PORT,
// GPIO_LEDS_USER_LED_1_PIN | GPIO_LEDS_USER_LED_2_PIN |
// GPIO_LEDS_USER_LED_3_PIN | GPIO_LEDS_USER_TEST_PIN);
// }
}

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/gpio_5F00_toggle_5F00_output.syscfg

  • Hi Eliyahu,

    Looking at your SysConfig file, I see that all your GPIOs are on Port B (PB).

    If you look at SysConfig there is a symbol on the top right <>

    From here you can click on the ti_msp_dl_config.c and ti_msp_dl_config.h files

    These are the generated files that sysconfig will create. The .h has #defines for pseudonyms to allow you to code using names that pertain to your application, rather than exact register names. 

    The .c file has the initialization functions, I typically look at the process flow for creating new instances of peripherals if I need to change configurations in real time. 

    For the GPIOs you need to initialize how you want the pins (in the SysConfig your 4 GPIOS (PB22, PB27, PB26, PB16) are initialized as Outputs. I believe you should see PB16 set, but PB15 is not initialized in your SysConfig and the Pin 26 and Pin 27 that are initialized are on PortB, not PortA.

    Regards,
    Luke

  • Hi. I read the reply, however this still isn't clear and mistaken. Can anyone assist us directly?

  • I've already checked these files (.h and .c).

    Just a few points to address the issue:

    1. Do we config. outputs using syscfg or as stated in latest reply through .c and .h? In the last reply we were asked to use syscfg however now the request is to immediately change .c and .h. Which one is it?

    2. I already did all this however a few things aren't clear:

       a. How to determine GPIO_PIN and corresponding IOMUX_PINCM? If for example we have DL_GPIO_PIN_22 paired up with IOMUX_PINCM50 - how did we know the number 50? How did we know it corresponds to GPIO 22? 

    3. We ARE configuring port A GPIOs and this is not true that we are configuring all our GPIOs on port B. Why is your assumption we're on port B?

    4. When I "look at SysConfig there is a symbol on the top right <>" (which I've already done and already saw...) why do I see 7 files pop up while you see 4?
        The files are:
        

  • Hi Luke, I am updating with the progress that was made today:

    Attached is the SysConfig file from config PIN26 under PORTA as an output and then trying to toggle it.

    The Toggling on port A isn't working, but on port B all pins function correctly.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/0118.gpio_5F00_toggle_5F00_output.syscfg

  • Hi Eyal and Eliyahu,

    Was this resolved offline with Dylan, or is this status still pending?

    Regards,

    Luke

  • Hi Luke, please close this thread-

    we took it personally via WebEx, this is still pending and there is a problem with Uniflash so not on the MSPM0 side.

    I'll update.