This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Related Fds update while taking data from sensor

Hi,

I am getting data from sensor and want to replace some new data with the older one in flash using fds. Right now,firstly i will write into flash by using one different example,and then using the flash data, i will perform some action,and later this action will give me some result(is an array) which i have to update to flash.

       For updating new data to flash i am doing: 
      finding the older data with FILE_ID and REC_KEY ,if found then delete the record and then fds_record_write.

mostly i have to write with the same FILE_ID and REC_KEY as i have to read with the same.

ISSUE: while doing clear flash,programming s130,programming other example having fds_record_write it is working fine. But in my working code it is just deleting the item not writing or updating it.

in one case i have used :if data found not to delete but using fds_record_update i tried to update it but no success with this also. Any suggestion will be helpful, i am stucked with it.

Parents
  • Hi, Today i tested my code again and found that i was reading form flash before the write event is completed. So previous issue is handled,But.
    Some Other issue occured earlier i am having a 300 byte,a 420 bytes of array stored in flash,now i am updating these array with 360 bytes. in fds_event_handler in the case FDS_EVT_WRITE i am reading flash again. it shows only 300 bytes are written other 60 bytes are not written,i case of updating 1st array. in case of updating 2nd array it stuck.

    I am unable to properly handle fds_write event properly. Any help would be appreciated.

Reply
  • Hi, Today i tested my code again and found that i was reading form flash before the write event is completed. So previous issue is handled,But.
    Some Other issue occured earlier i am having a 300 byte,a 420 bytes of array stored in flash,now i am updating these array with 360 bytes. in fds_event_handler in the case FDS_EVT_WRITE i am reading flash again. it shows only 300 bytes are written other 60 bytes are not written,i case of updating 1st array. in case of updating 2nd array it stuck.

    I am unable to properly handle fds_write event properly. Any help would be appreciated.

Children
Related