The attached patch files contain board files and USB ULPI support for the WaveShare Open 407I-C dev board.
This ticket is in regards to http://forum.chibios.org/phpbb/viewtopic.php?f=2&t=930
Also, let me know if you need me to change anything in the patches. I couldn't find a reference document relating to how to submit patches, formatting or guidelines (other then the general C style guide).
Hello again, two more things...
1) I have a few more features incorporated into my branch and I will resubmit patch files.
2) If it is helpful, I would be happy to donate one of the 407I-C dev kits. Let me know if this would be helpful and we can discuss offline.
USB driver changes for ULPI
Demo code using the full speed USB interface
Demo code using the USB high speed ULPI USB3300 Phy
new patch files are attached to this ticket
Thanks for all the work on the driver, patches merged. I just made some style related changes and added the new options to usb_lld.h too.
Could you please verify everything is OK? I can't test it.
Hi, it's looking pretty good, but a couple minor merge issues. I think you may have grabbed the first set of patches rather then the second.
I've merged on my end and re-generated the relevant patches and attached them.
update regarding serial 2 pin conflicts with ULPI pins
updates to fix compileation error on USBD2 symbol not found if OTG2 is not enabled
The latest patches do not apply on trunk and I am having reports of
problems in the forum, reverting all changes until it is cleared. Right now I don't understand on which revision I have to apply each patch.
I'd expect a couple minor compilation errors if OTG2 had been disabled given that the first set of patches had been applied. Which forum posts are you referring to?
I've been alternating back and forth between using the full-speed on board phy and high speed off board ULPI phy and things are working correctly on my end. Perhaps there are additional differences between the code bases or something went awry in the merge?
I'm generating patches from git, which appears to be updated from an SVN repo.
I plan on doing continuing development with this board, creating more USB related demos, and doing additional work on Badgers mass storage driver. Perhaps I should be doing this in a branch on github? and you could merge in from my branch?
Hi Giovanni, I created a fork in github, https://github.com/dsigma/ChibiOS and committed and pushed the various USB changes. I'll make and push changes to this repo going forward.
Regarding the problems, if they were specific to USB, there were a number of changes to usb_lld.c that may be suspect. If the forum posts? were sufficiently detailed perhaps I could try to reproduce them?
The forum post was not much detailed, not enough to understand where the real problem was, I decided to revert because a lot of people rely on the repository code and I don't want to keep there something with an unknown problem somewhere.
About patches, when you are confident that the driver is ready then submit patches for the subversion trunk, if it does not apply there then I am unable to merge.
Hi Giovanni, I believe this was the post you were referring to: http://forum.chibios.org/phpbb/viewtopic.php?f=3&t=971
This error is that the 2nd set of patches addressed. It was a missing symbol due STM32_USB_USE_OTG2 being set to FALSE and how the #if's in usb_lld.c were written.
Both the full speed and high speed demos are working my repo, https://github.com/dsigma/ChibiOS.git
I have a number of things I want to add for demos and USB related features. Once I have all my changes in place I'll make a pull-request, in the mean time, if others want to play with the code it's available...
Will be re-evaluated post 2.6.0. Plese submit a single patch on the current code if possible.
Hi Giovanni, I've submitted a github pull request with my various changes incorporated into a single branch. I've had a number of people submit inquires to me regarding HS USB and MSD/Composite functionality and I'd like to get my changes merged upstream. Can you please take a look and let me know if you'd like me to change anything in the pull request?
I don't control the git repository so I don't have access to the pull requests.
The repository on github is a community-handled mirror of the official subversion repository. Could you please submit a patch applicable on the current trunk code?
Hi Giovanni, attached is a patch which contains changes to the OS and the demos to allow for high speed USB, USB Mass storage support and demos of composite USB devices. Please let me know if you have any questions or would like any changes made...
My, probably partial, list of wishes after the inspection:
- usb_lld.h does not define nor check all the options you added to mcuconf.h. Are all those new options really necessary? please consider limiting their number.
- usb_lld.c enables the GPIO clocks internally, this is already done in the PAL driver and violates the rule that device drivers only manage their own HW.
- 4 demos are too many.
- I don't want to add anymore code to the HAL because maintenance costs, put the mass storage code inside demos even if it makes sense to be in the HAL.
- Please use templates for new files.
- Check the code against the style guide: http://www.chibios.org/dokuwiki/doku.php?id=chibios:guides:style_guide
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.