Hello
I trying to set up a USB HID STM32F103C8 board. Use MicroC ARM 4.9.0 and TOP's MED18.
I use the example of Mikroelektronika Help site with USBdsc.c generated file Аfter compilation
PC says "USB Device not Recognized".
SYSCLK is correct. A8 PIN have 36MHz. Waveforms of USB D + and D- look good.
USB communication with other project works well.
Is it possible to receive compiled BIN file from another microC ARM with real license .
Or working project MikroC ARM with this processor and usb HID
Attach generated BIN and HEX file.
Code is here:
//void USB1Interrupt() {
// USB_Interrupt_Proc();
//}
unsigned long int i = 0;
char cnt;
char kk;
char readbuff[64];
char writebuff[64];
void main() {
GPIO_Config(&GPIOA_BASE, _GPIO_PINMASK_8, (_GPIO_CFG_MODE_ALT_FUNCTION | _GPIO_CFG_SPEED_50MHZ | _GPIO_CFG_OTYPE_PP)); //Set PA8 as a high speed digital output
HID_Enable(&readbuff,&writebuff);
while(1){
USB_Polling_Proc(); // Call this routine periodically
kk =HID_Read();
if(kk != 0){
for(cnt=0;cnt<64;cnt++);
writebuff[cnt]=readbuff[cnt];
HID_Write(&writebuff,64);
}
}
}
STM32CubeMX The configuration is correct
Settings configuration file of the project is as STM32CubeMX .