Other Parts Discussed in Thread: BOOST-IR, MSP430FR4133
Hi,
I'm trying to do a project building upon the MSP430FR4133-BOOSTIR package, where the controller is able to save more than 1 set of IR signals/codes. This way, I can toggle between different sets, send/receive the corresponding IR signals, and control different home appliances.
However, this is the problem:
- FR4133 has only 16kB of FRAM, of which some is used for variables and code.
- Each set of IR codes requires:
- 2 (bytes for unsigned int) * 14 (buttons to encode) * 255 (max number of time intervals stored) = 7140 bytes!!! per set (even only 2 sets requires 14.3KB of memory)
- The example code stores the info by using a timer to receive, store and repeat the time interval between 2 "highs" & "lows" --> Q1: Is there another way to store this information and thus reduce the storage required?
Main Q: How should I "increase" the memory available for my needed storage?
I have thought of several workarounds, some of which I have tried and failed (and am thus asking for help here):
1. Move some of the program memory to RAM or Flash
This was one of the first things I tried to do - but I can't fully understand the documentations on the linker files.
- So far I've been able to move everything except my codes, constants and persistent pragmas originally in FRAM to RAM, saving a miniscule 60 bytes.
- Trying to move code to RAM causes "program will not fit into available memory" error. (according to memory allocation, .text is a total of about 3.3kB)
- Trying to move constants to RAM compiles but causes ISR_traps
- I've tried to move .text and .const to Flash instead, as per other forum's suggestions, but FR4133 doesn't seem to have Flash memory?
--> Q2: How can I successfully partition away some of my code (.text, .const) to either RAM or Flash?
2. Alternative way of storing the information/compressing the IR information
At first I thought I could reduce the information by almost 1/4 because I had assumed 255 counts is overkill and only unsigned char was necessary to store the time intervals.
Turns out after testing using A/C signals, I was wrong - somehow both are necessary.
--> Q3: Are there other ingenious ways of compressing, storing or representing the necessary IR information that I haven't thought of?
3. Using another MSP430 as "external storage"
This is a method I can actually envision working, but haven't tried out.
--> Q4: Is it possible to communicate and transfer FRAM information between 2 similar MSP430s via SPI or I2C?
4. SD card boosterpack
Last resort, overkill and might not be compatible with the BOOST-IR boosterpack (it takes up all the male header pins)
Thank you for your help in advance!
Samuel