Interrupt based writing on SD card uisng FATFs?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interrupt based writing on SD card uisng FATFs?

1,157 Views
Amit_Kumar1
Senior Contributor II

Hi

I am using K60 connected with SD card and using FATfs library present in Processor Expert. I want to write to file as the interrupt is triggered in Event.c. but I am having problem in writing to the file in different functions.

regards

Amit Kumar

Tags (5)
2 Replies

678 Views
Petr_H
NXP Employee
NXP Employee

Hi,

I'm not sure if I inderstand but I think that calling file methods in interrupt context is not a good idea. You should just set some flag and handle that in the main loop (or task). Is this what you meant?

Best regards

Petr Hradsky

Processor Expert Support Team

678 Views
Amit_Kumar1
Senior Contributor II

Hi

Actually I am having various sensors which is sending data at around 100Hz which is time stamped so for different sensors I wanted to have separate files with time stamped so for higher accuracy I wanted it be interrupt based in ISR function. By Flag Sometimes I am getting delays and it is not in specifications with time stamp. Also when I dump the flash buffer to the SD card i.e using FSYNC function it takes around 20 ms to to write it to fie So I wanted this also to happen ones in some time duration in ISR. right now I am doing using flag from ISR. so the function fsync is not working in the ISR.

Regards

Amit Kumar 

0 Kudos
Reply