Hello,
My project is using the following setup:
Xilinx Zynq XC7Z030-xFFG676x SoC - 1Gb DDR3
FreeRTOS port from Xilinx
FreeRTOS+TCP
FreeRTOS+FAT
64GB eMMC
The project, in its essence, is a data logger. It is running an FTP server that is used to send the log and debug files to a control device. Based on a couple of other threads that I read, I decided to implement the log storage in the following way:
- On boot, the eMMC is initialised and a log file of a fixed size (1MB) is created and filled with 0s and left open.
- Every time an event is to be logged, it is written to a buffer of size 1024b. Once this buffer is full, it is written to the open file and is flushed. Once the file is full, it is closed, and a new file is created, filled with 0s, and the process is repeated.
My problem is that it takes about 10s for a new 1MB file to get created and filled with 0s. Is there any way this can be sped up? The eMMC has 8 data channels but we are only using 4. I believe that even with the 4 channels, the speed should be much higher than what I am seeing. Not quite sure why it is so slow.
Regarding concurrency, will there be any concurrency problems if I have 2 threads that are writing to two separate files and have an FTP server running at the same time? Like I said before, a 1MB write takes about 10s. I tried doing an FTP RETR command while this write was going on and I noticed that the FTP server didn’t respond until the write was complete, which gives me faith that a write cannot get interrupted.
At the end of the day, all access to the eMMC is going through the FreeRTOS+FAT library. Until now, I have assumed that +FAT takes care of all concurrency but would like to get some confirmation about this.
Thank you,
Sid