cc26x0: enable serial domain only once
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
This commit is contained in:
parent
4643ed5733
commit
7ac28c82b1
@ -1 +1,3 @@
|
||||
USEMODULE += cc26xx_cc13xx
|
||||
|
||||
include ${RIOTCPU}/cc26xx_cc13xx/Makefile.dep
|
||||
|
||||
@ -95,13 +95,13 @@ void i2c_init(i2c_t devnum)
|
||||
assert(devnum < I2C_NUMOF);
|
||||
|
||||
/* Make sure everything is shut off in case of reinit */
|
||||
PRCM->PDCTL0SERIAL = 0;
|
||||
I2C->MCR = 0;
|
||||
PRCM->I2CCLKGR = 0;
|
||||
|
||||
/* enable SERIAL power domain */
|
||||
PRCM->PDCTL0SERIAL = 1;
|
||||
while (!(PRCM->PDSTAT0 & PDSTAT0_SERIAL_ON)) {}
|
||||
/* Enable serial power domain */
|
||||
if (!power_is_domain_enabled(POWER_DOMAIN_SERIAL)) {
|
||||
power_enable_domain(POWER_DOMAIN_SERIAL);
|
||||
}
|
||||
|
||||
/* enable i2c clock in run mode */
|
||||
PRCM->I2CCLKGR = 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user