Skip to content

Commit d72b902

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 d72b902

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,15 @@ 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+
```

0 commit comments

Comments
 (0)