2009-06-08 09:31 PM
Has anyone tried the stm32f102 and got usb working? Can't enumerate.
2011-05-17 04:14 AM
I am using the stm32f102c8 processor. Iv got all the hardware I am using apart from the USB, which I had running fine on the stm32f103.
If I look at the USB d+ pin it is constantly held high, and I don't see any data what so ever appear. The d- pin remains low. Iv checked the clock speed is running at 48MHz by outputing it the the PA8 pin. (I have 8 MHz xtal, PLL x6 = 48. and USB RCC is set to DIV1. All that happens is the code gets stuck in while ( pInformation->Current_Configuration == 0 ) and UNKNOWN device appears in the windows device manager. I have tried everything, iv altered the stack and heap sizes, I am using the USB dev kit library v1.00. The USB interrupt does fire when first powering on. When i use the debugger on the stm32f103 the USB_Istr() routine runs correctly and i can reach breakpoints at this point in the code (where *** = breakpoint) if (wIstr & ISTR_SOF & wInterrupt_Mask) { *** _SetISTR((u16)CLR_SOF); *** bIntPackSOF++; #ifdef SOF_CALLBACK SOF_Callback(); #endif } on the STM32f103 this occurs when WINST = 0x1b00 && int mask = 8600 on the STM32f102 these breakpoints never occur. In my HW_Config.c file on the stm32f103 I have not had to configure the gpio pins to alternate function or anything like that. Should I be configuring the USB pins at all? I would be very appreciative to hear of any suggestions you may have. Regards Dan2011-05-17 04:14 AM
An update:
If I look on the scope I see the lines being pulled low and high, this stops after about a second and then windows reports unrecognised device, the exact same software works perfectly on the STM32F103 but not the 102?? Any ideas?