Skip to content

Commit

Permalink
lib/csp: Increase parameters for File Upload feature
Browse files Browse the repository at this point in the history
Currently, during File Upload, we have faced that when data packets
are missing, and LittleFS attempts to write data to an offset larger
than the current file size, a process is triggered to copy previously
written block data to a new block. This copying process can take up
to about 7 seconds.

During this time, CSP packets accumulate in the libcsp buffer without
being released, causing the application to stuck. We will investigate
the root cause of the stucking issue further, but as a workaround, we
will increase the FIFO-related settings in libcsp and th
eapplication's work queue size.

These values are provisional for testing purposes. However, even with
this commit applied, memory usage remains at around 11%.

Signed-off-by: Takuya Sasaki <takuya.sasaki@spacecubics.com>
  • Loading branch information
sasataku committed Nov 22, 2024
1 parent 55f743c commit 9ba78c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/csp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ zephyr_library_sources_ifdef(CONFIG_SC_LIB_CSP upload.c)

zephyr_include_directories(.)

set(CSP_BUFFER_COUNT 50 CACHE STRING "Number of total packet buffers")
set(CSP_QFIFO_LEN 50 CACHE STRING "Length of incoming queue for router task")
set(CSP_BUFFER_COUNT 1000 CACHE STRING "Number of total packet buffers")
set(CSP_QFIFO_LEN 1000 CACHE STRING "Length of incoming queue for router task")
zephyr_link_libraries(libcsp)
2 changes: 1 addition & 1 deletion lib/csp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ config SC_LIB_CSP_FILE_THREAD_STACK_SIZE

config SC_LIB_CSP_MAX_FILE_WORK
int "MAX number of file operation work"
default 50
default 1000
help
MAX number of file operation work.

Expand Down

0 comments on commit 9ba78c8

Please sign in to comment.