Log to nrf52 thingy internal flash

I am working on a prototype using the nRF Connect SDK v2.1.0 on the nRF52 Thingy platform.

For my prototype, I need to store normal log output on the internal flash of the nRF52 Thingy in FAT format. The reason behind this is: I will put my Thingys in a testing environment to collect data. After some days, I want to collect the Thingys and read the log data via USB.

What is the best way to implement that?

I have been trying the https://docs.zephyrproject.org/latest/samples/subsys/usb/mass/README.html#fat-fs-example, but the FLASH configuration does not work (not on the Thingy and not on the nRF52840DK platform).

Best regards,

Michael

Parents
  • Hello Michael

    I tried running buildining the sample \zephyr\samples\subsys\usb\mass in NCS v2.1.0 and flashing it to the nRF52840DK v3.0.0 but did not encounter the issue you did.

    I got the following RTT output:

    [00:00:00.255,645] <inf> main: No file system selected
    [00:00:00.255,737] <inf> main: The device is put in USB mass storage mode.

    and the following serial output:

    *** Booting Zephyr OS build v3.1.99-ncs1  ***
    [00:00:00.255,645] <inf> main: No file system selected
    [00:00:00.255,737] <inf> main: The device is put in USB mass storage mode.
    

    Try running nrfjprog --qspieraseall first, and program the USB Mass sample again.

    Best regards,

    Simon

  • Hi Simon, 

    Thank you for your fast reply. As far as I can tell, you run the sample without specifying a file system. ("No file system selected" in the RTT output.

    Here is my full prj.conf content:

    CONFIG_STDOUT_CONSOLE=y
    
    #USB related configs
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
    CONFIG_LOG=y
    CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE=y
    CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
    
    CONFIG_MAIN_STACK_SIZE=1536
    
    CONFIG_APP_MSC_STORAGE_FLASH_FATFS=y

    I have executed nrfjprog --qspieraseall, but it did not solve the problem.

    Best regards,

    Michael

Reply
  • Hi Simon, 

    Thank you for your fast reply. As far as I can tell, you run the sample without specifying a file system. ("No file system selected" in the RTT output.

    Here is my full prj.conf content:

    CONFIG_STDOUT_CONSOLE=y
    
    #USB related configs
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
    CONFIG_LOG=y
    CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE=y
    CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
    
    CONFIG_MAIN_STACK_SIZE=1536
    
    CONFIG_APP_MSC_STORAGE_FLASH_FATFS=y

    I have executed nrfjprog --qspieraseall, but it did not solve the problem.

    Best regards,

    Michael

Children
Related