[Ovmsdev] External Wifi antenna
Craig Leres
leres at xse.com
Mon Feb 1 02:58:26 HKT 2021
On 1/30/21 11:58 PM, Michael Balzer wrote:
> congratulations to a successful heart transplantation :-)
With the right tools it was actually pretty easy. Certainly the hand
soldering was easier than the CP2102 I swapped.
> Regarding RAM, I think you need to enable bank switching
> (CONFIG_SPIRAM_BANKSWITCH_ENABLE).
Sounds like it's a little more complicated:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/himem.html
In order to use the himem API, you have to enable it in the
menuconfig using CONFIG_SPIRAM_BANKSWITCH_ENABLE, as well as
set the amount of banks reserved for this in
CONFIG_SPIRAM_BANKSWITCH_RESERVE. This decreases the amount of
external memory allocated by functions like malloc(), but it
allows you to use the himem api to map any of the remaining
memory into the reserved banks.
> Please also disable the PSRAM bug workaround and maybe do some
> performance comparison. SPIRAM operations should run much faster without
> the workaround.
What kind of tests should I run?
I'll might wait to disable the workaround until I upgrade my other
production ovms unit.
> Forgot to explain: to fully disable the PSRAM workaround, you also need
> to modify main/component.mk:
>
> COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME)
> -Wl,--no-whole-archive -T main/ovms_boot.ld \
> -mfix-esp32-psram-cache-issue
>
> Remove the "-mfix-esp32-psram-cache-issue" here.
I did some testing and I think adding -mfix-esp32-psram-cache-issue to
COMPONENT_ADD_LDFLAGS can be driven by the
CONFIG_SPIRAM_CACHE_WORKAROUND define. I submitted a pull request to do
this (but please check my work).
Craig
More information about the OvmsDev
mailing list