<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class="">New 3.1 hardware is looking very good.</div><div class=""><br class=""></div><div class="">To recap: Unable to get WROOM32 modules with more than the standard 4MB flash on-board, 3.0 used an external 16MB flash chip. That worked well (in the end), but was a pain to get right. RAM was also tight, so we wanted to make sure we had room for expansion and change to a WROVER module (same as WROOM32, but with an extra 4MB flash RAM). When we tried to move the same approach to the 3.1 hardware using WROVER modules, we couldn’t get it to work. The change from 3.3v to 1.8v caused issues, but worse the Espressif IDF just didn’t support the combination of external flash and PSRAM. So, we hand-modified some WROVER modules to swap 4MB->16MB flash chip, as well as sourced a supplier of WROVER modules with 16MB flash on-board. These are now working well.</div><div class=""><br class=""></div><div class="">I can now switch to QIO mode (which should speed things up). Previously, we had to use DIO mode (with external flash). After setting the menuconfig for that, here is what the boot loader tells us:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (30) boot: ESP-IDF v3.1-dev-391-g8d8d62da 2nd stage bootloader</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (30) boot: compile time 16:24:20</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (43) boot: Enabling RNG early entropy source...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (44) qio_mode: Enabling default flash chip QIO</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (44) boot: SPI Speed : 40MHz</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (47) boot: SPI Mode : QIO</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (51) boot: SPI Flash Size : 16MB</span></font></div></div></blockquote><div class=""><br class=""></div><div class="">In theory, we can go to 80MHz, but the forums have lots of comments about how tight that is on timing so we are going to stay at 40MHz.</div><div class=""><br class=""></div><div class="">SPI RAM gets initialised just fine:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (743) spiram: SPI RAM mode: flash 40m sram 40m</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (747) spiram: PSRAM initialized, cache is in low/high (2-core) mode.</span></font></div></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (1656) spiram: SPI SRAM memory test OK<br class="">I (1656) heap_init: Initializing. RAM available for dynamic allocation:<br class="">I (1656) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM<br class="">I (1663) heap_init: At 3FFBC198 len 00023E68 (143 KiB): DRAM<br class="">I (1669) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM<br class="">I (1675) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM<br class="">I (1683) heap_init: At 40099404 len 00006BFC (26 KiB): IRAM<br class="">...<br class="">I (1693) spiram: Adding pool of 4096K of external SPI memory to heap allocator</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > module memory<br class="">Free 8-bit 119128/282436, 32-bit 424/27596, SPIRAM 4193928/4194252<br class="">--Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM<br class="">tiT 0 0 0 128 +0 +0 +0 +128<br class="">Housekeeping 40564 5120 0 12 +40564 +5120 +0 +12<br class="">no task 5348 0 0 0 +5348 +0 +0 +0<br class="">esp_timer 52328 0 644 0 +52328 +0 +644 +0<br class="">main 16448 0 0 0 +16448 +0 +0 +0<br class="">ipc0 11096 0 0 0 +11096 +0 +0 +0<br class="">ipc1 12 0 0 0 +12 +0 +0 +0<br class="">Tmr Svc 884 6444 0 0 +884 +6444 +0 +0<br class="">AsyncConsole 108 0 26404 0 +108 +0 +26404 +0</span></font></div></blockquote><div class=""><br class=""></div><div class="">SD CARD works well:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (1004) sdcard: SD CARD has been inserted. Auto-mounting...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (1004) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0</span></font></div></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > test sdcard</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD test starts...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 0/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 128/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 256/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 384/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 512/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 640/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 768/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 896/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 1024/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 1152/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 1280/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 1408/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 1536/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 1664/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 1792/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD written 1920/2048</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Cleaning up</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">SD CARD test completes</span></font></div></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > vfs ls /sd</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">component.mk</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">sd_card_example_main.c</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">log.txt</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">FOO.TXT</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">stubby</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">ovms3.done</span></font></div></div></blockquote><div class=""><br class=""></div><div class="">Putting an ovms3.bin into the root directory of the SD card, and rebooting, even has the desired affect of an OTA update:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (1015) sdcard: SD CARD has been inserted. Auto-mounting...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">I (1015) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">W (1095) ota: AutoFlashSD Current running partition is: factory</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">W (1095) ota: AutoFlashSD Target partition is: ota_0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">W (1095) ota: AutoFlashSD Source image is 1582464 bytes in size</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">W (1095) ota: AutoFlashSD Preparing flash partition...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">W (9315) ota: AutoFlashSD Flashing image partition...</span></font></div><div class=""><span style="font-size: 14px; font-family: 'Andale Mono';" class="">W (18275) ota: AutoFlashSD Setting boot partition...</span></div><div class=""><span style="font-size: 14px; font-family: 'Andale Mono';" class="">W (19215) ota: AutoFlashSD unmounting SD CARD</span></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">W (19215) ota: AutoFlashSD OTA flash successful: Flashed 1582464 bytes, and booting from ‘ota_0'</span></font></div></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">rst:0xc (SW_CPU_RESET),boot:0x3b (SPI_FAST_FLASH_BOOT)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > ota status</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Firmware: 3.0.0/ota_0/main build (idf v3.1-dev-217-g5bf85d06) Jan 16 2018 08:03:11</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Running partition: ota_0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Boot partition: ota_0</span></font></div></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > metrics list m.version</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">m.version 3.0.0/ota_0/main build (idf v3.1-dev-217-g5bf85d06) Jan 16 2018 08:03:11</span></font></div></div></blockquote><div class=""><br class=""></div><div class="">CAN buses:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > can can1 start active 1000000</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Can bus can1 started in mode active at speed 1000000Kbps</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > can can2 start active 1000000</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Can bus can2 started in mode active at speed 1000000Kbps</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > can can3 start active 1000000</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Can bus can3 started in mode active at speed 1000000Kbps</span></font></div><div class=""><br class=""></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > can log trace</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">CAN logging active: Type:trace; Path:''; Filter:off; Vehicle:;</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Note: info logging is done at log level debug, frame logging at verbose</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><span style="font-size: 14px; font-family: 'Andale Mono';" class="">OVMS > log level verbose</span></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Logging level for * set to verbose</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><span style="font-size: 14px; font-family: 'Andale Mono';" class="">OVMS > can can3 tx standard 100 01 02 03 04</span></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">V (1478305) canlog: TX can3 id 100 len 4: 01 02 03 04 | ....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">V (1478305) canlog: RX can1 id 100 len 4: 01 02 03 04 | ....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">V (1478305) canlog: RX can2 id 100 len 4: 01 02 03 04 | ….</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > can can2 tx standard 100 01 02 03 04<br class="">V (1598675) canlog: TX can2 id 100 len 4: 01 02 03 04 | ....<br class="">V (1598675) canlog: RX can1 id 100 len 4: 01 02 03 04 | ....</span></font></div><div class=""><br class=""></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > can can1 tx standard 100 01 02 03 04</span><br class=""><span style="font-size: 14px;" class="">V (1688155) canlog: TX can1 id 100 len 4: 01 02 03 04 | ....</span><br class=""><span style="font-size: 14px;" class="">V (1688155) canlog: RX can2 id 100 len 4: 01 02 03 04 | ….</span></font></div><div class=""><br class=""></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">OVMS > can can3 tx extended 100 01 02 03 04 05 06 07 08<br class="">V (1716925) canlog: TX can3 id 00000100 len 8: 01 02 03 04 05 06 07 08 | ........<br class="">V (1716925) canlog: RX can1 id 00000100 len 8: 01 02 03 04 05 06 07 08 | ........<br class="">V (1716925) canlog: RX can2 id 00000100 len 8: 01 02 03 04 05 06 07 08 | ........</span></font></div></blockquote><div class=""><br class=""></div>Seems to be a problem with receiving on CAN3. Doesn’t really make sense, as it can transmit. I’ll look into this.<div class=""><br class=""></div><div class="">Still a few things to check, but it seems we are ok for 3.1 production.</div><div class=""><br class=""></div><div class="">Now on to the SPI RAM support. Planning a base class that can be derived from. Objects there will be allocated from SPI RAM as highest priority (but normal RAM for 3.0 hardware without SPI RAM).</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""></div></body></html>