Thanks for your quick reply !
Nothing changed with the "volatile" keyword.
Here is the code (sorry it was an attachment but it may not have passed) :
#include <msp430f5529.h>
int main ( void )
{
volatile unsigned long int i;
WDTCTL = WDTPW | WDTHOLD;
P1DIR = 1;
P1OUT = 0;
while(1)
{
for(i=0;i<5000;i++);
P1OUT = 1;
for(i=0;i<5000;i++);
P1OUT = 0;
}
return 0;
}
2010/8/23 Sergey A. Borshch <[email protected]>:
> On 23.08.2010 22:39, Frédéric Sureau wrote:
>> When removing the main loop ( while(1) ), the led is just flashing one
>> time very shortly independently from the delay duration.
> Show the code, please. Seems like you missed volatile keyword in delay cycle
> variable declaration
> and more effective optimizer removed all delay cycles away.
>
> --
> Regards,
> Sergey A. Borshch mailto: [email protected]
> SB ELDI ltd. Riga, Latvia
>
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users
> worldwide. Take advantage of special opportunities to increase revenue and
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>