[HELP] CH382 Actual Baud Rate Problem

I have built a PCIe board based on CH382 in 2S+1P mode and used an external 48MHz crystal. 

CKSEL pin is connected to GND by jumper. I also set Bit CK2X=1 for Frequency-Doubling and configured the divider register value to 1 (DLM=0x00, DLL=0x01).

In theory, I should get to 6MBaud (= 48M x 2 / 16 / 1), but in practical tests and oscilloscope measurements it is always 2Mbaud that's 1/3 of the expected value. 

Please guide me to solve this BaudRate problem.

Thanks a lot.

hi, may I ask that what os are you using with CH382 board, if you are using it on Windows or Linux, you don't need to modify the value by yourself, the driver supports caculating automatically.

The Driver link listed below: https://www.wch.cn/downloads/CH38XDRV_ZIP.html 


Thanks for your valuable reply.

Because our programs are based on RT-OS Target machines that are not in your driver list and must be implemented by Direct I/O Read-Write on the PCI bus.

I also tried the Board on Windows-OS and your suggested driver. The driver setup is based on an external 48MHz crystal and x2 mode, a screenshot of the setup is attached.

But the problem still persists and the measured rate is 2Mbaud! which is 1/3 of the expected value (6MHz = 48Mx2/16/1).

Could it be a hardware fault with the chip production? 

Do you have access to the Errata Notes and Suggested Workaround?

1657020410210874.png

1657020449506118.png



hello, the caculation method is right, so it has nothing to do with settings, according to your description, I think that the freq frequency is not right, it may be working in 16MHz mode, you can measure it in XI or XO pin, maybe the crystal you are using is overtone type.


Your guidance was accurate. The problem was in the crystal.

I measured the crystal clock on the XO pin, and to my surprise, the actual output was 16MHz, although the signature on it was 48MHz!

I changed crystal to the other original brand and values and the final result came true, The baud rate was in accordance with the calculations.

Without your support, we couldn't have gone through issues.

We are truly grateful and would like to express our sincere gratitude.



只有登录才能回复,可以选择微信账号登录