Part Number: MSP432P401R
Hello
I'm going to explain what i have and what i want to do.
Right now, I'm doing a multiple sampling data using 12 ADC channels. 3 channels for sensors, so i have 4 independents tasks for each sensors, becuase i set the sample time using the (Task_Sleep) function, so i get new data every task_sleep time i set for each one task.
/* VIBRATION TASK */ //Example of 1 of the 4 task void vibWork(void) { if (start == 1) { vxc = ADC14_getResult(ADC_MEM0); vyc = ADC14_getResult(ADC_MEM1); vzc = ADC14_getResult(ADC_MEM3); ADC14_toggleConversionTrigger(); } } void vibTaskFunc(UArg arg0, UArg arg1) { while (1) { vibWork(); Task_sleep((freqgvibracion * 1000) * (1000 / Clock_tickPeriod)); //Periodic task } }
The sample time of the taks are 1ms , 2ms, 4ms, etc.. So i cannot save the the value of ADC inside the task because the its take about 13ms to save one value (convert the int to string, then write (f_write) on SD).
so i need another way to save the data on SD and keep getting new data over ADC, maybe make another task for save the data on the SD card. i dont know how
Can you help me please?
Thanks in advance