|
RT,利用McBSP1跟EEPROM通信,初始化代码如下:
- //Init necessary regs
- //SPCR1:0101 1000 0000 0000
- OUTREG32(&pMcbsp1Regs->SPCR1,0x5800);
- //SPCR2:0010 0010 0000
- OUTREG32(&pMcbsp1Regs->SPCR2,0x220);
- //RCR1:1010 0000
- OUTREG32(&pMcbsp1Regs->RCR1,0xA0);
- //RCR2:0000 0001
- OUTREG32(&pMcbsp1Regs->RCR2,0x1);
- //XCR1:1010 0000
- OUTREG32(&pMcbsp1Regs->XCR1,0xA0);
- //XCR2:0000 0001
- OUTREG32(&pMcbsp1Regs->XCR2,0x1);
- //SRGR1:0001 0010 0010 1111
- OUTREG32(&pMcbsp1Regs->SRGR1,0x122F);
- //SRGR2:0010 0000 0000 0000
- OUTREG32(&pMcbsp1Regs->SRGR2,0x2000);
- //PCP:1010 0000 1100
- OUTREG32(&pMcbsp1Regs->PCR,0xA0C);
复制代码
循环发送数据,用示波器抓,发送引脚一直是高电平,clks和fsx是正常的,请问有没有高手做过啊???求助
|
|