Page 1 of 1

memcpy not working on esp32c3

Posted: Sun Dec 07, 2025 2:02 pm
by floitsch_toit
I'm implementing an RMT encoder using the Simple Callback Encoder (https://docs.espressif.com/projects/esp ... ck-encoder).

I'm using a simple 'memcpy' to copy my data into the buffer. This seems to work fine on the ESP32, but on the ESP32C3 the data in the target isn't the same as the source.
From what I can tell, the 'symbols' buffer is directly backed by the actual hardware, so I suspect that 'memcpy' doesn't copy correctly into hardware buffers?

Is this a known issue?
I'm running on 5.4.1, and haven't yet had the time to test on a more recent SDK version. If this issue has likely been fixed, please let me know. I went through the commit logs, but didn't see anything that was relevent.

Re: memcpy not working on esp32c3

Posted: Sun Dec 07, 2025 11:19 pm
by MicroController
I suspect that 'memcpy' doesn't copy correctly into hardware buffers?
Indeed, memcpy is not suited for peripheral registers: You must use 32-bit accesses on all the registers, which memcpy most likely doesn't know.

Re: memcpy not working on esp32c3

Posted: Thu Dec 11, 2025 7:36 am
by floitsch_toit
My patch to the documentation just got merged.
https://github.com/espressif/esp-idf/pull/17993