2014-01-30 06:20 AM
Hello everybody!
I've a working vcp driver for stm32f4discovery board(stm32f407vg). Use the standard st usb library. This is working well. If I change the device with an stm32f415 mikrocontroller, the code is running, but at the device manager I don't see the com port. Is anybody have an idea what is the problem? The usb pins are the same. Thanks #usb-vcp-stm322014-01-30 07:58 AM
No unknow or bad device, and the pc not do anything when i plug the board.
2014-01-30 08:09 AM
Sound like the USB on the mikroe Mini-M4 with stm32f415rg controller is not working then.
Does it have any demo software you can try?2014-01-30 08:13 AM
Yes I have an st-s example for vcp this is working.
2014-01-30 08:32 AM
''Yes I have an st-s example for vcp this is working.''
''I have a mikroe Mini-M4 with stm32f415rg controller..I change the project settings(clock config etc) for this board, compile, download. '' You will have to compare the differences between the 2 projects. You said that you have checked the Clock tree settings, USB peripheral settings and the IO port setting - they are the usual culprits.2014-01-31 12:18 AM
No working the code. The problem was I use VBUS_SENSING_ENABLED. I dont know why this define work with stm32f407 and not work with stm32f415.
2014-01-31 01:20 AM
Hi
''No working the code.'' I do not know what you mean by this. '' The problem was I use VBUS_SENSING_ENABLED.'' Does that mean you have it working now? ''I use VBUS_SENSING_ENABLED. I dont know why this define work with stm32f407 and not work with stm32f415.'' I am not 100% clear on it, I have not studied the Hardware design properly (yet). I believe the change made by the 'OTG' specification required a pull up on one of the data line, to signify either 'OTG compliance' or signify 'master/slave'. Since you changed from one board to another - the hardware design may have changed hence not needing the define on the new processor. Turning on/off VBUS_SENSING_ENABLED depends on what is implemented in the hardware design.2014-01-31 03:03 AM
no=now. Yes working well. I can communicate with pc. I will check the vbus sensing later, but I have no idea what is the problem with this.
2014-06-07 01:30 PM
hi
i have the same problem ... with the same boardwith the discovery board it works, with mini-m4 no wayi'm stuck with unknown device, probably some problem setting the PLLdoes someone have an example for system_stm32f4xx.c with 16MHz HSE?2014-06-08 05:15 AM
HSE_VALUE within the project, or stm32f4xx_conf.h must reflect the speed of the HSE clock, ie 16000000
The PLL settings in system_stm32f4xx.c must be changed, so the divider matches the MHZ of the clock....
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
//#define PLL_M 8 // 8 MHz HSE
#define PLL_M 16 // 16 MHz HSE
#define PLL_N 336
/* SYSCLK = PLL_VCO / PLL_P */
#define PLL_P 2 // 336/2 = 168 MHz
/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */
#define PLL_Q 7 // 336 / 7 = 48 MHz, must be 48 MHz for USB
...
2014-06-08 11:54 AM
hi clive1
thanks for your supportthere is something of strange in this boardit seems that wont work at 168MHzwhen I use your parameters the execution generates an exeption and the code doesn't run (not only the usb but the whole program)in the mikroe forum site I've found that their bootloader works at 120MHz so I changed the PLL and the prescalers according to this (with the help of cubemx) and now it workshere my settings:#define PLL_M 16#define PLL_N 240#define PLL_P 2#define PLL_Q 5120MHz could be ok for my applicationsI can try to go up; it could be useful to understand why this limitationsjust another question:I see that st has changed in their stdlib and now there is the new halis there a guide to upgrade a project from the old stdlib to the new hal?