-
Notifications
You must be signed in to change notification settings - Fork 1k
[F4] I2C broken since last STM32F4 HAL update #463
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
Comments
Additionally confirmed that the source caused halt only with Wire library, without STM32RTC and all related codes. It's so confusing. Initially I thought the RTC library has an issue with the master branch board platform but it seems that the core has another problem. |
Hi @charlie1024 |
Hello, |
Ok thanks. I will test on my side when possible. |
@charlie1024, |
I tried to implement new RTC feature with [RTC] Avoid reset time after low power mode #442 and that did work in 1.5.0 release platform. I hope the bug could be resolved. Thank you for assistance. |
Of course this will be resolved ;) |
Issue found and fixed. |
In function: static HAL_StatusTypeDef I2C_Master_SB(I2C_HandleTypeDef *hi2c) This check has been added: if ((hi2c->hdmatx->XferCpltCallback != NULL) || (hi2c->hdmarx->XferCpltCallback != NULL)) { /* Enable DMA Request */ SET_BIT(hi2c->Instance->CR2, I2C_CR2_DMAEN); } But, in case of the DMA is not used, hi2c->hdmatx and hi2c->hdmarx are NULL. In this case, hi2c->hdma(rx|tx)->XferCpltCallback can be not NULL then I2C_CR2_DMAEN is set while it should not. As this bit is checked several time to know if DMA is used or not this raised an exception handler. Fix stm32duino#463 Signed-off-by: Frederic.Pillon <[email protected]>
[Edit: transferred from stm32duino/STM32RTC]
Hello,
I recently seen the board library was updated some days ago and the HAL feature was newly implemented.
I thought that with the new master branch board platform the new library will work, so with my Nucleo-F411RE I tried to operate the new library.
It worked without I2C. I use D14/D15(I2C1) and if I connect any I2C device, then the MCU goes to forever sleep(all codes are stopped).
This code shows:
0x50 means the EEPROM device and I just wrote a waste data to the line, so there must be no problem.
However If I use this code with any I2C device connected, F411RE just halts and not respond for anything(interrupts are all stopped too).
Couldn't be the new library used yet? Or is this a bug?
Thank you.
The text was updated successfully, but these errors were encountered: