I’m stuck with a problem. Started writing this post with hope anyone over web could suggest something.
I have Olimex STM32-P103 bord which has STM32F103RBT6 micro. I flashed Virtual com port DEMO code .hex file from the example code they provided. It could not install the driver on windows 7( shows failure message after searching). It’s because they provided driver for windows XP only. After 3 emails to Olimex support, they responded & provided support to make windows 7 driver. Now i have windows 7 driver working with their example code. However, This example uses old libraries and no FreeRTOS. This sample uses CBR_9600 baudrate. Also this code doesn’t support DFU mode because it is programmed in flash at base adress 0×08000000. Also, i prefer to implement my application using FreeRTOS .
I also have STEVAL-MKI062V2 iNEMO v2 with micro STM32F103RET7. ST provided Firmware project source for IAR Embedded workbench. It has USB virtual com port code with DFU support. I want to utilize this code to make STM32-P103 board communicate via virtual COM port with DFU support. I’m working with IAR EW+FreeRTOS+ST-LINK+WINDOWS 7.
The default boot mode for Olimex board is FLASH memory.
In adapting the iNEMO v2 code for Olimex board, i did the following.
For DFU support :
Created a project & configured it to suit medium density devices in Linker option config file. Olimex board user push_button configured to enter DFU mode. Compiled the iNEMO_DFU project code, flashed the iNEMO_DFU.hex in FLASH at base adress 0×08000000. Option byte also configured.
For USB Virtual Com Port application:
1. Created a project & configured it to suit medium density devices in Linker option config file. Also modified Startup_stm32f10xmd.s file to suit in FreeRTOS environment as below:
EXTERN __iar_program_start
EXTERN SystemInit
EXTERN vPortSVCHandler ; defined for FreeRTOS
EXTERN xPortPendSVHandler ; defined for FreeRTOS
EXTERN xPortSysTickHandler ; defined for FreeRTOS
PUBLIC __vector_table
2. Configured DISC, push button & status LED pin of Olimex board to suit iNEMO board DISCONNECT pin of USB & push button(sw2), status LED buttons.
3. I did not change any descriptors related to USB in the Virtual com port code of iNEMO.
When i DEBUG & see, the debugger stuck in the while loop shown in the code below. which means something is wrong in USB related things( i guess clock configuration & driver related). Any code wrote before the while loop works fine.
void inInitTask(void *pvParameters)
{
iNEMO_HW_Config(); //Configure the hardware for the iNEMO platform
while(bDeviceState != CONFIGURED); // THIS LOOP IS GOING INFINITE
iNEMO_Config(); // Initialize the iNEMO sensor platform
Timer_Config(); // Configures the timer 2 for frequency interrupts in Hz
}
If i do step by step debugging inside iNEMO_USB_Disconnect_Pin_Config() computer shows the message “Unknown Device” as shown in images.


If i don’t do step by step debug, it goes to that while loop & sits there, never comes out of that . If i reset the device, It is not running the code which i flashed starting from address 0×08003000.
i. I don’t understand why the device not running the application code when i reset the device. I’m saying this because the user LED is not glowing.
ii. I’m quite sure that the “Unknown Device” problem is related to clock configuration & driver. How do i configure the clock ?
How to use the driver inemo folder so that Olimex board can be recognized by computer.
Recently i found SystemInit( ) function differs from Olimex sample. SO replaced it with Clk_Init( ) from example code. No use, still it stuck in the while loop.