wagiminator / CH552-USB-Knob

Rotary Encoder with NeoPixels and USB Interface
https://oshwlab.com/wagiminator/ch552e-usb-knob
Other
148 stars 12 forks source link

Help with CH552G and CH552E projects #7

Open skunkfpv opened 6 months ago

skunkfpv commented 6 months ago

Hello. I recently have built your macro pad mini, knob, and macro pad plus. So on the mini it accepts the firmware but nothing works but when the 3rd key is pushed it goes into boot loader mode. On the knob the firmware flashes and it appears to be working but in windows it keeps saying device is not recognized and disappears and reappears multiple times. Lastly, on the macro pad plus it is stuck in a boot loop, rebooting every second. Please reply because i want to get these to start working. Thank you a lot, Samuel

wagiminator commented 6 months ago

Puh, that's hard to tell from a distance with this less information. Let's take the volume knob as an example. How did you compile/upload the firmware? Did it work? If not, what was the error message. What Windows version do you use? What is shown in the device manager?

skunkfpv commented 6 months ago

Do you have discord? Can we chat on there so I can debug easier?

skunkfpv commented 6 months ago

I would like to call with my audrino ide on so you can help me debug easier

wagiminator commented 6 months ago

I apologize, but I don't have Discord, nor do I have sufficient free time for online debugging. Thank you for understanding.

skunkfpv commented 6 months ago

With the smart knob I wired a usbc plug and it cycles the led correct but none of the microcontrollers are recognized in windows

skunkfpv commented 6 months ago

Sorry if im not giving enough information. On all of the projects i am getting this error https://cdn.windowsreport.com/wp-content/uploads/2021/12/USB-device-not-recognized-Windows-10-886x590.jpg

wagiminator commented 5 months ago

Mmmmh, there is a DLY_ms(500) prior to HID_init(). Try to increse the time to DLY_ms(1000) OR remove WDT_start(); AND WDT_reset();

skunkfpv commented 5 months ago

I just tried both of those and what the boards are doing is they are still having the same issues. They also play the connected and disconnected sounds over and over again until unplugged.

wagiminator commented 5 months ago

Strange, have you tried it on another computer?

skunkfpv commented 5 months ago

Yes. It still does the same thing.

skunkfpv commented 5 months ago

Any more ideas?

wagiminator commented 5 months ago

I found a PC with Windows 10 Pro, 64-bit, version 22H2 (I'm only using Linux) and re-tested it. It worked without any problems. However, I can not rule out some compatibility issues of the firmware on Windows PCs. Since you don't have problems uploading the firmware I think that this isn't a hardware issue. Unfortunately, since I cannot reproduce the error at the moment, I am currently unable to identify the cause.

skunkfpv commented 5 months ago

When plugged in it gives me a error message saying that it malfunctions. Are there any modifications in the code that I can make?

skunkfpv commented 5 months ago

I modified your design @wagiminator and ripped the gnd vcc datap and datan and replaced it with a usb c plug. That's the only mod I did to it. I'm not sure if that modification changed anything

skunkfpv commented 5 months ago

Could it have anything to do with the device descriptor?

skunkfpv commented 5 months ago

Also, when I turn the knob it stops changing colors and I think it freezes up. I can't get it to work on an Ubuntu machine either

wagiminator commented 5 months ago

It shouldn't really be the USB connector. You don't seem to have any issues with uploading the firmware, which also utilizes the USB connection to the microcontroller. If it doesn't even work under Ubuntu, then something's definitely off - but I currently have no idea what. How did you compile the firmware? Have you tried uploading the precompiled .bin file?

skunkfpv commented 5 months ago

I'm not sure on how to do that. I just used audrino ide

wagiminator commented 5 months ago

Ah, maybe the Arduino IDE is the problem. Did you make the correct USB-settings in the board options?

Please download WCH's official programming tool: https://www.wch.cn/downloads/WCHISPTool_Setup_exe.html Try to upload the precompiled binary (.bin file in the software folder) with this tool.

skunkfpv commented 5 months ago

The .bin worked but not arduino. How do I customize the code inside of the bin file?

skunkfpv commented 5 months ago

new problem. It sometimes disconnects and reconnects, causing the volume to rapidly increase or decrease by two marks

wagiminator commented 5 months ago

That can sometimes be due to different versions of the Arduino IDE and Board Package. Unfortunately, I don't remember which version I used for testing back then. Generally, I work without an IDE, so I use the makefile. However, I don't know how to do that on Windows either.