<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[IoT M5Cam Project - problems porting code]]></title><description><![CDATA[<p dir="auto">Dear all,</p>
<p dir="auto">I am trying to use a M5Cam as an IoT system. Long story short: I want to regularly take pictures, connect to a WiFi connection and upload them to a cloud service (in this case Google Cloud Storage, but any other sort of system would work). I found some github repo doing exactly what I need to do, but when trying to adapt it to my board, it crashes with the following error:</p>
<p dir="auto">E (489) spiram: Expected 8192KiB chip but found 4096KiB chip. Bailing out..</p>
<p dir="auto">I tried everything to force the board to recognise the 4Mb PSRAM:</p>
<h1></h1>
<h1>ESP32-specific</h1>
<h1></h1>
<p dir="auto">CONFIG_ESP32_DEFAULT_CPU_FREQ_80=<br />
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=<br />
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y<br />
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240<br />
CONFIG_SPIRAM_SUPPORT=y</p>
<h1></h1>
<h1>SPI RAM config</h1>
<h1></h1>
<p dir="auto">CONFIG_SPIRAM_BOOT_INIT=y<br />
CONFIG_SPIRAM_IGNORE_NOTFOUND=<br />
CONFIG_SPIRAM_USE_MEMMAP=<br />
CONFIG_SPIRAM_USE_CAPS_ALLOC=y<br />
CONFIG_SPIRAM_USE_MALLOC=<br />
CONFIG_SPIRAM_TYPE_AUTO=y<br />
CONFIG_SPIRAM_TYPE_ESPPSRAM32=<br />
CONFIG_SPIRAM_TYPE_ESPPSRAM64=<br />
CONFIG_SPIRAM_SIZE=-1<br />
CONFIG_SPIRAM_SPEED_40M=<br />
CONFIG_SPIRAM_SPEED_80M=y<br />
CONFIG_SPIRAM_MEMTEST=y<br />
CONFIG_SPIRAM_CACHE_WORKAROUND=y<br />
CONFIG_SPIRAM_BANKSWITCH_ENABLE=y<br />
CONFIG_SPIRAM_BANKSWITCH_RESERVE=8<br />
CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=<br />
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=</p>
<p dir="auto">Any ideas? I am a total noob with esp32 coding and so, but I would appreciate any help :) Also, if you happend to have some other example code I can take on, please share!</p>
<p dir="auto">Original Code:<br />
<a href="https://github.com/raphaelbs/esp32-cam-ai-thinker/tree/master/examples/google_storage" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/raphaelbs/esp32-cam-ai-thinker/tree/master/examples/google_storage</a></p>
]]></description><link>https://community.m5stack.com/topic/1045/iot-m5cam-project-problems-porting-code</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 07:13:27 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1045.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 31 May 2019 08:32:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to IoT M5Cam Project - problems porting code on Fri, 31 May 2019 12:04:58 GMT]]></title><description><![CDATA[<p dir="auto">Guess what? I hit another wall.</p>
<p dir="auto">It seems the camera is giving trouble, despite me configuring the pins as here:<br />
<img src="https://camo.githubusercontent.com/52bae30bf9fcea048318f841481ad7b88db9f499/68747470733a2f2f6d35737461636b2e6f73732d636e2d7368656e7a68656e2e616c6979756e63732e636f6d2f696d6167652f6d352d646f63735f7461626c652f63616d6572615f636f6d70617269736f6e2f43616d65726150696e436f6d70617269736f6e5f656e2e706e67" alt="here" class=" img-fluid img-markdown" /></p>
<p dir="auto">E (218) camera: Camera probe failed with error 0x20001<br />
ESP_ERROR_CHECK failed: esp_err_t 0x20001 (ERROR) at 0x4008a228<br />
0x4008a228: _esp_error_check_failed at /home/marta/esp/esp-idf/components/esp32/panic.c:721</p>
<p dir="auto">file: "/home/marta/Arduino/esp32-cam-ai-thinker/examples/google_storage/main/main.c" line 195<br />
func: app_main<br />
expression: esp_camera_init(&amp;camera_config)</p>
<pre><code>config XCLK_FREQ
  int "XCLK Frequency"
  default "20000000"
  help
      The XCLK Frequency in Herz.

menu "Pin Configuration"
    config D0
        int "D0"
        default "32"
    config D1
        int "D1"
        default "35"
    config D2
        int "D2"
        default "34"
    config D3
        int "D3"
        default "5"
    config D4
        int "D4"
        default "39"
    config D5
        int "D5"
        default "18"
    config D6
        int "D6"
        default "36"
    config D7
        int "D7"
        default "19"
    config XCLK
        int "XCLK"
        default "27"
    config PCLK
        int "PCLK"
        default "21"
    config VSYNC
        int "VSYNC"
        default "25"
    config HREF
        int "HREF"
        default "26"
    config SDA
        int "SDA"
        default "4"
    config SCL
        int "SCL"
        default "13"
    config RESET
        int "RESET"
        default "15"
endmenu
</code></pre>
]]></description><link>https://community.m5stack.com/post/4493</link><guid isPermaLink="true">https://community.m5stack.com/post/4493</guid><dc:creator><![CDATA[MartaRho]]></dc:creator><pubDate>Fri, 31 May 2019 12:04:58 GMT</pubDate></item><item><title><![CDATA[Reply to IoT M5Cam Project - problems porting code on Fri, 31 May 2019 10:22:43 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/heybin" aria-label="Profile: heybin">@<bdi>heybin</bdi></a> ! That worked well (and it was surprisingly easy :) )</p>
<p dir="auto">Now I gotta fix some new problems...</p>
<p dir="auto">Stack smashing protect failure!</p>
<p dir="auto">abort() was called at PC 0x400d645d on core 0<br />
0x400d645d: __stack_chk_fail at /home/marta/esp/esp-idf/components/esp_common/src/stack_check.c:36</p>
<p dir="auto">Edit: Nevermind, i just needed to change the stack protection level from overall to normal. :)</p>
]]></description><link>https://community.m5stack.com/post/4492</link><guid isPermaLink="true">https://community.m5stack.com/post/4492</guid><dc:creator><![CDATA[MartaRho]]></dc:creator><pubDate>Fri, 31 May 2019 10:22:43 GMT</pubDate></item><item><title><![CDATA[Reply to IoT M5Cam Project - problems porting code on Fri, 31 May 2019 08:44:14 GMT]]></title><description><![CDATA[<p dir="auto">please choose psram size to 4MB<img src="/assets/uploads/files/1559292248275-bcc73ad7-e101-43f8-b252-3361553b63a6-image-resized.png" alt="0_1559292247701_bcc73ad7-e101-43f8-b252-3361553b63a6-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/4488</link><guid isPermaLink="true">https://community.m5stack.com/post/4488</guid><dc:creator><![CDATA[heybin]]></dc:creator><pubDate>Fri, 31 May 2019 08:44:14 GMT</pubDate></item></channel></rss>