Skip to content

Commit 25fa471

Browse files
committed
README.md: add pllmf exception for gd32a50x
gd32a50x have pllmf calculate error, explain how to fix it. Signed-off-by: YuLong Yao <[email protected]>
1 parent 4040618 commit 25fa471

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,19 @@ conflict resolution. See below list with the proposed solution:
125125

126126
- i2c have different implement than current gd32 i2c driver. no need to patch
127127
upper i2c speed requirement.
128+
129+
- gd32a50x
130+
131+
- `SystemCoreClockUpdate` function contain an `pllmf` calculate error.
132+
Fix by change `0xFU` to `RCU_CFG0_PLLMF`:
133+
``` diff
134+
/* PLL multiplication factor */
135+
pllmf = GET_BITS(RCU_CFG0, 18, 21);
136+
pllmf += ((RCU_CFG0 & RCU_CFG0_PLLMF_4) ? 15U : 0U);
137+
- pllmf += ((0xFU == (RCU_CFG0 & RCU_CFG0_PLLMF)) ? 1U : 2U);
138+
+ pllmf += ((RCU_CFG0_PLLMF == (RCU_CFG0 & RCU_CFG0_PLLMF)) ? 1U : 2U);
139+
```
140+
- For debug this board, `pyocd` need a pack file from Gigadevice,
141+
But Gigadevice don't upload pack file to [keil packs repo](https://www.keil.com/dd2/pack/).
142+
Fix: Storage pack as `gd32a50x/support/GigaDevice.GD32A50x_DFP.1.0.0.pack`
143+
(Download from https://gd32mcu.com/cn/download/7?kw=GD32A5 -> GD32A50x AddOn)

0 commit comments

Comments
 (0)