Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


USB CDC Host demo (FS or HS) STM32F7 Discovery

So just now I realized that the FTDI chip does not act like CDC device...
Thats why it doesnt work right now.

I had notice you had finished that the F7 aUSB act linke an USB_CDC VSP. Well, a s far as i am now, my interface support code does not running., yet. The code attempt to connect as a High Speed Device and the pc response that this could not start becaue a driver is missing (code 28 error in the device Manager) .
I am interessting in your solution, generated by CubeMX and i guess, your VSP handler. In the code i had previously worked and connect, i am able to send a string to the pc but i cound not found any receiver routine.

Would you share your code ????
Juppeck


I had done the work around the CDC-USB issues i reported and asked before. The virtual serial port firmware runs as expected now and does not need any serial driver support installation for windows 10 x64.
I am impressed how many answers where posted around this issue. It seems none other has got this before. Well, i will save my solution an the experiences aroud the cubeMX generated gerneic code too.

Hi.

I am interested in your findings and solutions.
Would you share your code?

Thanks.

Hi,

Yes, would be definitely interesting.

Julien


The CDC support realized with HAL instead the obsolete and unavailable support of stdlib in STM32F7 and newer. My solution don’t requires any thirdparty driver - just the regular CDC interface of Windows 10 is used. This was the advertizing block. In the mean time, i had selled the entire project to customer.
The main problem of the HAL USB.CDC support was the understanding of the callback routine. Different as is assumed, the HAL support routines works quite similar as a regular RS232 interface. You need to define a ring-buffer for rx and tx, a handler routine for outgoing and incomming data and a control handler who signalize in case of an received and the send request.
In addition, their is also a callback available who signalize the application if the usb plug is removed or plugged in.
I had used this as a trigger to start an rtos thread to support the routines for rx and tx.
In several weeks i had attempt to find a vaild example or a more detaild description about the HAL support of the CDC class, i was unsuccessful.
The older stdlib handling of cdc that regulary used by the F1,3,4 Series, is quite different and not helpful to solve. Similar the documentation of HAL. This is more a quick reference as a documentation and also unhelpfully. A good way to understand how the IF is required to be programmed is watching the source code.

I wish you good luck to solve.


Well, i had found an example for an USB-CDC HAL based upon STm32F746 Disco board. This project is more complex, but i assume that you know how the USB-Support routines needs to be handled.
you need to download the “STM32_USB_Device_Library” sources and enable the HAL support for the USB.
Both are available by CubeMX and could be preconfigured for just a test. The attached File SRC.ZIP are the main fsource files that requires the both source codes from st. It uses the HS-USB port of the STM32F7 Disco board.
I assume this could be used on the other F7 Nucleos too, but i had not done them as now.
The packed source files are snipps - this is not an entire project. This shoudl explain how the interface needs to be handled.
If everythings is working fine, a COM device must be available in teh device manager of Windows 10, without installing a driver. The speed setting of the PC program, who open the virtual serial port, is unimportant - i usualy uses 115KBit/s.
I had added some comments in german to explain the functionality. Well, just use goolge xlator.
Generaly, you need to declare a routines for HS or FS USB. You need to have an ringbuffer for incomming and outgoing characters. The USB port handles the port by using an IRQ and their ISR.
The routes working proper in a freeRTOS environment too.

MX_USB_DEVICE_Init(); // init USB CDC Device 0)
{
sprintf (cp, “Got frame of length %d: %s “, len, buf);
GUI_DispStringAt (cp, 0, 230); // empfangene Zeichenkette ausgeben
}
}
osDelay(10);
}
}

.................................
And this is a sender call from STM to the PC - not magic

Len = strlen(uhrzeit);
CDC_Transmit_FS ( (uint8_t *) uhrzeit, Len); //! USB2.0 480Mbit



I hope this will helps you to solve your issues.