You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am trying to use 1602 display via I2C communication protocol in Zephyr using STM32F3 DISCOVERY board. The program fails during the initialization of i2c and it prints on serial monitor "Status -5" i.e. I/O error.
I had a code in c (using uVision), that worked just fine, but when I tried to translate it into Zephyr I encountered problems.
Zephyr's 'i2c_write()' function returns the error code 'I/O error'. I used the function as a replacement for HAL's function 'HAL_I2C_Master_Transmit ()'.
This discussion was converted from issue #73449 on May 29, 2024 11:46.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I am trying to use 1602 display via I2C communication protocol in Zephyr using STM32F3 DISCOVERY board. The program fails during the initialization of i2c and it prints on serial monitor "Status -5" i.e. I/O error.
I had a code in c (using uVision), that worked just fine, but when I tried to translate it into Zephyr I encountered problems.
Zephyr's 'i2c_write()' function returns the error code 'I/O error'. I used the function as a replacement for HAL's function 'HAL_I2C_Master_Transmit ()'.
Code
This is the code in zephyr project:
For reference, here is the code in uVision, that works without errors:
Expected behavior
I expect status code to be okay and without any errors.
Impact
This problem is slowing my progress on the current project.
Environment :
Device tree overlay file
Since I suspect something might be wrongly configured, here is the device tree configuration:
Beta Was this translation helpful? Give feedback.
All reactions