main()
{
//int i = 0;
CSL_init();
/*设置系统的运行速度为144MHz*/
PLL_config(&myConfig);
*( volatile unsigned int*)0x6c00=0x0003; //EBSR
*( volatile unsigned int*)0x4403=0x003F; //EHPIGPIOEN
*( volatile unsigned int*)0x4404=0x003F; //EHPIGPIODIR
*( volatile unsigned int*)0x4405=0x0000; //EHPIGPIODATA
while(1)
{ *(volatile unsigned int*)0x4405=0x003F;
delay();
*(volatile unsigned int*)0x4405=0x0; delay();
}}
程序如让所示,编译连接下载正常,寄存器的值也正确,但A13至A8没有相应的输出。请问是哪里出现了问题,是不是哪里设置没有考虑到。求解释
Shine:
c55x的外设寄存器是映射到片上IO空间, 所以在C语言中, 访问的时候要加ioport关键字. 如定义成*( volatile ioport unsigned int*)0x6c00=0x0003;
Shine:
回复 xiaolv peng:
你查看的是这些寄存器在IO空间的地址吗?