Jump to content
Seaspider1

MSP432 - Memory map prevented reading 0x1FFFFFxx

Recommended Posts

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!

Share this post


Link to post
Share on other sites

Sounds like time to read the manual.  Look at the memory map of the device and I think you'll have some insights into why you're running into problems. This is not an area where I have any other useful experience.  Of course, there's also e2e as a resource.

 

Share this post


Link to post
Share on other sites
12 hours ago, Seaspider1 said:

It seems like it would be overkill, but would it make any sense to specify the memory location/range for some or all variables individually?

Truly above my paygrade. But, I am aware that it's possible to manage memory allocation and where blocks of data get stored.

I found this on e2e, different device, but may provide some insights on memory segments and management.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×