6410的otg寄存器如何操作?
怎么关闭6410的otg功能,如何写寄存器?
static void InitializeOTGCLK(void)
{
volatile S3C6410_SYSCON_REG *pSysConReg = (S3C6410_SYSCON_REG *)OALPAtoVA(S3C6410_BASE_REG_PA_SYSCON, FALSE);
volatile OTG_PHY_REG *pOtgPhyReg = (OTG_PHY_REG *)OALPAtoVA(S3C6410_BASE_REG_PA_USBOTG_PHY, FALSE);
pSysConReg->HCLK_GATE |= (1<<20);
pSysConReg->OTHERS |= (1<<16);
pOtgPhyReg->OPHYPWR = 0x0; // OTG block, & Analog bock in PHY2.0 power up, normal operation
//pOtgPhyReg->OPHYCLK = 0x20; // Externel clock/oscillator, 48MHz reference clock for PLL
pOtgPhyReg->OPHYCLK = 0x0; // External crystal, 48MHz reference clock for PLL
pOtgPhyReg->ORSTCON = 0x1;
Delay(100);
pOtgPhyReg->ORSTCON = 0x0;
Delay(100); //10000
pSysConReg->HCLK_GATE &= ~(1<<20);
}
上面是初始化,那怎么关闭呢?
[解决办法]
pSysConReg->HCLK_GATE &= ~(1<<20); 这个不是关闭了吗
[解决办法]