adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.09k stars 1.22k forks source link

RP2350 PSRAM inconsistency and crashes #9755

Closed bill88t closed 2 days ago

bill88t commented 3 days ago

CircuitPython version

Adafruit CircuitPython 9.2.0-rc.0 on 2024-10-23; Adafruit Feather RP2350 with rp2350a
ESP-PSRAM-64H soldered on

Code/REPL

>>> from os import urandom
>>> a = urandom(7340032) # 7ish megs, do not reload
>>> import microcontroller
>>> microcontroller.reset()
# Then once it's up
>>> import gc
>>> gc.mem_alloc()
1312
>>> gc.mem_free()
776512
>>>

Behavior

Also cold booting, sends the board to safemode, assuming it doesn't like mem contents. Booting by upgrading from 9.2.0-beta.1-21-gb7af97ee92 works.

Description

Feels like ram contents matter and are not cleaned on chip init.

Additional information

Adafruit CircuitPython 9.2.0-beta.1-21-gb7af97ee92 on 2024-10-23; Adafruit Feather RP2350 with rp2350a is good.

dhalbert commented 2 days ago

I was able to reproduce this problem. I also experimentally changed the PSRAM memory address to point the uncached access address space, and that does not show the problem. So I think it is some problem with the caching.