How can I improve the speed of sdio mode 1 bit and 4 bit ?
I need to store atleast 20,000 samples per second to perform FFT. so I have used memory card to store all the values in sd card. currently, I could only able to store 7000 samples at a particular interval of time but not more than that. I tried with one bit sdio mode and 4 bit but of no avail.
Any hints or tips to improve the speed of sdio mode? I also tried to increase the overall frequency of the clock then too it didnt affect the performance of sdio.
in the code for my trail purpose i simply created an array. In future I will store values from ADC inputs in array. when i change the value in array to 8000 and value in for loop to 7999 nothing happens! I could only able to create a .txt file in sd card but i cannot store values.
simple code:
uint16_t array[7000],j=1;
/* USER CODE BEGIN 2 */
if(f_mount(&myFatFS, SDPath,1) == FR_OK)
{
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_12, GPIO_PIN_SET);
char myFILEName[]="TEST1.txt";
if(f_open(&myFILE, myFILEName, FA_WRITE| FA_CREATE_ALWAYS) == FR_OK)
{
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_13, GPIO_PIN_SET);
for(int i=0; i<=6999; i++)
{
array[i]=j;
j++;
}
if(f_write(&myFILE, array, sizeof(array), &myBytes)==FR_OK)
{
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_15, GPIO_PIN_SET);
}
f_close(&myFILE);
}
}
