It seems to be a bug in the driver that this setting is required at all (The driver sets the Product ID to a fixed value of 0x0079, then overwrites it with the mandatory registry setting idProduct). The idProduct setting instructs the Windows 10 PC to load a different driver - “Palm Treo Modem”.The DeviceArrayIndex actually changes the behavior of the driver.However, I found another setting which could work: This was expected, as the subclass defines the CDC control model (0x02 = Abstract Control Model, 0xff = vendor specific control model). show originalĭear modified the driver to test changing the Interface Class / Subclass to 0x02 / 0x02, and it didn’t work. ServiceName="Microsoft USB Serial Driver"ĬlassGuid=ĭriverPackageDisplayName=%DriverPackageDisplayName% inf file from someone else which worked with my T20: pololu/p-star-examples/blob/master/drivers/p-star-serial.inf Copyright (C) 2016 Pololu CorporationĭriverPackageDisplayName="P-Star Virtual COM Port Drivers" How to use or to reference the Usbser.sys driver from universal serial bus (USB) modem. I found this article from Microsoft which contained some clues but was not very specific: inf file for Windows to tell it which driver to load. Changing the registry on the T20 was the easy part, the hard part was creating a. It would need some adaptation, but looks doable.Hi actually worked. Quick search pointed me to something like this. What I would do would be to find a STM32 USB CDC lib with acceptable license an try to convert it to FPC. You could also read all the USB docs and try to do it yourself, but some 15 years ago when I checked such an effort for an AVR would be 6+ months so STM32 would probably be similar. If there is a USB lib for some STM32 GCC based compiler then you might want to try to translate headers and link to it, but on STM32 embedded target you are on uncharted territory. It is not a simple copy of generated asm for a single function. What would be the simplest way to get this to work? I'm going to try to generate the CubeMX project and see if I can get the IDE to compile it to assembly, and import that, but that will still be very time-consuming.Ĭhances for incorporating generated asm and making it work properly with your pascal code are very slim, and even worse tied to a specific MCU. Especially because the ST Virtual COM Port Driver has to recognize and understand it. Ok, let me put it like this: a quarter of the Reference Manual for the STM32F401 is about the USB. Well, after generating and translating the CubeMX code that configures the clock sources. I bought some new, supported devices and when they finally arrived, I could start programming them. But I would have to make my own for the devices I had. The FPU should work if you fill in the right value, the startup code is there, and the supplied device files look like they are from before ST chopped them up and packaged them into LL and HAL chunks. Fortunately, all the register names and addresses are there. And while the larger controllers can have multiple banks of RAM and Flash (with different starting addresses), only continuous chunks seem to be supported. For starters, all the FPUs are defined as: "fputype:fpu_soft". Next up, as I knew what I needed, I looked closer at the free pascal / Lazarus interface. But getting the USB to work like this is far too complex. This does work, and the debugging is flawless. I hunted down, translated and added the configuration of the clock sources from the CubeMX project. When you create a project, it basically generates a single file with the startup code in assembly. I hated that, so I installed the Open Source STM32 development platform, which allows you to program to the bare metal. To enable the USB you have to use the HAL. This generates a project with a lot of source files with in total about 20 lines of C code to initialize the clock sources. And I am talking about the LL interface, the HAL one is a maze. h files, with either a HAL (the default) or a Low Level interface. At the start you have to run the STM32CubeMX tool, which generates the startup and initialization code. I installed the (brand new) official STM32 development platform. But Arduino isn't a real development platform, it's for light hobby usage only. I installed Arduino and the STM32 support, the devices I had were available and the simple program (flash the led) worked right away. I checked the device and cpu configuration files, and they look pretty good, but they're only available for the common STM32F controllers. I think I can build a bootable image with the embedded version as installed through fpcupdeluxe.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |