Dear All
I use keil µVision V5.10.0.2 and try the blinkey examples of mdk5-getting-started.pdf manual with success on my own HW, but in the USB HID Device example nothing works.
I trace so many point of my HW and SW, and at the last, finding that USBD_Initialize(0) & USBD_Connect(0) functions not working.
Searching for definitions of both to debug, find that they defined as extern in rl_usb.h but there is functions in nowhere (there is other functions which also defined like 2 above as extern with no true functions).
did anyone knows where is the true definition of such functions ? or which header files contain the exact functions to including ?
With Best Regards Khodadad Namiri
Implementations of functions shouldn't be in header files (unless in some situations inlined functions).
Implementations are expected to be in *.c files.
And a project need not contain the source code for the functions, in case the project instead links with already compiled object files or libraries containing one or more object files.
so many thanks for you reply!
Therefore you say it does not need to have any *.c or *.h files to contain the functions definition?
So why my test does not responding ?
I debug the prg and use step through the functions which should jump in to some assembly code as the steps to run inside the functions as expected , but it jumps over, and go to the next C statements.
I do test so many examples for USB but all failed and I do not know why ?!? could you please help me?
(I use STM32F103VB)
Include files should be used to hold prototype/parameter information, so the compiler can generate and syntax check calls to those functions, while the body code is within .c or .s, or more abstractly in object and libraries.
Has your hardware been validated with USB operation, is it some commercial board? Could you try using ST provided USB firmware examples, and on boards with known functional USB implementations?/
You are obviously missing the USB library which contains all USB functionality and it is a part of Middleware Package.
Dear Pier
Sorry for long delay, I were trying to find the problem on my own, and fortunately find that the pullup 1.5KOhm resistor does not drew up to vcc via GPIOA P8 pin(as my HW). I connect directly the resistor to VCC and All problems solved. but one important Q remains. Why the Pullup does not drew up to VCC via MC output ports? (I test both ST and keil examples with desired changes and also write my own sample code also)
in RTE_Device.h(MDK ARM V5.10) there is definition of "USB Device FULL-speed" which can configure the pullup pin assignment but there's no effect in the pin (regardless of any pin you specify). is there any reason to prevent the right function, or is it a bug, or maybe I made misunderstood? should I write some code to do the job myself?
with best regards