← index #8028Issue #8491
Related · high · value 0.698
QUERY · ISSUE

esp32: psram invalid pin on original pins if remaped

openby petrkropened 2021-11-24updated 2021-12-01
port-esp32

I make own build with PSRAM remaped to PINs 32,33 (because original setting has colision with pin 17 used for LAN CLK-IN).

But compared to version 1.14 witih SDK 3.3.2 of uPy I can not use those 16 and 17 pins now, because it claim them as "invalid pin"

diff to SDKconfig

+CONFIG_D0WD_PSRAM_CLK_IO=33
+CONFIG_D0WD_PSRAM_CS_IO=32
>>> machine.Pin(16)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid pin

but RAM itself works fine

>>> gc.mem_free()
4096416

of course, if I will use Pin.(33) or (32) program will crash due overlap with RAM

>>> machine.Pin(32,machine.Pin.OUT)
Pin(32)
>>>  
>>> 
>>> ����������������
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

But I can not find part of code which should mark those pins (32,33) as invalid instead of original (16,17)

Do not know if that is BUG of uPy 1.17 or ESP_IDF SDK 4.3
Both works fine in uPy 1.14 with SDK 3.3.2

CANDIDATE · ISSUE

S3R8 (octal spram configuration)

closedby stephanelsmithopened 2022-04-05updated 2022-04-14
port-esp32

The S3R8 and S3R8V ports have an 8Mb octal SPI PSRAM configuration (the rest of the S3 ports are quad). See page 20 of data sheet:
https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf

In machine_pin.c, recommending

 #if CONFIG_SPIRAM_MODE_OCT
    {{NULL}, -1}, // 33 FLASH/PSRAM
    {{NULL}, -1}, // 34 FLASH/PSRAM
    {{NULL}, -1}, // 35 FLASH/PSRAM
    {{NULL}, -1}, // 36 FLASH/PSRAM
    {{NULL}, -1}, // 37 FLASH/PSRAM
    #else
    {{&machine_pin_irq_type}, GPIO_NUM_33},
    {{&machine_pin_irq_type}, GPIO_NUM_34},
    {{&machine_pin_irq_type}, GPIO_NUM_35},
    {{&machine_pin_irq_type}, GPIO_NUM_36},
    {{&machine_pin_irq_type}, GPIO_NUM_37},
    #endif

This update added into the pull request for s3 specific pin definitions.
https://github.com/micropython/micropython/pull/8490

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied