cc2538 i2c bug in clock computation

This commit is contained in:
Ulf Knoblich 2015-04-29 11:07:59 +02:00
parent 6c706e53ee
commit 8e624c750d

View file

@ -50,7 +50,7 @@ get_sys_clock(void)
{ {
/* Get the clock status diviser */ /* Get the clock status diviser */
return SYS_CTRL_32MHZ / return SYS_CTRL_32MHZ /
((REG(SYS_CTRL_CLOCK_STA) & SYS_CTRL_CLOCK_STA_SYS_DIV) + 1); (1 << (REG(SYS_CTRL_CLOCK_STA) & SYS_CTRL_CLOCK_STA_SYS_DIV));
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void