This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM6467实验LED驱动没点亮



SEED-DVS DM6467的评估板,CS3片选0x44000000开始的32M地址空间

CPLD要完成开关量制,上部分外设的逻辑控制等.展至CS3间,使用时需要CS3空间配置16bits步模式.

这个我已经配置了,代码如下:

 #define PINMUX *(unsigned int*)IO_ADDRESS(0x01c40000)

static int mycpld_init(void) {
int err = 0;
unsigned int *EMIFA_A2CR;

/*这里是将CS3片选空间(0x44000000)设置为了16bits异步模式*/
PINMUX &= 0xfffffff8;/*设置为EMIFA模式*/

EMIFA_A2CR = (unsigned int *)ioremap_nocache(0x20008014,4);/*取出片选3的异步配置寄存器的地址*/
*(volatile unsigned int *)EMIFA_A2CR = 0x3ffffffd;/*使用正常模式(禁用频闪模式),禁用等待,且选择16bits总线模式*/
iounmap(EMIFA_A2CR);

/*PINMUX0中配置,使能ATA*/
PINMUX|=0x1;//enable ata;
return err;
}

已知0x44000010这个地址上bit0~bit3分别控制led1~led4

并且led3和led4是自定义可编程的LED灯,LED1和LED2对应键盘输入板的LED

我现在要控制LED3和LED4亮灭,如下:

我现在很简单的在init函数中测试一下LED灯能否点亮,如下:

LED = (unsigned short*)ioremap_nocache(0x44000010, 4);
while(count > 0)
{
(*(volatile unsigned short*)LED)&= ~(1<<3);
msleep(1000);
(*(volatile unsigned short*)LED)&= ~(1<<2);
msleep(1000);
(*(volatile unsigned short*)LED)|= (1<<3);
msleep(1000);
(*(volatile unsigned short*)LED)|= (1<<2);
msleep(1000);
count--;
}
iounmap(LED);

可是驱动放在板子上LED3和LED4并没有反应,请问这是怎么回事?是不是那里配置还有问题?