AK-SDFS-UART - Is it possible to disable the CRC?

Good afternoon,
I´m using the AK-SDFD-UART on a custom ATMEGA2560 16AU (Arduino Mega) board for logging data on the SD card. Unfortunately I’ve noticed that the CPU load is always around 95% when I write data to the sd card.

Is it possible to disable the CRC?

Thank you.

Hi,

The CRC cannot be disabled.

  1. are you running on an RTOS? Otherwise please define “CPU load”.
  2. why do you think that CRC is the problem?

Hi,
thank you for your reply.

Before explaining why I thought that the CRC could be the problem, I would like to provide an overview of the system:

  • No operating system
  • around 15 functions getting data from sensors, creating log messages and saving them on the SD CARD using your module.
  • Some of these functions writes few bytes, some of them write up to 200 bytes.
  • These functions are called sequentially in the main loop.
  • Each log message is written to the SD card with a frequency of 10 Hz.
  • If I disable the logging feature, I get a CPU load of around 50%.
  • If I enable only a bunch of logging functions, the the CPU load increase slightly. The more log functions I enable, the higher becomes the CPU load.

It seems that the CPU load increase linearly with the amount of data to be written.
Since I see on the library that the CRC is calculated not only on the header but also on the data, I thought that this could be the problem.

Thank you for your support.

Ok, so it’s not CPU load the term you really mean. If you are not running an RTOS or the system does not (somehow) sleeps, then the CPU it’s said it’s running always at 100%.

I think you refer to the time the program is running in the loop() function doing nothing (profiling how much a function takes to execute).

Well, the library functions are blocking. This means that when you write to the SD the write function will wait until all the data is written and an answer is sent back. This is the only way to ensure the data sent was written.

This behavior can be changed only by changing the provided library to avoid waiting for an answer (not recommended) or check the answer asynchronously.

In any case, the CRC calculation has little impact.