Skip to content

Dev xxxx xxx fix #1403 #1449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 7, 2015
Merged

Dev xxxx xxx fix #1403 #1449

merged 4 commits into from
Dec 7, 2015

Conversation

dbestm
Copy link
Contributor

@dbestm dbestm commented Nov 24, 2015

I2C correction (F1, F2, F4, L1):

// Wait the STOP condition has been previously correctly sent
// This timeout can be avoid in some specific cases by simply clearing the STOP bit
timeout = FLAG_TIMEOUT;
while ((i2c->CR1 & I2C_CR1_STOP) == I2C_CR1_STOP) {
    if ((timeout--) == 0) {
        return 1;
    }
}

// Generate the START condition
i2c->CR1 |= I2C_CR1_START;

I2C correction (F0, F3, F7, L0, L4):

// Wait the STOP condition has been previously correctly sent
timeout = FLAG_TIMEOUT;
while ((i2c->CR2 & I2C_CR2_STOP) == I2C_CR2_STOP){
    if ((timeout--) == 0) {
        return 1;
    }
}

// Generate the START condition
i2c->CR2 |= I2C_CR2_START;

RTC correction (all but F1):

// Check if RTC is already initialized
if ((RTC->ISR & RTC_ISR_INITS) ==  RTC_ISR_INITS) return;

clock time out :
high speed @ 200ms in hal conf
low speed @ 100ms in hal rcc
nucleo 32 on HSI by default in system config

@dbestm dbestm changed the title Dev xxxx xxx Dev xxxx xxx fix #1403 Nov 26, 2015
@@ -93,7 +93,7 @@
* Timeout value
*/
#if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT ((uint32_t)500) /*!< Time out for HSE start up, in ms */
#define HSE_STARTUP_TIMEOUT ((uint32_t)200) /*!< Time out for HSE start up, in ms */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are all these timeouts >99 ms?

0xc0170 added a commit that referenced this pull request Dec 7, 2015
I2C fixes, timeout for startup ~100/200
@0xc0170 0xc0170 merged commit a41d1d6 into ARMmbed:master Dec 7, 2015
@0xc0170
Copy link
Contributor

0xc0170 commented Dec 7, 2015

I still would like to find out those numbers, why there are 100/200 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants