• AVR Freaks

Helpful ReplyHot!Dual Role USB Stack for Harmony?

Author
ProtoMahn
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/02/08 11:44:52
  • Location: 0
  • Status: offline
2017/06/15 11:44:56 (permalink)
0

Dual Role USB Stack for Harmony?

Is there a plan the implement a Dual Role USB stack for the Harmony Framework? If not - are there any suggestions for how to implement Dual Role functionality?
post edited by ProtoMahn - 2017/06/19 09:01:32
#1
Tez
Moderator
  • Total Posts : 480
  • Reward points : 0
  • Joined: 2006/10/04 11:09:05
  • Location: 0
  • Status: offline
Re: Dual Role USB Stack for Harmony? 2017/06/18 03:16:25 (permalink) ☄ Helpfulby ProtoMahn 2017/06/19 08:35:13
3 (1)
Indeed there are plans to add Dual Role Support. This will be coming within this year. What application are you looking to use this in? Which part are you planning to use?
 
The present USB stack will not support this readily. There are several implementation modifications required.
#2
ProtoMahn
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/02/08 11:44:52
  • Location: 0
  • Status: offline
Re: Dual Role USB Stack for Harmony? 2017/06/19 09:01:12 (permalink)
0
The project is a PIC32MZ EF platform.I am looking to use Host MSD and Device CDC, for data logging and boot loading with a flash drive, and PC serial communication.
 
In older MZ projects I've done this before by merging two Harmony projects together (one with Host stack and one with Device stack), but there were issues de-initializing one stack and switching to the other until I modded the stacks slightly (note this was around Harmony 1.04). I also never wrote the code to check the USBID pin to determine the role, and instead required user input to determine the USB functionality.
 
I'll have to plan on creating this myself again, but I'll keep my eyes open for Dual Role support in the near future.
 
 
 
 
#3
Tez
Moderator
  • Total Posts : 480
  • Reward points : 0
  • Joined: 2006/10/04 11:09:05
  • Location: 0
  • Status: offline
Re: Dual Role USB Stack for Harmony? 2017/07/02 05:44:16 (permalink)
0
Thank you for providing the details. The above use case will be possible with the planned dual role implementation.
 
The application will have to use the USB Host Enable and USB Host Disable functions to step in and step out of Host mode. The application will have to use USB_DEVICE_Attach and USB_DEVICE_Detach functions to step in and step out of Device mode. 
#4
pretl
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2010/04/29 01:40:48
  • Location: 0
  • Status: offline
Re: Dual Role USB Stack for Harmony? 2017/07/28 04:33:41 (permalink)
0
ProtoMahn
but there were issues de-initializing one stack and switching to the other until I modded the stacks slightly (note this was around Harmony 1.04). 

Would it be possible to provide further information regarding the issues you encountered? As I've to implement the role switch, it could help a lot.
 
Tez
Thank you for providing the details. The above use case will be possible with the planned dual role implementation.
 

Is the support for OTG also planned? Are there any previews available?
#5
Tez
Moderator
  • Total Posts : 480
  • Reward points : 0
  • Joined: 2006/10/04 11:09:05
  • Location: 0
  • Status: offline
Re: Dual Role USB Stack for Harmony? 2017/07/28 08:58:54 (permalink)
3 (1)
Dual Role Support is planned. OTG is not planned.
#6
photon209
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2019/01/17 08:59:24
  • Location: 0
  • Status: offline
Re: Dual Role USB Stack for Harmony? 2020/02/27 08:50:22 (permalink)
0
Has Dual Role been completed in Configurator 3 (3.4.1)?
Seems the Mode Selection for the High Speed Driver is only Host or Device.
I'm also attempting to do Host and Device.
#7
Jump to:
© 2020 APG vNext Commercial Version 4.5