[Ovmsdev] SPI RAM

Michael Balzer dexter at expeedo.de
Thu May 17 15:45:42 HKT 2018


Looks good, no problems up to now.

I've been building with SPIMEM_AGGRESSIVE before using the 3.1 defaults.

With the two new bluetooth memory options enabled…

    CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=y
    CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY=y

…I now get this bluetooth memory footprint:

    OVMS# power bluetooth status
    Power for bluetooth is off

    OVMS# module memory
    Free 8-bit 66336/230084, 32-bit 232/376, SPIRAM 4045440/4194252

    OVMS# power bluetooth on    
    Power mode of bluetooth is now on
    I (140846) bluetooth: Powering bluetooth on...
    I (140906) BTDM_INIT: BT controller compile version [a4252a2]|
    I (140956) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
    E (141186) BT: bta_gattc_co_cache_addr_init, Line = 334, nvs flash get blob data fail, err_code = 1102
    I (141236) bluetooth: Reg app succeeded with inteface ID 3
    D (141286) bluetooth: event = 0|
    D (141336) bluetooth: GAP_EVT, event 22|
    D (141386) bluetooth: GAP_EVT, event 0|
    D (141446) bluetooth: GAP_EVT, event 1|
    D (141506) bluetooth: GAP_EVT, event 6|
    I (141546) bluetooth: advertising start success

    OVMS# module memory
    Free 8-bit 37824/230084, 32-bit 232/376, SPIRAM 4018840/4194252
    --Task--     Total DRAM D/IRAM   IRAM SPIRAM   +/- DRAM D/IRAM   IRAM SPIRAM
    tiT                 464    664      0   7980         +0     +0     +0     +4
    OVMS NetMan           4  14712    100  32248         +0  +9968     +0    +20
    btController          0     88      0      0         +0    +88     +0     +0
    Btc_task              0  14924      0   1304         +0 +14924     +0  +1304
    btuT                  0   2252      0  23492         +0  +2252     +0 +23492

    OVMS# module memory
    Free 8-bit 37556/230084, 32-bit 232/376, SPIRAM 4017244/4194252
    --Task--     Total DRAM D/IRAM   IRAM SPIRAM   +/- DRAM D/IRAM   IRAM SPIRAM
    tiT                 464    912      0   7980         +0   +248     +0     +0
    wifi               1568     64      0   3748         +0     +0     +0  -1732

    OVMS# power bluetooth off
    Power mode of bluetooth is now off
    I (184576) bluetooth: Powering bluetooth off...
    E (184626) BT: bta_dm_disable BTA_DISABLE_DELAY set to 200 ms
    D (184626) bluetooth: event = 6|
    I (191606) ovms-server-v2: Send MP-0 S0,K,0,0,,storage,29,50,0,0,0,0,0,0,1,0,0,0,96.59,124,91,0,95,-1,0,0,0,-1,91,58,0,0.00,0.00,0
    I (191656) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,191,0,0,1,0,12.9,0,13.14,0,0,0
    I (191706) ovms-server-v2: Send MP-0 L51.302567,7.390008,223.4,339.7,1,1,0,10002,0,0.0,0.0
    D (192626) simcom: rx line ch=3 len=10  : +CREG: 1,1
    D (192676) simcom: rx line ch=3 len=26  : +CCLK: "80/01/23,09:12:28"
    D (192736) simcom: rx line ch=3 len=10  : +CSQ: 5,99
    D (192786) simcom: rx line ch=3 len=23  : +COPS: 0,0,"congstar",2
    D (192836) simcom: rx line ch=3 len=2   : OK

    OVMS# module memory
    Free 8-bit 61684/230084, 32-bit 232/376, SPIRAM 4045296/4194252
    --Task--     Total DRAM D/IRAM   IRAM SPIRAM   +/- DRAM D/IRAM   IRAM SPIRAM
    main*             12516      0      0   6348       -128     +0     +0     +0
    Btc_task*             0    128      0      0         +0 -14796     +0  -1304
    btuT*                 0     20      0      0         +0  -2232     +0 -23492
    tiT                 464    664      0   6420         +0   -248     +0  -1560
    wifi               1568     64      0   3788         +0     +0     +0    +40
    OVMS NetMan           4   9296    100  32248         +0  -5416     +0     +0
    btController          0      0      0      0         +0    -88     +0     +0


Better, but it still needs a lot (too much) of internal RAM.

Btw, I needed to change the signature of the xt_error_handler_callback to build with bluetooth enabled on the current esp-idf.

I'll push that change to our esp-idf.

Regards,
Michael


Am 16.05.2018 um 05:10 schrieb Mark Webb-Johnson:
> I’m doing some work on optimising RAM usage in OVMS v3.1. This is to try to make space for bluetooth, etc.
>
> First step is fixing the (broken) SPIMEM_AGGRESSIVE option to work better. Saving is worthwhile:
>
>     Without aggressive:
>     Free 8-bit 113116/281672, 32-bit 8020/24276, SPIRAM 4140964/4194252
>
>     With aggressive:
>     Free 8-bit 137380/281640, 32-bit 8020/24276, SPIRAM 4108616/4194252
>
>
> That is the first step only. We are still using far too much internal RAM, and almost the whole 4MB of external RAM is sitting idle.
>
> The reason for this eMail: Hopefully I didn’t break anything. If I did, let me know.
>
> Regards, Mark.
>
>> Begin forwarded message:
>>
>> *From: *GitHub <noreply at github.com <mailto:noreply at github.com>>
>> *Subject: **[openvehicles/Open-Vehicle-Monitoring-System-3] 2816b9: Support minimal build (all components disabled) - ...*
>> *Date: *16 May 2018 at 10:13:49 AM HKT
>> *To: *mark at webb-johnson.net <mailto:mark at webb-johnson.net>
>> *Reply-To: *GitHub <noreply at github.com <mailto:noreply at github.com>>
>>
>> Commit: 23f307757abb6411f77500182b72b11417019317
>>      https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/23f307757abb6411f77500182b72b11417019317
>>  Author: Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>>
>>  Date:   2018-05-16 (Wed, 16 May 2018)
>>
>>  Changed paths:
>>    M vehicle/OVMS.V3/main/ovms.cpp
>>    M vehicle/OVMS.V3/main/ovms.h
>>
>>  Log Message:
>>  -----------
>>  Correct implementation of CONFIG_OVMS_HW_SPIMEM_AGGRESSIVE.
>
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180517/40c3af78/attachment.htm>


More information about the OvmsDev mailing list