[DONE] DualCDC associate new SerialUSBDriver

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by russian »

I will now try to port the new testhal to 2.6 but I would only be able to try it once I am back from vacations
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by russian »

I've back-ported this to 2.6, it compiles but I have not yet tried it - still need to slice a USB cable :(

https://svn.code.sf.net/p/rusefi/code/branches/dual_cdc/USB_CDC_IAD/
chradev
Posts: 48
Joined: Sun Apr 28, 2013 6:52 am

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by chradev »

Hi to All,

I have just tested https://svn.code.sf.net/p/rusefi/code/branches/dual_cdc/USB_CDC_IAD/ with ChibiOS ver. 2.6.7 and ChibiStudio Preview 7 on Windows 7.
Successfully build and run on ST_STM32F429I_DISCOVERY (USBD2), ST_STM32F4_OLIMEX_STM32_E407 (USBD2), OLIMEX_STM32_H103E (with stm32f103ret and USBD1).
Successfully build but not run on ST_STM32F4_DISCOVERY (USBD1 - 4 ep), OLIMEX_STM32_P103 (with stm32f103ret and USBD1 ?).
I have added serial driver on SD2 and run shells on all connectors (2 x USB Serial and a true Serial).
The test was done against Windows 7 using included in the project driver.

I have observed strange behavior in case of stm32f4 running intensive activities on botch USB serial connectors.
At command write stream via SDU1 blocks at tests 11.x running on SDU2.
In case of stm32f1 the output become slow but not blocks at that moments.

Regards
Chris
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by Giovanni »

Hi,

Are you running two "test" commands at the same time? the test suite is not designed for that, most data is static.

Giovanni
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by russian »

chradev wrote:Successfully build but not run on ST_STM32F4_DISCOVERY (USBD1 - 4 ep)


USBD1 would be STM32_OTG1 which would be OTG_FS? Is that because of viewtopic.php?f=2&t=1118&start=20#p19207?

With all the boards you've tried, do they all have USB components soldered at the pins being tested? I've tried connecting USB wire directly to PB13/PB14/PB15 of my stm32f4discovery but it did not work.
chradev
Posts: 48
Joined: Sun Apr 28, 2013 6:52 am

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by chradev »

chradev wrote:Successfully build but not run on F4_DISCOVERY (USBD1 - 4 ep)

It cannot work (2nd CDC) because OTG FS (USBD1) on stm32f4 support up to 4 endpoint while Dual CDC application needs of 6.
It run successfully on 429I_DISCOVERY and OLIMEX_STM32_E407 because OTG HS (USBD2) is wired and support up to 6 endpoints.

russian wrote:USBD1 would be STM32_OTG1 which would be OTG_FS? Is that because of viewtopic.php?f=2&t=1118&start=20#p19207?

Yes that is the reason for not working on F4_DISCOVERY OTG FS (USBD1) port.

russian wrote:With all the boards you've tried, do they all have USB components soldered at the pins being tested? I've tried connecting USB wire directly to PB13/PB14/PB15 of my stm32f4discovery but it did not work.

Yes all the boards I have tried has USB components soldered by the board manufactures. For connecting USB via PB13/PB14/PB15 on stm32f4discovery you have to wire them in appropriate schematic.
The easiest way is to wire as in https://www.olimex.com/Products/ARM/ST/STM32-E407/resources/STM32-E407_sch.pdf using OTG USB connector, all PB12...15 pins and a few passive components.
Not sure but PA8 and PF11 may also be needed. You can also see https://www.olimex.com/Products/ARM/ST/STM32-H405/resources/STM32-H405_sch.pdf as example for USB device only schematic.

Regards
Chris
chradev
Posts: 48
Joined: Sun Apr 28, 2013 6:52 am

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by chradev »

Giovanni wrote:Hi,

Are you running two "test" commands at the same time? the test suite is not designed for that, most data is static.

Giovanni


Yes I saw it but once I run it by mistake and first command become blocked and the shell was restored by board reset. Second one finished and the shell was responsive.

BTW Giovanni, could you take a look on my recent post http://forum.chibios.org/phpbb/viewtopic.php?f=8&t=1300#p19496 published in a very old but related thread.

Regards
Chris
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by Giovanni »

I already saw that but cannot help, you should contact the author.

Giovanni
chradev
Posts: 48
Joined: Sun Apr 28, 2013 6:52 am

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by chradev »

Giovanni wrote:I already saw that but cannot help, you should contact the author.

Giovanni


I will continue trying to connect.

Do you have any plans to add posix layer in ChibiOS?
Do you know other project in this direction?

Regards
Chris
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [DONE] DualCDC associate new SerialUSBDriver

Post by Giovanni »

chradev wrote:Do you have any plans to add posix layer in ChibiOS?
Do you know other project in this direction?


The API is pretty close but there are no immediate plans.

Giovanni
Post Reply