Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update USBGadgetPin and add appropriate boot messages. #674

Merged
merged 3 commits into from
Jul 13, 2024

Conversation

diyelectromusic
Copy link
Contributor

As discussed here: #669

Kevin

@probonopd
Copy link
Owner

Thanks @diyelectromusic.
Build for testing:
MiniDexed_2024-07-10-acc9e26

@blixabloxa could you please test this as well?

Let me know when you think it's ready to merge. Thanks!

Copy link

Build for testing:
MiniDexed_2024-07-11-1d37225
Use at your own risk.

Repository owner deleted a comment from github-actions bot Jul 12, 2024
@blixabloxa
Copy link

Hi All,

I've performed some tests on the test build (MiniDexed_2024-07-10-acc9e26), and the TL;DR is PASS. Not my decision, but I am OK with this being merged.

The general operation of these options as I understand it -

  1. If USBGadget=0 (default), then USB Host Mode is enabled no matter what you have set for USBGadgetPin, or whether the GPIO pin you have configured for USBGadgetPin is grounded or not (set LOW or HIGH).
  2. If USBGadget=1 and USBGadgetPin=0, then USB Gadget Mode is enabled. USB Gadget pin operation is not enabled, no GPIO pins are configured for USB Gadget Mode.
  3. If USBGadget=1 and USBGadgetPin=x, then USB gadget Mode is enabled with USB Gadget pin operation enabled on GPIOx. Pulling GPIOx to GND will enable USB Gadget Mode. Leaving GPIOx HIGH will enable USB Host Mode.

I think that's the way it has been designed to work by Kevin - let me know if I am mistaken.

My test set-up is a RPi 3A+, with a jumper between GPIO 26 and GND (physical pin 37 and pin 30). I used a laptop with Waveform and Abelton Lite DAWs to confirm USB Gadget Mode successful operation. Disconnecting or connecting the jumper between GPIO26 and GND after initial boot-up didn't change the USB Gadget Mode state of the Minidexed, i.e. it continued to operate as it was configured at boot time.

Test 1 -

 USBGadget = 0
 USBGadgetPin = 0 or 26
  • Jumper ON or OFF
  • Default standard USB Host Mode operation.
  • Minidexed in USB Host mode is not seen by the DAW.
  • Works normally with a with passive USB controller.

Test 2 -

USBGadget = 1
USBGadgetPin = 0
  • Jumper ON or OFF
  • USB Gadget Mode operation, but USB Gadget pin operation is not enabled.
  • Minidexed is seen in both DAWs and operates in Gadget Mode.
  • Changing jumper does nothing as expected.

Test 3 -

USBGadget = 1
USBGadgetPin = 26
  • Jumper ON
  • USB Gadget Mode operation with USB Gadget pin operation enabled.
  • Minidexed is seen in both DAWs and operates in Gadget Mode.
  • Jumper connecting GPIO 26 and GND is ON - GPIO26 is LOW.

Test 4 -

USBGadget = 1
USBGadgetPin = 26
  • Jumper OFF
  • USB Host Mode operation with USB Gadget pin operation enabled.
  • Minidexed in USB Host mode is not seen by the DAW.
  • Jumper connecting GPIO 26 and GND is OFF - GPIO26 is HIGH.
  • Works normally with a with passive USB controller.

Thanks again for creating this fantastic project, and for applying this useful user enhancement.

Let me know if you want me to test some other scenarios.

Enzo

@probonopd
Copy link
Owner

Thanks Enzo for your systematic tests. Will merge as soon as Kevin confirms it is ready to merge.

@diyelectromusic
Copy link
Contributor Author

That pretty much describe how I was hoping it would work - many thanks for taking the time to verify it for us.

So yes, if people are happy with that behaviour, I'm good to go :)

I'll get on an update the wiki to try to capture the above!

Kevin

@probonopd probonopd merged commit 3b033db into probonopd:main Jul 13, 2024
1 check passed
@probonopd
Copy link
Owner

probonopd commented Jul 13, 2024

Thank you very much @diyelectromusic. If I remember correctly, I had edited 2 pages in the wiki regarding USB Gadget mode, so be sure to catch it in both places.

@diyelectromusic diyelectromusic deleted the USBGadgetPin branch July 13, 2024 17:47
@diyelectromusic
Copy link
Contributor Author

Wiki now updated. Have a read and see if that makes sense!

Kevin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants