Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sometime fds_gc() does not call the user handler.

Hi,

I use the FDS on our project firmware.
The firmware saves some configurations to FDS at shutdown and the factory reset.
At this time, sometime fds_gc() does not call the user handler. (freq = 3/100)

Are there some known bugs?
or
Do you know any informations?

environment:
- SDK15
- nRF52840
- use Softdevice (use peer manager)
- FDS_VIRTUAL_PAGES 5
- FDS_VIRTUAL_PAGE_SIZE 1024
- FDS_BACKEND 2
- FDS_OP_QUEUE_SIZE 8
- FDS_CRC_CHECK_ON_READ 0
- FDS_CRC_CHECK_ON_WRITE 0
- FDS_MAX_USERS 8
- NRF_FSTORAGE_PARAM_CHECK_DISABLED 0
- NRF_FSTORAGE_SD_QUEUE_SIZE 4
- NRF_FSTORAGE_SD_MAX_RETRIES 8
- NRF_FSTORAGE_SD_MAX_WRITE_SIZE 4096

Parents Reply Children
  • Hi,

    Yes, I know the meaning of NRF_ERROR_BUSY.
    My experiment is below.

    1. our firmware calls fds_gc.
    2. fds_gc calls some fstorage APIs.
                             :
    3. fds_gc calls sd_flash_write.
    4. no event and no call user handler.
    5. check timeout.
    6. if timeout is detected, f/w calls event handler itself.
    7. fds_gc goes to next step.
    8. fds_gc calls some sd APIs (sd_flash_write...)
    9. sd_flash_write return NRF_ERROR_BUSY.

    1 ~ 4, 7 ~ 9 = original SDK code
    5, 6, = added my experiment code

    This result means that sd_flash_write of No 3 have not complete.

    Thanks,

  • Hello,

    From my understand you have also been in contact with my colleague Zou-san. We are not able to recreate your issue at the moment. 

    We will need a (simplified test) project from you that we can run on a nRF52840-DK to recreate your issue here, can you please arrange that for us?

    Our FreeRTOS expert is back on Monday, he can look at your project then. Also please send us your system_nrf52.c file in your project so we can check that you have a workaround for errata_108().

    Best regards,
    Kenneth

  • Hi,

    I checked modules/nrfx/mdk/system_nrf52.c,
    and I found the workaround code of errata 108.

    if (errata_108()){
        *(volatile uint32_t *)0x40000EE4 = *(volatile uint32_t *)0x10000258 & 0x0000004F;
    }

    And we are discussing Zou-san.
    We are trying to reproduce it at simple projects.

    Thanks,

Related