FreeRTOS + FatFs : Works only with taskENTER_CRITICAL

tanffn wrote on Saturday, December 06, 2014:

Hi Hein, thank you again for helping me out!

To simplify it ThreadProcessing is now reduced to:

static void ThreadProcessing(void const *argument) { for( ;; ) vTaskDelay(1); }

I format the uSD before every run (f_mkfs) and it is able to write several files before it fails (from single digit to hundreds of files, the same code with the same configuration)

After doing many more tests I saw that even running the SDCardStream() task without any other task, it will fail, it just takes more time.

Been tweaking all of the configurations you mentioned and running the test in the same config several times (as it can even complete successfully (1024 files) in one test and then fail after 10 files in another run)

***The same code, with the same driver, works without the RTOS. I ran several tests of 32k files each.
I am sure its something trivial that I am missing (like Stack Overflow that you suggested)…