Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Problem with external 128k SPIRAM 23LC1024

Open h1aji opened this issue 3 years ago • 0 comments

Platform

  • Hardware: [ESP-12F]
  • Core Version: [3.0.2]
  • Development Env: [Platformio]
  • Operating System: [MacOS]

Settings in IDE

  • Module: [Generic ESP8266 Module]
  • Flash Mode: [dio]
  • Flash Size: [4MB]
  • lwip Variant: [v2 Higher Bandwidth]
  • Reset Method: [ck]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [160MHz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200] (serial upload only)

Problem Description

In my internet radio project I am trying to use external 23LC1024 SPIRAM for ringbuffer

    ESP.setExternalHeap();                             // Set external memory to use
    ringbuf = (uint8_t *) malloc ( RINGBFSIZ ) ;       // Create ring buffer
    dbgprint ( "External buffer: Address %p, free %d\n", 
                    ringbuf, ESP.getFreeHeap() ) ;
    ESP.resetHeap();

Basic test as well as virtualmem.ino sketch works with no issues but buffer is empty.

D: Connect to n0e.radiojar.com on port 80, extension /hcrb063nn3quv?rj-ttl=5&rj-tok=AAABfwB-IbEAy4LwSr D: Connected to server D: Switch to HEADER D: content-type: audio/mpeg D: audio/mpeg seen. D: icy-name: - D: icy-metaint: 16000 D: Switch to DATA, bitrate is 0, metaint is 16000 D: First chunk: D: 00 00 00 00 00 00 00 00 D: 00 00 00 00 00 00 00 00 D: 00 00 00 00 00 00 00 00 D: 00 00 00 00 00 00 00 00

Is there anything additional that needs to be added in the code? Or is it a bug?

h1aji avatar Feb 18 '22 11:02 h1aji