Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 227401

Forum post: RE: MSP432P401R: Using JTAG to determine its in debug mode or production mode.

$
0
0
Dear Seong: I am using TI RTOS, in config I put the PJ.4 inside it GPIO_PinConfig gpioPinConfigs[] = { ..... GPIOMSP432_PJ_4 | GPIO_CFG_IN_PD | GPIO_CFG_IN_INT_RISING, } ,also in typedef enum MSP_EXP432P401R_GPIOName { .... MSP_EXP432P401R_GPIO_GROUND_MODE, } and void initGPIO(void) { PJDIR |= BIT4; PJIN &=~(BIT4); PJSEL0 &=~ BIT4; GPIO_init(); } and in my main task, I have put this conditions do { if (ground_mode_counter < 10){ ground_mode_counter++; GPIO_toggle(Board_GPIO_LED3_EPS); System_printf("TDI Status_1 : %i\n", GPIO_read(Board_GPIO_GROUND_MODE)); System_flush(); if (GPIO_read(Board_GPIO_GROUND_MODE) == 1){ System_printf("TDI Status_2 : %i\n", GPIO_read(Board_GPIO_GROUND_MODE)); System_flush(); GROUND_MODE = TRUE; GPIO_toggle(Board_GPIO_LED2_TTC); GROUND_MODE_CHECK = FALSE; } counting(1); }else{ GROUND_MODE_CHECK = FALSE; } }while(GROUND_MODE_CHECK); Now I can get TDI High/Low Status, But switch to SWO mode to program the MCU. My Best Anson

Viewing all articles
Browse latest Browse all 227401

Latest Images

Trending Articles



Latest Images