Search the Community
Showing results for tags 'memory allocation'.
Found 1 result
I'm currently trying to code a simple FFT program onto a MSP432P401R. An overview of the program is I import a 4096 sample time series into the program via an extern and header file. The signal then undergoes some manipulation via some code generated by MATLAB Coder for the FFT algorithm. The issue is halfway through the program, one of the calculations is trying to assign a value to a memory location outside of the SRAM_DATA region of 0x20000000 to 0x20010000. In CCS, the array has the first view values saying "Memory map prevented reading 0x1FFFFFxx" under debug. If the assignment isn't stopped beforehand, the code jumps to the Default_Handler in the startup_msp... file for an unexpected interrupt. This problem goes away when I reduce the size of the time series down to 1024 or 2048 if and only if the real part is being analyzed (with the fft code being adjusted for the input array size, of course), so it seems as if it's running out of memory locations to assign values to. However, when analyzing the 4096 program's memory usage, MAIN takes up only 22% of 262k Flash and SRAM_CODE/SRAM_DATA only take up 3% of the 65k Ram. Under stack usage, some of the functions cause the main to have an inclusive size of 164k, so I'm not sure what memory is really being used up and if I'm encountering some sort of overflow. As a beginner to microcontrollers, can someone give me a run down on Memory Allocation vs. Stack Usage, what are some indications that I'm reaching limitations in the hardware, and why it might be trying to assign values to forbidden memory locations? Also, are there any other considerations (in layman's terms) that I might need to consider if I were trying to push the limits of the controller's memory? If anyone is familiar, I've resorted to using MATLAB Coder instead of kissFFT because it had several missing header files that I couldn't find. I have at least gotten small arrays to work with the current method, so I doubt it's an error in the algorithm itself. Thanks in advance!