Other Parts Discussed in Thread: AM3359
hello
every expecter
This is Tomiyama from Tokyo.
I want to use am3359 as a device,but I could not set active IRQ of usb0.
I could not recive IRQ from PC. And active IRQ alway UART2.
Which register should I set up?
These are I setup routine.
best regards
tomiyama
/* Usb Contral Module Enable */
IOREG32(SYS_BASE,SYS_CTRL_USB_WKUP_CTRL) =0x0001;
/* USB Control Module Enable */
IOREG32(PRCM0_BASE,PRC_CM_WKUP_REGS(0x4)) = 0x0002;
/* USB Control Module Soft Reset,reset in USBDCDCInit() */
//IOREG32(USBSS_BASE,0x1014) = 0xC0000009; /* USB0CTRL */
//
// Not configured initially.
//
g_bUSBConfigured = false;
//
//configures arm interrupt controller to generate raster interrupt
//
USBInterruptEnable();
//
//Initialize the Rx and TX Buffers
//
USBBufferInit((tUSBBuffer *)&g_sTxBuffer);
USBBufferInit((tUSBBuffer *)&g_sRxBuffer);
/* usb_ctrl0 */
IOREG32(SYS_BASE,SYS_CTRL_USB_CTRL(0)) = 0x3C06404;/*usb_ctrl0*/
IOREG32(SYS_BASE,SYS_CTRL_USB_CTRL(1)) = 0x3C05007;/*usb_ctrl1*/
IOREG32(PRCM0_BASE,0x1C) = 0x02; /* CM_PER_USB0_CLKCTRL */
IOREG32(PRCM0_BASE,0x70) = 0x02; /* CM_PER_UART2_CLKCTRL */
IOREG32(PRCM0_BASE,0xDC) = 0x02; /* CM_PER_L3_INSTR_CLKCTRL */
IOREG32(PRCM0_BASE,0xE0) = 0x02; /* CM_PER_L3_INSTR_CLKCTRL */
//IOREG32(0x44E00700,0x04) = 0x02; /* CM_MPU_MPU_CLKCTRL */
IOREG32(SYS_BASE,0x0A1C) = 0x0F; /* conf_<module>_<pin> */
IOREG32(USB0_BASE,0x0240) = 0x80028002; /* IRQFRAMEENABLE0 */
IOREG32(USB0_BASE,0x1074) = 0xC0000002; /* USB0CTRL */
IOREG32(USB0_BASE,0x1038) = 0xFFFFFFFF; /* IRQSET0 */
IOREG32(USB0_BASE,0x103C) = 0xFFFFFFFF; /* IRQSET1 */
IOREG32(USB0_BASE,0x1044) = 0x000003CF; /* IRQ ENABLE */
IOREG32(USB0_BASE,0x10E8) = 0x00000180; /* USB0 待ちモード */