0

FDS not able to write in SDK 14

chrismakaio gravatar image

asked 2017-12-07 10:26:45 +0100

Dear all,

I'm struggling writing 32 bytes with FDS in SDK 14.

This is what I do:

Init

(void) fds_register(fds_evt_handler);
fds_init();
while(!is_init) {
    sd_app_evt_wait();
}

Write

fds_record_t        record;
fds_record_desc_t   record_desc = {0};

record.file_id              = FILE_ID;
record.key                  = key;
record.data.p_data        = data;
record.data.length_words      =  (length+3)/ sizeof(uint32_t);
fds_record_write(&record_desc, &record);

I do see that the header is written and on next startup fds_stat returns one more dirty record, but fds_evt_handler is never called with FDS_EVT_WRITE. It is called with FDS_EVT_INIT though, so it seems to basically work. I've read in other posts (mostly concerning older SDKs) that one should check that a soc_evt_handler forwards events to fds_evt_handler, but after

NRF_SDH_SOC_OBSERVER(m_soc_observer, APP_SOC_OBSERVER_PRIO, soc_evt_handler, NULL);

soc_evt_handler is never called.

Any help?

edit retag flag offensive close delete report spam

1 answer

Sort by ยป oldest newest most voted
0
chrismakaio gravatar image

answered 2017-12-07 12:34:23 +0100

alright, it seems like nrf-sdh_soc.c gets killed by optimization. I fixed that by adding a blank nrf_sdh_soc_init and call it from my main.

edit flag offensive delete publish link more

Comments

Thanks for adding an answer :)

Petter Myhre ( 2017-12-07 13:31:50 +0100 )editconvert to answer

Sure! Is this considered a bug which will be fixed or is it intended by design?

Chris ( 2017-12-08 09:49:01 +0100 )editconvert to answer

Sounds like a bug, I need to look into it. Could you upload your complete project so I can try to reproduce here? Which toolchain are you using?

Petter Myhre ( 2017-12-14 12:39:32 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-12-07 10:26:45 +0100

Seen: 36 times

Last updated: des. 07