|
发表于 2023-2-1 10:30:59
|
显示全部楼层
一定要
这是V2.5版本的bootloader反汇编代码,来自https://www.mikrocontroller.net/ ... 2/bootloaderV25.a51
CH552是用uart1的。
- ;start boudrate generator for serial mode
- ;for ch551/ch553 use T1 with uart0
- ;otherwise use the SBAUD1 with uart1
- jnb bChipTyp, code_3CE7 ;if(bChipTyp) {
- mov SCON, #0x50 ; SCON=0x50;
- clr A
- mov T2CON, A ; T2CON=0;
- mov PCON, #SMOD ;
- orl TMOD, #0x20 ; T1 mode 2
- mov T2MOD,#bTMR_CLK or bT1_CLK; T2MOD = bTMR_CLK | bT1_CLK;
- mov TH1, #0xF3 ; TH1 = 0xF3;
- setb TR1 ; TR1 = 1;
- sjmp code_3C5D ;} else
- code_3CE7: ;{
- mov SCON1, #0x30 ; SCON1 = 30;
- mov SBAUD1,#0xF3 ; SBAUD = 0xF3;
复制代码 |
|