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

Try USBGadgetPin #670

Merged
merged 4 commits into from
Jul 5, 2024
Merged

Try USBGadgetPin #670

merged 4 commits into from
Jul 5, 2024

Conversation

probonopd
Copy link
Owner

@probonopd probonopd commented Jun 29, 2024

Allow for

USBGadget=0  ; Default to 0 (not in gadget mode)
USBGadgetPin=26  ; Default GPIO pin 26

as per #669:

If either USBGadget is set to 1 or USBGadgetPin is pulled down, then we enable gadget mode.

Copy link

github-actions bot commented Jun 29, 2024

Download the artifacts for this pull request:

@probonopd
Copy link
Owner Author

@blixabloxa would appreciate if you could test to see whether it works for you. Thanks!

@blixabloxa
Copy link

Hi probonopd,

I have a testing update.

I have tried to get this to work but I am not having success.

I have a RPi 3 A+ and have loaded the test build above, also adding the USBGadget and the USBGadgetPIN lines to my minidexed.ini file (I left it at the default GPIO 26)

Connecting GPIO 26 (physical pin 37) to Ground (physical pin 30) makes no difference at all. Changing the USBGadget setting from 0 to 1 works as expected.

Any advice on how to proceed, or do you want me to try something else?

Thanks,

Enzo

@blixabloxa
Copy link

Just had a look at the code. Not sure if it is an error, but the line to set USB Gadget mode to "0" is duplicated at line 40 and 49 - see image attached. Is this correct, or should line 49 be removed?
Screenshot from 2024-07-02 23-34-12

@probonopd
Copy link
Owner Author

Thanks for investigating and you are spot on @blixabloxa.
New build for testing should be available soon.

@probonopd
Copy link
Owner Author

New build for testing:
MiniDexed_2024-07-02-af6dd22

@blixabloxa
Copy link

Hi probonopd,

Just tested the new test build (MiniDexed_2024-07-02-af6dd22) and it works.

Test 1 - USBGadget=0 and USBGadgetPin not connected to GND - Pass : USB Gadget mode not enabled.
Test 2 - USBGadget=0 and USBGadgetPin connected to GND - Pass: USB Gadget mode enabled.
Test 3 - USBGadget=1 and USBGadgetPin not connected to GND - Pass : USB Gadget mode enabled.
Test 4 - USBGadget=1 and USBGadgetPin connected to GND - Pass: USB Gadget mode enabled.

Thanks for this. I will find it useful for when I build the hardware to go with it.

Let me know if you want me to test more scenarios related to this.

Regards,
Enzo

@probonopd
Copy link
Owner Author

Thanks for testing and for confirming @blixabloxa.

@probonopd probonopd merged commit 75e82ca into main Jul 5, 2024
1 check passed
@probonopd probonopd deleted the probonopd-try-USBGadgetPin branch July 5, 2024 17:02
@probonopd probonopd restored the probonopd-try-USBGadgetPin branch July 5, 2024 21:54
probonopd added a commit that referenced this pull request Jul 5, 2024
@probonopd probonopd mentioned this pull request Jul 5, 2024
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.

2 participants