FatFs f_mkdir() fails always when not in Debug mode
I'm using FatFs on an STM32F722 with Cube V1.12. FatFs works well: I can mount, open, read, write, rename, stat, and unlink data.
But f_mkdir() fails every single time, unless I'm running in debug mode. It's exactly the same code with f_mkdir(). The error code returned is FR_DISK_ERR (1).
Alas, I cannot debug this further, because I'm then not seeing this bug.
Has anybody ever seen something like this, or can offer an explanation why debugging vs. running should have an impact on f_mkdir()? The only difference that comes to my mind is interrupts, but looking at the f_mkdir() code I'm not seeing how that should happen.
