Part Number: MSP430FR2311
Tool/software: Code Composer Studio
Hi everyone,
I have a simple question about my MSP430FR2311 Devkit. Here is my code:
#include <msp430.h>
#include <driverlib.h>
unsigned char i = 0;
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1DIR |= BIT0 | BIT1 | BIT2;
PM5CTL0 &= ~LOCKLPM5;
P1OUT |= BIT1 | BIT2;
for(i = 0; i<10; i++)
{
P1OUT &= ~BIT0;
__delay_cycles(50000);
P1OUT |= BIT0;
__delay_cycles(50000);
}
}
I checked the start-up time of the MCU by measuring the time between power on and rising of P1.1 and P1.2.
It is 1.14ms WITH the for-loop and more than 2ms WITHOUT the for-loop. When I put more code (no mather what) below the for-loop, this time gets even higher.
This does no sense to me because this code is after the pin toggling... Is there something I have forgot or can anyone explain my that behaviour? I can post some pictures of my measurements if needed.
Thank you very much!
Regards,
Manuel