Out of date board dts file for nrf52dk

Hi,

This was a major nuisance for me. As you know from the nRF52832 product spec, the TWI interface is deprecated in favor of TWIM. You may also know that there are any number of bugs in zephyr/drivers/i2c/i2c_nrfx_twi.c. Non-existent errors get reported as errors due to somebody thinking that NRFX_SUCCESS==0 or something crazy like that. And i2c_write_read() does not work with the transfer code in that file.

Please update zephyr/boards/nordic/nrf52dk/nrf52dk_nrf52832.dts to use nordic,nrf-twim rather than nordic,nrf-twi for i2c0 and i2c1. Thank you. Let me know what you think.

Regards,

Burt S.

Parents Reply
  • Hi again,

    Another update

    This issue is already patched and merged into main and it was a known issue 

    1. The problem was in the Zephyr driver rather than nrfx 4.0 and is fixed in the main of sdk-zephyr: Fix i2c driver for TWI on nRF52 by nika-nordic · Pull Request #3624 · nrfconnect/sdk-zephyr
      If you wish to apply it to NCS v3.2.x, you can cherry pick this PR and foxus on the 3 files in the drivers/i2c folder. Some of the nrfx samples uses overlays https://docs.nordicsemi.com/bundle/nrfx_4.0.1/page/index.html#nrfx_samples 

    2. As I mentioned, the change from twi to twim spi/spim got applied to the nRF SoC dts files, but didn't make it to the DK dts files, which is the reason you're having issues when using the nrf52dk_nrf52832 dts. The issue is described as a known issue here:Technical Documentation and is as mentioned covered by the pr in item 1 above. Some of the nrfx samples in the SDK uses overlay files to fix this, for instance 

    3. Nordic is not deprecating usage of twi/spi as on the older devices as there are some peripheral instances of TWI/SPI (without -M). Some of the older socs are still using them for certain things, but for some implementations it might be required to use the spim/twim instances instead and those are patched to use an overlay such as the nrfx samples I referred to in item 1.

      There's a discussion ongoing internally whether the dk boards for nrf52 series dk's should have twim/spim or twi/spi with overlays where it's required to use twim/spim as well. Conclusion might lean towards the latter.

    Let me know if this resolves this case

    Kind regards,
    Andreas

Children
Related