-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
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
[bugfix_2.0.x] LPC1768 BlinkM wrong I2C- Address #9799
Comments
Did you know the address of a BlinkM is configurable? https://thingm.com/fileadmin/thingm/downloads/BlinkM_datasheet.pdf |
Yes, I know that. But thats not the Point |
Ah, right. My hex math isn't working today. Thanks for clarifying. So, you said if you give it 0x12 it works fine. That implies that we should be shifting all our addresses left, so that the BlinkM will see the 0x09 it wants, correct? Or is it the converse, where our usual 0x09 is being left-shifted on the way out, so that the BlinkM internally gets the 0x12 that it wants, but for STM and others we must do the left shift on its behalf? |
Answered my own question with https://community.particle.io/t/i2c-7-or-8-bit-addresses-fixed-pull-request-submitted/1328/9 |
Our LPC HAL includes this… The address is being right-shifted before send. So it's expecting the left-justified address. Of course, we have control over this one. uint8_t TwoWire::endTransmission(void) {
// transmit buffer (blocking)
I2C_M_SETUP_Type transferMCfg;
transferMCfg.sl_addr7bit = txAddress >> 1; // not sure about the right shift
transferMCfg.tx_data = txBuffer; |
I dont know much about coding, i can´t help you there |
Well it's important that I state these things, because the core HAL developers will be reading this too. Thank you immensely for bringing this to our attention! Should be fixed later today. |
My pleasure! |
@thinkyhead was it fixed? |
@thinkyhead @boelle Sorry, this was not fixed. I know, it has a low priority and maybe I am the only one still using a BlinkM, but I still need to change I2C adress every time I download marlin |
Fix #9799 — hopefully not a unicorn
Hopefully this latest patch will take care of it! |
Dont know, if it's a unicorn, but it is working. Thanks a lot |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug Report
When I change i2C- Address in blinkm.cpp to 0x12 BlinkM is doing fine.
Wire.beginTransmission(0x12)
So it seems to me, there is a Problem with 7 bit I2C- Adresses (like BlinkM with 0x09) wich are left shifted as stated in BlinkM Datasheet.
Just changing the Address to 0x12 breaks compatibility with Arduino, so I think it has to be done in the Hal, which is far beyond my skills
The text was updated successfully, but these errors were encountered: