2009-01-20 02:07 AM
2011-05-17 12:57 AM
Hi,
I am trying to setup a system where I use interrupts for the USB communication and UART but I have a problem, I can't use both at the same time ... Both work properly separated, once I try to use both it doesn't work anymore. I think it has to deal with the interrupt priority, because I still have the USB interrupt working once it has a higher priority (0) then the UART (2). Someone has an idea? Thanks. This is the initialization of both of them: UART:... SCU_APBPeriphClockConfig(__UART0, ENABLE); SCU_APBPeriphReset(__UART0,DISABLE); SetCNTR(0); SetISTR(0); SCU_AHBPeriphClockConfig(__USB48M,ENABLE); // UART Module // UART_InitStructure.UART_WordLength = UART_WordLength_8D; UART_InitStructure.UART_StopBits = UART_StopBits_1; UART_InitStructure.UART_Parity = UART_Parity_No ; UART_InitStructure.UART_BaudRate = 115200; UART_InitStructure.UART_HardwareFlowControl = UART_HardwareFlowControl_None; UART_InitStructure.UART_Mode = UART_Mode_Tx_Rx; UART_InitStructure.UART_FIFO = UART_FIFO_Disable; UART_DeInit(UART0); UART_Init(UART0, &UART_InitStructure); UART_ITConfig(UART0, UART_IT_Receive, ENABLE); VIC_Config(UART0_ITLine, VIC_IRQ, 2); VIC_ITCmd(UART0_ITLine, ENABLE); /* Enable the UART0: start sending the transmit FIFO content to the hyperterminal */ UART_Cmd(UART0, ENABLE); UART_ITConfig(UART0, UART_IT_Receive, ENABLE); UART_LoopBackConfig(UART0, DISABLE); USB: SCU_USBCLKConfig(SCU_USBCLK_EXT); // Enable USB clock // SCU_AHBPeriphClockConfig(__USB, ENABLE); SCU_AHBPeriphReset(__USB, DISABLE); // USB Initialization /* Enable and configure the priority of the USB_LP IRQ Channel*/ VIC_DeInit(); VIC_Config(USBLP_ITLine, VIC_IRQ, 0); VIC_ITCmd(USBLP_ITLine, ENABLE); /* USB initialization */ wInterrupt_Mask = IMR_MSK; SetCNTR(0x0003); Token_Event = 0; /* Flags of each endpoint interrupt */ pInformation = &Device_Info; pInformation->ControlState = 2; pProperty = &Device_Property; /* Initialize devices one by one */ pProperty->Init();2016-01-04 10:15 PM
hi,
im using the str912faw47 part number.iwant to use internal usb. can u pls send me the usb firmware library.Thanks & Regards,benarjee pasam.09951438009astra microwave products ltd.2016-01-31 10:24 AM
Seriously doubt anyone is going to call you. If you want phone support you'd need to call an ST sales office.
The STR9 is a rather dated product at this point, and not at all supported here on the forumhttp://www.st.com/web/en/catalog/tools/PF258060