do i_time++;
while(i_time<ii);
} while (j_time<1000);
}
就以这个程序为例,当我执行Delay(4000)时i_time和j_time 的变化就不是按照我预期的,程序当然没有问题了。i_time和j_time根本就不是递增的,而且数值忒大,我单步执行,两步就跳出去了。天啊,它至少也得跳个N次吧。
/* uncomment the function(s) you want Code Composer Studio to execute
OnReset(int nErrorCode)
{
}
OnRestart(int nErrorCode)
{
}
OnPreFileLoaded()
{
}
OnFileLoaded(int nErrorCode, int bSymbolsOnly)
{
}
*/
menuitem \"Initialize Memory Map\";
/*----------------------- F2407 Memory Map -------------------------*/
/* */
/* The entire LF2407 address space (program, data, IO) is mapped */
/* as RAM with two exceptions. The on-chip flash is mapped as */
/* ROM and the following illegal/reserved sections are not */
/* mapped: */
/* */
/* Illegal/Rsvd Program Illegal/Rsvd Data Illegal/Rsvd IO */
/* -------------------- ----------------- --------------- */
/* None 0x0080 - 0x01ff None */
/* 0x0400 - 0x07ff */
/* 0x1000 - 0x6fff */
/*------------------------------------------------------------------*/
hotmenu F2407_Memory_Map()
{
int SCSR2 =*0x7019; /* System Control and Status Register 2 */
GEL_MapReset();
GEL_MapOn();
/* Check MPNMC value (SCSR2 bit 2) to determine map setting. */
if(SCSR2 & 4)
GEL_MapAdd(0x0000,0,0x8000,1,1); /* Ext prog memory */
else
GEL_MapAdd(0x0000,0,0x8000,1,0); /* On-chip flash memory */