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