Skip to content
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

cpu/nrf52/periph/i2c: 16-bit adressing #16680

Closed
nicoHarel opened this issue Jul 26, 2021 · 4 comments · Fixed by #16711
Closed

cpu/nrf52/periph/i2c: 16-bit adressing #16680

nicoHarel opened this issue Jul 26, 2021 · 4 comments · Fixed by #16711

Comments

@nicoHarel
Copy link

nicoHarel commented Jul 26, 2021

Description

Hello everyone.
After my fix for cpp on the at24cx driver I tried using it in my app which is powered by a NRF52 MCU.

Big problem: the i2C periph of that MCU doesn't like it supports 16-bit register addressing (see: periph/i2c.c line 172)

Any reason why ?

Also a few lines later:

the nrf52's TWI device does not support to do two consecutive transfers
* without a repeated start condition in between. So we have to put all data
* to be transferred into a temporary buffer

That doesn't seem to be true:
See this link:
https://devzone.nordicsemi.com/f/nordic-q-a/5267/i2c-eeprom-with-16bit-addressing

I could use a use a 16KB AT24C chip but yeah... It's a bit small and ancient =)

Have a nice day.

@nicoHarel nicoHarel changed the title cpu/nrf52/periph/i2c cpu/nrf52/periph/i2c: 16 bit adressing Jul 26, 2021
@nicoHarel nicoHarel changed the title cpu/nrf52/periph/i2c: 16 bit adressing cpu/nrf52/periph/i2c: 16-bit adressing Jul 26, 2021
@benpicco
Copy link
Contributor

Any reason why?

My guess would be that nobody has gotten around to implementing it. If you want to take a stab at it, that would be great! 😃

@nicoHarel
Copy link
Author

My guess would be that nobody has gotten around to implementing it. If you want to take a stab at it, that would be great! smiley

I'll have a look and give it a go as soon as I have a bit of time 😉

@nicoHarel
Copy link
Author

Ok so a little update on this: - I won't open a PR just now because, unfortunately, I fail to see results with what I am trying to do. Write operation seems to be working (hard to confirm with my hardware and available tools at my disposal), but read operation is giving me nothing.

I did a bit of reading:

Mostly I'm just posting this here so the links are there and to you guys updated. I'll of course open a PR as soon as I see results.

@nicoHarel
Copy link
Author

nicoHarel commented Aug 4, 2021

Well obviously I just wrote this and now everything starts working.

Ignore the previous message 😆 I'll open a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants