dsp 有while(1)时printf不能输出,把while(1)去掉,可以输出,为什么 10
#include<csl.h>#include<csl_pll.h>#include<csl_chip.h>#include<csl_gpio.h>#include<st...
#include<csl.h>
#include<csl_pll.h>
#include<csl_chip.h>
#include<csl_gpio.h>
#include<stdio.h>
void delay()
{
Uint32 j = 0,k = 0;
for(j = 0;j<0x30;j++)
{
for(k= 0;k<0xffff;k++)
{}
}
}
PLL_Config My_Config = {
0,
1,
24,//pllmult
1 //div
};
void main(void)
{
CSL_init(); /* Init CSL */
PLL_config(&My_Config);
GPIO_RSET(IODIR,0XFF);//GPIO output
printf("hello!");
while(1)
{
GPIO_RSET(IODATA,0Xff);
delay();
GPIO_RSET(IODATA,0X00);// "1"
delay();
}
} 展开
#include<csl_pll.h>
#include<csl_chip.h>
#include<csl_gpio.h>
#include<stdio.h>
void delay()
{
Uint32 j = 0,k = 0;
for(j = 0;j<0x30;j++)
{
for(k= 0;k<0xffff;k++)
{}
}
}
PLL_Config My_Config = {
0,
1,
24,//pllmult
1 //div
};
void main(void)
{
CSL_init(); /* Init CSL */
PLL_config(&My_Config);
GPIO_RSET(IODIR,0XFF);//GPIO output
printf("hello!");
while(1)
{
GPIO_RSET(IODATA,0Xff);
delay();
GPIO_RSET(IODATA,0X00);// "1"
delay();
}
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询