← index #15682Issue #15537
Off-topic · high · value 0.512
QUERY · ISSUE

ESP32-S3: machine.bitstream() can't send 6 bytes

openby ned-pcsopened 2024-08-19updated 2025-09-15
bugport-esp32

Port, board and/or hardware

ESP32-S3, octal SPIRAM on ESP32-S3-WROOM-1-N8R16 module

MicroPython version

MicroPython v1.23.0 on 2024-08-19; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3
built using ESP-IDF v5.2.2

Reproduction

When I execute the following code and watch GPIO12 on an oscilloscope, I see 96 pulses instead of the expected 48:

from machine import Pin, bitstream
buf = bytearray(6)
bitstream(Pin(12, Pin.OUT), 0, (240, 480, 480, 240), buf)

I have tested with a buffer of between 1 and 19 bytes, and I only get the wrong number of pulses for 6 byte buffers.

Expected behaviour

I expect to get 48 pulses on my pin.

Observed behaviour

I see 96 pulses on the pin.

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

ESP32-S3-FN8 SPIRAM errors on boot.

closedby kdschlosseropened 2024-07-24updated 2025-03-03
bugproposed-close

Port, board and/or hardware

esp32 port

MicroPython version

1.23.0

Reproduction

Compile for the ESP32-S3 without a board variant. flash to the ESP32-S3-FN8 series MCU (no PSRAM) and you will get SPIRAM errors when it boots.

Expected behaviour

For MicroPython to start up without logging errors to the console.

Observed behaviour

E (422) quad_psram: PSRAM ID read error: 0x00ffffff, PSRAESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x40382ba2 SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3820,len:0x105c load:0x403c9700,len:0x4 load:0x403c9704,len:0xbd8 load:0x403cc700,len:0x2e30 entry 0x403c989c 

E (422) quad_psram: PSRAM ID read error: 0x00ffffff, PSRAM chip not found or not supported, or wrong PSRAM line mode
E (423) esp_psram: PSRAM enabled but initialization failed. Bailing out.

(Then MicroPython continues starting up as normal.)

Additional Information

When I look at the board cmake file I can see it is loading this for the sdkconfig

set(SDKCONFIG_DEFAULTS
    boards/sdkconfig.base
    ${SDKCONFIG_IDF_VERSION_SPECIFIC}
    boards/sdkconfig.usb
    boards/sdkconfig.ble
    boards/sdkconfig.spiram_sx
    boards/ESP32_GENERIC_S3/sdkconfig.board
)

the boards/sdkconfig.spiram_sx is being loaded which contains

# MicroPython on ESP32-S2 and ESP32-PAD1_subscript_3, ESP IDF configuration with SPIRAM support
CONFIG_SPIRAM_MODE_QUAD=y
CONFIG_SPIRAM_TYPE_AUTO=y
CONFIG_SPIRAM_CLK_IO=30
CONFIG_SPIRAM_CS_IO=26
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
CONFIG_SPIRAM_USE_MALLOC=y

# This is the threshold for preferring small allocations from internal memory
# first, before failing over to PSRAM.
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=8192

This is being done even tho the SPIRAM board variant has not been used.

Code of Conduct

Yes, I agree

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