This is probably a dead shot, but anyway... Did anyone managed to shrink FatFS sector buffer to smaller size? AFAIK there are currently two possibilities.
1. use FatFS, where sector size buffer is limited to be minimum of 512B
2. use petitFS, where accessing byte N within sector requires N-1 byte reads (not investigated this yet, but I'm suspicious that functionality as directory traversing/listing would not be possible without any buffer at all)
Rationale for my question:
- SD cards (I'm not completely sure, but...) at least to 2GB capacity should be readable by byte addressing with setting CMD16 BLOCKLEN to one byte minimum)
- from performance perspective, now I'm on a problem, that read throughput is not as necessary as latency to access data
- so, what I see is, that FatFS on sector boundary just reads whole sector to buffer, but code halts/waits for this to complete
- as this is whole 512B sector, what I see during performance profiling are halts to some miliseconds (quite nice in other applications, but...)
My idea is, to shorten sector buffer to (preferably code/compile time) definable size, thus:
- reducing latency coming from need of a read of a complete sector
- dissolve this latency to more predictable fashion over reads (better to have four 1ms stalls than one 4ms stall)
What did I had tried already
- reducing MIN_SS/MAX_SS defines to smaller value 
- replaced all "512" referencies within SD card IO module (mmr_avr????) to new size 
- code after these quite "mechanical" changes didn't work [no, I'm not surprised ;)]
Outcome of such solution
- within a small AVR without much RAM memory and in scenario using multiple files I think that smaller sector buffer is way to go to keep reasonable ratio of latency/throughput
- obviously you can't have both
So, now comes The Question:
Did anyone of you guys stepped over similar issue an has been able to solve it?
Do you have any ideas how to achieve this, or in bad case any warnings why to not try?
I could probably find a solution and nail it down to code, but on these days, any "shortcut" would be welcome.
BTW, to have an idea what is this all about, I'm working on multi MIDI files player, so there latency during playback is not welcome, not talking about accumulated latency over parsing multiple files sharing one sector buffer (multi sector buffer is not viable).