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

nrf_atfifo

Hi,

I am using nrf_fstorage_sd which uses nrf_atfifo. I would like to know what it is max usage of m_fifo queue so I can set lowest NRF_FSTORAGE_SD_QUEUE_SIZE value. I figured way to determine usage length but it is always 1 or 2 so I am wondering if I am doing it correctly. In nrf_fstorage_sd in "write" and "erase" functions after nrf_atfifo_item_put I print value: 

(m_fifo->head.pos.wr - m_fifo->tail.pos.wr)/28

where 28 is size of object. Is this correct way to print usage? If I see that printed values are only 1 and 2 then I can set NRF_FSTORAGE_SD_QUEUE_SIZE to 2 ??

Regards,

Michał

Related