I certainly don't want to spend a lot of time figuring-out how to use an RTOS unless I am sure it will solve the problem and I can implement (port?) the rest of my project without too much fuss. I do recall you extolling the virtues of an RTOS such as ChibiOS in another thread - I may explore that avenue but I'm an old dog that doesn't learn new tricks so fast. Fortunately nobody is standing on one foot and holding their breath for this project Yes, I can make the buffer(s) larger but Teens圓.6 doesn't have enough RAM to bridge hundreds of milliseconds when the SD takes a little time out for housekeeping. At the outset of this project I mistook the benchmarks (~20MB/sec) as sustainable rates (my "bad"). From there I copy to a transfer buffer which I then hand off to SdFat. I am writing to a circular buffer from a fast (per 4-byte sample) IRQ "honed" to run in <1usec. It supports 1.8V modes with SDR104 mode having a bus clock of 208 MHz and a transfer rate of 104 MB/sec. New problems are also possible.Įdit: The new STM32H7 has an entirely new SD controller. Maybe a new series will have old problems fixed. The 400MHz version will soon be available on a Nucleo board for $23 and a 600 MHz may follow. I plan on trying the new STM32H7 M7 chips soon. Modern high end SD cards have 512 KiB RUs (Record Units) and 4 MIB AUs (Allocation Units) so the problems only became apparent recently. There are problems with lots of other Cortex M chips. "Erroneous CMD CRC error and CMD Index error may occur on sending new CMD during data transfer" can also be a problem. The key ones that stop me are "Does not support Infinite Block Transfer Mode", "AutoCMD12 and R1b polling problem", "Software can not clear DMA interrupt status bit after read operation". The STM32F7 line, Cortex M7, can reach 7.2 MSPS in Interleaved mode.Į3981 SDHC: ADMA fails when data length in the last descriptor is less or equal to 4 bytesĮ3982 SDHC: ADMA transfer error when the block size is not a multiple of fourĮ4624 SDHC: AutoCMD12 and R1b polling problemĮ3977 SDHC: Does not support Infinite Block Transfer ModeĮ4627 SDHC: Erroneous CMD CRC error and CMD Index error may occur on sending new CMD during dataĮ3984 SDHC: eSDHC misses SDIO interrupt when CINT is disabledĮ3983 SDHC: Problem when ADMA2 last descriptor is LINK or NOPĮ3978 SDHC: Software can not clear DMA interrupt status bit after read operation The STM32 ADC allows a sequence of up to 18 channels to be loaded into the ADC's sequencer. I use two 512 byte buffers and copy them to a FIFO to be written in a lower priority thread. The RTOS itself is just a toolbox that offers you the required tools for creating a realtime system, you can use the tools correctly or in the wrong way.Īnother option is DMA, I used DMA on STM32 with a "circular buffer" STM32 really just uses two buffers and alternates between the two. While efficiency is a positive attribute of an RTOS, efficiency alone does not qualifies an OS as RTOS but it could separate a good RTOS from a not so good one.Īn RTOS is not a magic wand, your system will not be “realtime” just because you are using an RTOS, what matters is your system design. RTOS are often confused with “fast” operating systems. It is the quality of being able to consistently produce the same results under the same conditions. It is the quality of being predictable in the scheduling behavior. The fundamental qualities of an RTOS are: Even with 128KiB clusters, it represents 512MiB.Īn RTOS is an operating system whose internal processes are guaranteed to be compliant with (hard or soft) realtime requirements. The bitmap cache allows 4096 clusters per sector to be allocated without access to the SD. The bitmap cache buys lots of performance when writes are not on sector boundaries and space has not been pre-allocated. I need to add a separate cache for the bitmap and maybe one for the FAT. My to-do list has a few other high priority items. I think I have an idea how to fix it and it is my highest priority. Thanks for finding the typo in seekCur(), I will fix it today.Ĭhdir() is missing because my first version had a design problem, not just a bug so I deleted it. Had a look through the various headers but could find no mention/method of how to set the current working directory.Īlso I noticed FsFile::seekcur() as opposed to seekCur(), not sure if this is intended or not. It might require specific hardware features that may be available only on some boards.Just been checking this out but something I use which seems to be missing, and without any mention within the source, is chdir(). Note: while the library is supposed to compile correctly on these architectures, The primary design goals are: Easy to use, Small footprint, Robust. FreeRTOS Real Time Operating System implemented for AVR (Uno, Nano, Leonardo, Mega).
0 Comments
Leave a Reply. |