Replies: 1 comment 1 reply
-
I checked the arduino-tx example, and it seems like I'll have better luck using a fixed payload length... trying that out. With 25 bytes, it's allocating 7760704b, so around 7.4MB. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Just like in #105, I was trying to use ggwave on a Playdate, which has 16MB of RAM, roughly half of which is available directly to the user.
While trying to set up in RX mode, I was seeing crashes. The device doesn't give me a lot of useful info about what exactly failed, but I bisected it down to this line in
GGWave::prepare
(called duringggwave_init
):Everything up to that point works fine. I added a print and it looks like
m_rx.fftWorkI
is a null pointer, which would explain the failure.In order to understand where that's coming from, I tried to understand how allocation works here, and AFAIU
this->alloc
simply computes the amount of data that needs to be allocated for the instance, but the actual allocation happens in a single spot:in
GGWave::prepare
, again. Thing is, when I printedm_heapSize
, it's equal to 17627896, which is almost 17MB - way too much for my device. This was withGGWAVE_SAMPLE_FORMAT_I16
, but when changed toGGWAVE_SAMPLE_FORMAT_I8
(as small as it can get, I think), it was calculated to 15529720. Frequency parameters didn't seem to have an effect - I first tried 48k, then 4.8k, no change.Is it correct that RX mode requires this much memory to operate? Or is there some way to tweak the config to use it with less?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions