Search found 5 matches

by brushlesspower
Thu May 15, 2025 12:28 pm
Forum: ESP32 Arduino
Topic: SD Card write -> swapped blocks
Replies: 7
Views: 283

Re: SD Card write -> swapped blocks

i just try to read something about dual core variable access.

so everytime one of the cores is reading (or writing) to RAM_buf it have to

Code: Select all

xSemaphoreTake
and when finished

Code: Select all

xSemaphoreGive
and then it should be solved?
by brushlesspower
Thu May 15, 2025 7:23 am
Forum: ESP32 Arduino
Topic: SD Card write -> swapped blocks
Replies: 7
Views: 283

Re: SD Card write -> swapped blocks

I'am sure that there is no protection.

So you are thinking that the RAM_Buf[] is already corrupted by race condition of 2 cores?

i thought that it would be ok when using internal RAM (not PSRAM).

But would i cause a Block swap? How?
What would be the easiest way to block it?
by brushlesspower
Wed May 14, 2025 7:02 am
Forum: ESP32 Arduino
Topic: SD Card write -> swapped blocks
Replies: 7
Views: 283

Re: SD Card write -> swapped blocks

write_buf is the array which should be written to SD Card
RAM_Buf is filled by the second core with readable lines
everything uint16, that there cant be any overflow

Writecounter is the position where the RAM_Buf is filled
ReadCounter is the Position where it is saved to SD Card


#define RAMSIZE ...
by brushlesspower
Mon May 12, 2025 9:31 am
Forum: ESP32 Arduino
Topic: SD Card write -> swapped blocks
Replies: 7
Views: 283

SD Card write -> swapped blocks

Hello,

i have a random Problem.

i'am writing an array of 512 bytes (or 1024, 2048) to a SD Card in SPI Mode.
Sometimes (randomly) 2 of these Blocks are swapped

You can see the swapped blocks in the picture

https://cdn.discordapp.com/attachments/820781898577346561/1369699331720089630/grafik.png ...
by brushlesspower
Mon Nov 27, 2023 10:48 am
Forum: ESP-IDF
Topic: RMT migration to IDF 5.0
Replies: 0
Views: 1888

RMT migration to IDF 5.0

Hello,

in the past i used the RMT Peripheral for measuring a Pulse length, change this Value and transmit a new Pulse (with new Length).
All this has to be very fast and in IRAM.

Now i wanted to update everything the the actual IDF Version. But nothing is working any more.

Why i cant register a ...

Go to advanced search