Skip to content

Commit 0c81961

Browse files
Osamu Koizumifredlee12001
authored andcommitted
Avoid setting clock parameter twice
1 parent 33f59b4 commit 0c81961

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

targets/TARGET_RDA/TARGET_UNO_91H/rda_ccfg_api.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ static inline void rda_ccfg_ck(void)
7878

7979
cfg = (RDA_SCU->CORECFG >> 11) & 0x07U;
8080
rd_rf_usb_reg(0xA4, &val, 0);
81+
82+
// If i2c_wakeup_en is already set, do nothing and return
83+
if((val & 0x01U) == 0x00U) {
84+
return;
85+
}
86+
8187
#if ((SYS_CPU_CLK == CLK_FREQ_160M) && (AHB_BUS_CLK == CLK_FREQ_80M))
8288
/* HCLK inv */
8389
if(((CLK_FREQ_40M << 1) | CLK_FREQ_40M) == cfg) {

0 commit comments

Comments
 (0)