2024-04-21 11:33 PM
I hope this message finds you well. I am reaching out regarding an urgent matter with my STM32 CubeMX v6.1 project. I have encountered an issue with the I2C functionality that I cannot seem to resolve despite trying various approaches.
The specific problem arises with the following function:
I have attempted to implement this function across different STM microcontroller units, including STM32WB10, STM32F750, and STM32F103, but unfortunately, the issue persists consistently across all of them. It's worth noting that I have verified the hardware compatibility by successfully testing it with Arduino and ESP32 platforms.
Given that I have a project deadline looming, I urgently require your assistance in resolving this matter. Any guidance or insights you can provide would be greatly appreciated.
Thank you very much for your prompt attention to this matter. I look forward to your response.
Solved! Go to Solution.
2024-04-22 12:34 AM
What's the first bit map of.code fragment about?
Probably issue not where you're looking.
State slave part and connectivity.
Don't use internal pull up on AF OD. Use an external pull up likely in 1K5 to 2K7 range.
2024-04-21 11:35 PM
"if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
{
return HAL_ERROR;
}"
this function is come true.
2024-04-22 12:25 AM
@SMazu.3 , what i dont understand :
you call (blocking) HAL_I2C_Master_Transmit() , that will return success or error
and then (i assume - you dont show your program) I2C_WaitOnTXISFlagUntilTimeout() to check --- what ?
TXIS flag ?
-> transmit interrupt status : but you dont use interrupt call at all.
I would say: just leave it away or use interrupt I2C calls.
2024-04-22 12:34 AM
What's the first bit map of.code fragment about?
Probably issue not where you're looking.
State slave part and connectivity.
Don't use internal pull up on AF OD. Use an external pull up likely in 1K5 to 2K7 range.
2024-04-22 12:47 AM
already using 4k7 with 3v3
2024-04-22 12:53 AM
default i2c setting.
2024-04-22 05:06 AM - edited 2024-04-22 05:18 AM
MC3479 It's MEMSIC accelerometer
I2C: supports 400 KHz and fast mode +. Has two interrupt pins with programmable mode/polarity.
The 7-bit address can be 0x4C or 0x6C (see the PDF pg, 35).
2024-04-22 05:50 AM
hw is working i test that with Arduino and esp32 and esp8266,
stm code is no working. WaitOnTXISFlagUntilTimeout come Hal_Error very time.
with Master mode Slave mode and and all i2c code by cube ide or cube max have this problem
with stm32wb10 stm32f103. and stm32f750
2024-04-22 05:58 AM
Consistency is good, it hints that you're doing something generally wrong for the ST library. Check that you pass the I2C address in correct format.
2024-04-22 07:13 AM