請問 CH552 上電進(jìn)入bootloader的邏輯是什么?(使用小米充電寶供電有時無法啟動)

我最近嘗試使用小米充電寶為CH552的板子供電,卻發(fā)現(xiàn)有時無法啟動。經(jīng)觀測:小米充電寶D+,D-空載各有約2.58V電壓。如果板子一側(cè)是MicroUSB接口,連接充電寶先插MicroUSB,再插TypeA,可以啟動,如果先插TypeA,再插MicroUSB,則無法啟動。測試板子是一個燒錄了閃燈程序的最小系統(tǒng)。啟動與否依據(jù)是否觀察到閃燈而定。我猜測是進(jìn)入了Bootloader。


1593287901158321.png

測試1,D+上拉10K,再插Type A,無法啟動。可以理解是進(jìn)入bootloader


1593287902760045.png

測試2,插Type A,可以啟動。

1593287902275023.png

測試3,插MicroUSB,無法啟動。猜測是MicroUSB的電極太短,上電后D+直接被拉高進(jìn)入Bootloader。


請問 CH552 上電進(jìn)入bootloader的邏輯是什么?是不是直接在上電后檢測D+的數(shù)字邏輯電平并決定是否跳轉(zhuǎn)用戶程序?

552芯片進(jìn)boot的方式有三種:

1、空片(即未下載過的芯片)第一次上電默認(rèn)進(jìn)boot,當(dāng)下載過程序后再次上電需要觸發(fā)才能進(jìn)boot;

2、觸發(fā)進(jìn)boot ? 冷上電檢測P36引腳是否是高電平,如果是高電平則進(jìn)boot;

3、通過IAP方式跳轉(zhuǎn)進(jìn)boot;

如果上電時D+有電壓 那會滿足進(jìn)boot的條件跑boot程序。



前面的測試1和測試3 你可以打開電腦的設(shè)備管理器,看一下外部接口中有沒有USB MODULE設(shè)備。如果出現(xiàn)了說明此時在跑BOOT程序。


非常感謝,之前簡單在插充電寶的同時將USB插入電腦并沒有辦法識別,估計(jì)是USB電平?jīng)_突所致。這樣的話如果USB供電端數(shù)據(jù)線是電阻分壓的情況,需要讓用戶插拔TypeA以避免進(jìn)入Bootloader。


0.png

官方解答不給力,連個簡單的解決方案都不推薦。



The p1.5 download configuration seems to work only with the latest version. i have bought some 1K pcs of CH554G and facing a huge issue because of this bootloader problem. whenever a device is connected to the USB before power on it automatically enters in to boot mode and the entire unit is not working. i have the chip with bootloader version 1.10 and 3.2 but both are not working. when i contacted the support team they simply telling this function is added only to the latest version chip. so that means previous version chips are of no use!!!

if you are having a older version boot code chip then no matter what you select in the WCHISP tool download cfg p1.5 or p3.6 it always works with p3.6 only.


(已翻譯)

p1.5下載配置似乎僅適用于最新版本。 我已經(jīng)購買了大約1K的CH554G,由于這個引導(dǎo)程序問題而面臨著一個巨大的問題。 只要將設(shè)備連接到USB,然后再打開電源,設(shè)備就會自動進(jìn)入啟動模式,并且整個設(shè)備都無法工作。 我的引導(dǎo)加載程序版本為1.10和3.2,但兩者均無法正常工作。 當(dāng)我聯(lián)系支持團(tuán)隊(duì)時,他們只是告訴此功能僅添加到最新版本的芯片中。 所以這意味著以前版本的芯片沒有用?。。?!

如果您使用的是較早版本的引導(dǎo)代碼芯片,則無論您在WCHISP工具下載cfg p1.5還是p3.6中選擇什么,它始終僅適用于p3.6。


sorry... in my last post i wrongly mentioned the boot code version. i tested with 1.1 and 2.31 which p1.5 is not working. WCH people says that from 2.36 version only it will work.


(已翻譯)
抱歉...在我的上一篇文章中,我錯誤地提到了啟動代碼版本。 我用1.1和2.31進(jìn)行了測試,其中p1.5不起作用。 WCH的人們說,只有2.36版本可以使用。


Our chip BOOTLOADER version greater than or equal to 2.30 supports download pin configuration. The 1.1 version does not support it.


可以在D+引腳加15K~33K的下拉電阻,避免MCU進(jìn)boot


@Madhan

As mentioned above aktivating the bootloader by poweron reset with P1.5 needs at least loader 2.30. I have seen chips with v1.1, v2.31 and recently v2.40. So If your chips have v1.1 there ist simply no was to use P1.5.?

The only way would bei to add an extra pulldown at D+ or replace the loader with v2.31 or v2.40. I personally recoment v2.40 because it ist much more secure than the others.

Replacing the loader is not easy but doable if 1.1 ist installed. Been there, done that....?

Google should give you some ideas how to do that.


One extra Note:

At AliExpress some guys sell CH552 with deactivated or missing bootloader. Thus making those chips unusable unless WCH releases some dokument about the SPI programming.?

We have done some tests with those chips but could not find any way to activate the loader. We have tried all combinations we are aware off including serial programming.


Hello, the SPI upgrade protocol part is not open to users. If the chip can’t enter the boot, you can apply to add me qq. I will tell you my address. You can send these chips to us for testing.


嗯,這個程序我很認(rèn)真的看過了,唯一的疑問是我怎么再回到這個boot loader程序,如果是集成再application里面,那升級過程中有可能出現(xiàn)掉電等極端情況,那豈不是會變磚?


發(fā)錯,忽略


@wangyy i have a chip with boot version 2.31 but still it does not support p1.5. is there any way to update the usb bootloader to 2.40 verion or is there any way to remove the usb bootloader??


@usbman i have both 1.1v and 2.31 version bootloader. kindly share me som details to delete it or update it.


Thanks in advance.


@WCH_Tao i have tried to add a pull down resisitor of 10k which is ok for few devices but not all...


只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频