SD Card Logging Memory Limitation: SD Card logging allocates
static memory for all the signal that is logged. The memory allocated is based on the
type of logging i.e.
Sample Time, Model stop
time, Decimation and
Limit data points to last. Since
the RAM size for C2000 processors is limited, there are chances of memory allocation
failure when SD card logging is enabled. See Enable
MAT-File Logging .
Data memory allocation failure when SD card logging is enabled
Try the following steps, in case of data memory allocation failure:
Select lower value for
Limit data points to last
. Lower value can result in smaller static memory
Set the logging type as
Array instead of
structure or structure with time.
Reduce the number of signals that can be logged in the model
Reduce the sample rate for logging either by using rate
transition blocks or
Code memory allocation failure
Code memory allocation fails when the SD Card feature and the algorithm together is generating code bigger than the allocated code memory. This can happen for the processors with low RAM memory like F280x, F2803x, F2805x, F2833x and Concerto (35x and 36x).
Try the following steps in case of code memory failure:
Boot From Flash option for the
Reduce the size of the model there by reducing the code generated
SD Card Logging Connection Limitation: SD card logging uses SPI (Serial Peripheral Interface) to send the data between processor and memory. The data logging will be affected based on the SPI connections and SPI parameter settings. Very few control cards offer dedicated SD card logging slots (like F2837xD) to place the SD card. You have to use external SD card module to log data for other control card.
If the signals are not logging on SD card, try the following steps:
Ensure proper SPI module is selected for SD card logging
If you are using the external SD card interface, ensure the connections
SPIMO, SOMI, CLK and
STE pins are
Ensure correct supply and ground is connected for the external SD card interface
Ensure the GPIO pins configurations for the selected SPI_x module in configuration parameters are correct
Start with lower baud rate for SPI. Change the SPI baud rate setting in
Configuration parameters to
Inherit from SPI settings and
start with low value like 1000000 MHz (Desired baud rate in bits per sec in
Ensure that you are not using the GPIO pins and the SPI module dedicated to SD card with other peripherals . This will cause conflict and the logging will fail