-
Notifications
You must be signed in to change notification settings - Fork 980
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
I2C Slave does not work (STM32F103) #2585
Comments
Do you have pullup resistors on each I2c lines? |
Yes, and - I can see the I2C packets using an oscilloscope on the pins. (decoded on the scope) |
Could you share the master example? |
@fpistm unable, the master is Ardupilot (which is open source)- if you have some hardware that can run Ardupilot, and configure BATT_MONITOR 5 - then you have that I2C traffic too. The traffic is really nothing special - it is all about spotting a normal 7-bit address that is being interrogated by a master. I bet this is reproducible with a ny simple Arduino program that tried to read data from a I2C device (just set the address to the same on both ends.) |
Please see attached communication capture with device 0xB - the capture should clarify any questions you might have about protocol/timing etc. it is captured using Saleae logic analyzer, which is perfectly multi-platform with nice software: https://www.saleae.com/pages/downloads |
Thanks for inputs. I will try to test on my side but don't know when as I'm fully busy on other tasks. |
Thank you, I am really stuck on this one, I "modernized" previous design (Atmega32u4) by dropping in STM32F103, and now - with plenty of new PCB's manufactured, I am stuck with this issue. |
Additional information; the exactly same happens when SCL=PB10 and SDA=PB11 |
@fpistm I understand that you are busy, but is there some way to ...motivate... you or another competent contributor here to solve this? |
Just a question you said you used a BluePill but you select a blackpill on your screenshot ? |
Yes, the blackpill is an error on my side. After much troubleshooting I made this test app above, and ran it on Atmega32u4 for comparsion/to verify it. BTW: I have also tried to build it on VSCode w/platformio (and Arduino library) - with same results. So me trying both Arduino and all that are kind of desperate attempts to make it work :) |
@fpistm corrected, and I can confirm that setting "Bluepill" as target did not change the result. |
I can confirm this issue exists. |
Describe the bug
I2C slave does not recieve requests.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'd expect it to work like it does on Atmega/atmel controllers - where this code works. see arduino/ArduinoCore-API#241
Than I rebuilt it all using Arduino Core 2.9.0 (current release)
On Core 2.9.0 - the PB6 is at least not pulled low - which is good, but it still does not work.
Desktop (please complete the following information):
Board (please complete the following information):
The text was updated successfully, but these errors were encountered: