Hello...
I have an MSP430FR2355 Development board....
If I import msp430fr235x_CS_03.c from resource explorer and run the code and monitor SMCLK on P1.0 I see 16MHz as expected. When I stop the debugger the clock continues....if I power the board down and up the clock comes back....ALL GOOD!
now if I load the following onto the board
SysClk_Handle_t sysClk;
#ifdef CLK_TEST
GPIO_RegDef_t *sm_a_clk_test = PORT1, *mclk_test = PORT3;
#endif
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
/*
* System Clock / ACLK Configuration
*/
sysClk.pSysClk = CLOCK;
sysClk.SysClk_Config.Clock_MCLK = MCLK_16MHZ;
sysClk.SysClk_Config.FLL_Source = FLL_EXT_XTL;
sysClk.SysClk_Config.Clock_SMCLKDiv = SMCLK_DIVIDE1;
init_Clock(&sysClk);
#ifdef CLK_TEST
sm_a_clk_test->DIR |= BIT1 | BIT0;
sm_a_clk_test->SEL[1] |= BIT1 | BIT0;
mclk_test->DIR |= BIT0;
mclk_test->SEL[0] |= BIT0;
#endif
while(1);
}
...and hit play the clock comes up as expected to 16MHz, HOWEVER when I stop the debugger the clock flatlines and stops....If I repower the board the clock never comes up again.
Now the interesting piece....If I reflash it with the code that doesn't work the clock NEVER comes up...I first have to reflash it with msp430fr235x_CS_03.c AND RUN it. If I do this then reload my code and run I see the clock.
What is this telling me???? Is it property settings on my project???? Doesn't seem to be code because a re-flash with the so called bad code should allow the clock to show up when I run it without the need to reflash it with the demo code???
Any and all help here would be nice as I don't know what to think
Thanks
Steve

