Skip to content

I2C readfrom_mem throws EPERM on Portenta C33 #13280

@sebromero

Description

@sebromero

I'm on MicroPython v1.22.0 on 2023-12-27; Arduino Portenta C33 with RA6M5 and I just ran
a simple I2C read that worked fine under 1.21 (after merging #12978). It now throws an exception EPERM. It does however still work with SoftI2C.
I wonder what changed in the mean time in the Renesas port 🤔
To reproduce it, run the following with the values adjusted for you I2C peripheral:

from machine import I2C, Pin, SoftI2C

buses = [I2C(0), SoftI2C(scl=Pin('P408') , sda=Pin('P407'))]

for bus in buses:
    print("Trying bus", bus)
    try:
        data = bus.readfrom_mem(0x21, 0x1c, 0x1) 
        print(data)
        print("Success on bus", bus)
    except Exception as e:
        print(f"Read failed on bus {bus}: {e}")

With my setup it prints the following:

Trying bus I2C(0, freq=400000, scl=P408, sda=P407)
Read failed on bus I2C(0, freq=400000, scl=P408, sda=P407): [Errno 1] EPERM
Trying bus SoftI2C(scl=P408, sda=P407, freq=500000)
b'\xb8'
Success on bus SoftI2C(scl=P408, sda=P407, freq=500000)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy