CH552-USB-Knob icon indicating copy to clipboard operation
CH552-USB-Knob copied to clipboard

Help with CH552G and CH552E projects

Open skunkfpv opened this issue 9 months ago • 22 comments

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

skunkfpv avatar Apr 27 '24 02:04 skunkfpv

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?

wagiminator avatar Apr 27 '24 18:04 wagiminator

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

skunkfpv avatar Apr 27 '24 18:04 skunkfpv

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

skunkfpv avatar Apr 28 '24 12:04 skunkfpv

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

wagiminator avatar Apr 28 '24 14:04 wagiminator

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 avatar Apr 28 '24 15:04 skunkfpv

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

skunkfpv avatar Apr 29 '24 02:04 skunkfpv

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();

wagiminator avatar May 01 '24 17:05 wagiminator

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.

skunkfpv avatar May 02 '24 00:05 skunkfpv

Strange, have you tried it on another computer?

wagiminator avatar May 02 '24 16:05 wagiminator

Yes. It still does the same thing.

skunkfpv avatar May 02 '24 22:05 skunkfpv

Any more ideas?

skunkfpv avatar May 04 '24 02:05 skunkfpv

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.

wagiminator avatar May 04 '24 13:05 wagiminator

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 avatar May 04 '24 17:05 skunkfpv

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 avatar May 04 '24 18:05 skunkfpv

Could it have anything to do with the device descriptor?

skunkfpv avatar May 05 '24 01:05 skunkfpv

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

skunkfpv avatar May 05 '24 01:05 skunkfpv

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?

wagiminator avatar May 05 '24 18:05 wagiminator

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

skunkfpv avatar May 05 '24 21:05 skunkfpv

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.

wagiminator avatar May 06 '24 08:05 wagiminator

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

skunkfpv avatar May 08 '24 03:05 skunkfpv

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

skunkfpv avatar May 08 '24 23:05 skunkfpv

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.

wagiminator avatar May 18 '24 07:05 wagiminator