Im using an LPC 43s67 for data logger application.
I have to collect data at 1000hz frequency and i am able to do it.
I write the data to sd card sector wise, without file system and it takes about 4ms for 512 bytes using .PFA my code snippet
Since the sd write takes 4 ms I will be missing 4 sensor read cycles.
So i wanted to open the sd card once in infinite write mode and then just pass data to the fifo, thereby consuming least time.
Original Attachment has been moved to: sd-snippet.c.zip
Solved! Go to Solution.
I have found the solution to this problem.
Once the single block write or multiple block write command is executed, then the sd controller takes care of writing the data to the sd card in a non blocking way. So our core can carry on with its execution and not wait for sd card write to complete. In this way,I am only taking about 70us to initiate the write process and move on. Compared to 4ms time taken for write to complete.
To do this, just comment the wait for response function in sdmmc_execute_command() function. I have attached the code snippet
Hi,
Thank you for your input!
Regards
Soledad
Your welcome!
I have found the solution to this problem.
Once the single block write or multiple block write command is executed, then the sd controller takes care of writing the data to the sd card in a non blocking way. So our core can carry on with its execution and not wait for sd card write to complete. In this way,I am only taking about 70us to initiate the write process and move on. Compared to 4ms time taken for write to complete.
To do this, just comment the wait for response function in sdmmc_execute_command() function. I have attached the code snippet