Forum > Embedded - ARM

Getting a USB stack to work on STM32

(1/7) > >>

petex:
hello,
I have got the USB stack by Laksen (mentioned in a previous post on USB) compiled and running on the STM32 Bluepill.
From what I can see and trace, the code is working as intended and valid config packets are sent back to the host.

It is configured for a CDC USB class which is supposed to be supported by Windows 10 with a generic driver.

When I plug in, the device is recognised and added to the devices page. It defines a virtual com port, but there is an error 10. (device not started) which is pretty unhelpful. The port cannot be opened.

I have attached the relevant properties pages :-

petex:
Made some progress with this stack ....
I installed a virtual com driver from the ST microelectronics site. I also changed the VENDOR and PRODUCT codes in the device descriptor to match this driver. It has installed a virtual com port in Windows 10 with no errors this time. When i type stuff in the terminal to this com port I can see the data transfer using a USB monitor tool, but not got the data out at the STM32 end yet.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- devDesc: TUsbDeviceDescriptor = (   bLength: sizeof(TUsbDeviceDescriptor);   bDescriptorType: USB_DESC_TYPE_Device;   bcdUsb: $0200;   bDeviceClass: 0;   bDeviceSubClass: 0;   bDeviceProtocol: 0;   bMaxPacketSize: CDC_EP0_SIZE;   idVendor: $0483;   idProduct: $5740;   bcdDevice: $100;   iManufacturer: 1;   iProduct: 2;   iSerialNumber: 3;   bNumConfigurations: 1  

Laksen:
Try to check that it's not stuck in the UsbSend function

Can you show what transfers it's transmitting?

petex:
success, I have program looping back received data. Characters typed on terminal on windows are looped back ok.

The code is compiled with the MBR compiler toolset and incorporates the MBR framework for the setup and timer. The Laksen units are unchanged. The unit "stm32f103fw" has been altered to fit with the MBR framework. I have also altered the main program to change the configuration packets and to simplify somewhat.

Laksen:
Good to hear, what did you change to fix it?

Navigation

[0] Message Index

[#] Next page

Go to full version