Closed
Description
Port, board and/or hardware
ESP32-D2WD
MicroPython version
MicroPython v1.25.0 on 2025-04-15; Generic ESP32 module with ESP32-D2WD
Reproduction
Writing the memory with ptr32
with an offset no longer work.
Writing with ptr32
without an offset is working.
Reading with ptr32
with an offset is working.
Writing with mem32
with an offset is working.
The issue is only when there's an offset with ptr32
.
It's a regression since it used to work in an earlier release (don't have the number).
from machine import mem32
# Platform check (ESP32)
_SYSCON_DATE = const(0x3ff6607C)
assert mem32[_SYSCON_DATE] & 0x7fffffff == 0x16042000, "ESP32 specific"
# Constants soc/rmt_reg.h
_RMT_MEM_REG = const(0x3FF56800)
@micropython.viper
def write_mem32():
mem32[_RMT_MEM_REG + 0 * 4] = 0x00010001 # OK
mem32[_RMT_MEM_REG + 1 * 4] = 0x00020002 # OK
for i in range(2):
print(f"{i} TX {uint(ptr32(_RMT_MEM_REG)[i]):08X}")
@micropython.viper
def write_ptr32():
ptr32(_RMT_MEM_REG)[0] = 0x00040004 # OK
ptr32(_RMT_MEM_REG)[1] = 0x00050005 # FAIL
for i in range(2):
print(f"{i} TX {uint(ptr32(_RMT_MEM_REG)[i]):08X}")
write_mem32()
write_ptr32()
Expected behaviour
No response
Observed behaviour
ptr32(_RMT_MEM_REG)[1] = 0x00050005 # FAIL, the value is not written
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree