W
rite Speed (kB/s)
1400
13
1
10
100
1000
10000
FRAM
Flash
MSP-EXP430FR5739 User Experience Demo
2.2.2
Using Mode 1
–
FRAM High Speed Writes
Mode 1 is entered by pressing S1 once, followed by S2. On entry, LED8 through LED1 light up
sequentially to display the speed of FRAM writes.
Every time the LED1 through LED8 sequence is completed, 800KB are written to FRAM. In this mode,
FRAM is bring written to at about 1.8MB per second. In comparison, a full-speed write to flash can
achieve speeds of approximately 13kB per second.
Figure 2. Comparing Write Speeds When Writing to Nonvolatile Memory
(MSP430FR5739 FRAM vs MSP430F2274 Flash)
Note that the code is optimized for power and not speed. FRAM memory blocks can be written at speeds
greater than 8MB per second depending on how the code is optimized. See the application report
Achieving High-Speed FRAM Writes Using the MSP430FR5739 for more details.
On entering Mode 1, the address of the FRAM scratchpad location is calculated. For the User Experience
demo, the scratchpad location starts at 0xD400 and ends at 0xF000. This location can be modified in the
header file FR_EXP.h. Note that when changing this location, it is important to first check the code space
requirements in the map file to ensure that the FRAM scratchpad area does not overlap with the
application code. Different compilers and optimization settings may impact the placement of the
application code. If any overlap occurs, the application code may be overwritten in Mode 1, which can
cause the demo to fail.
In Mode 1, the system main clock is configured to use the DCO set to 8 MHz. A function that performs
long-word writes to FRAM is called continuously inside a while loop. Each time the FRAM_Write() function
in FR_EXP.c is called, 512 bytes are written. This number was chosen arbitrarily to mimic flash segments,
and there are no restrictions on the number of FRAM bytes that can be written at once. While in Mode 1,
the LED sequence changes every time 100kB are written. For example, after the first 100KB are written,
LED8 is turned on; after the next 100kB are written, LED8 and LED7 are turned on; and so on. The
sequence completes when all eight LEDs are turned on, after which the process rolls over and starts
again from LED8.
Also, after every 100kB, a UART data transmission occurs. This data is sent to the PC via a back-channel
UART and is used to calculate the FRAM write speed and endurance information that is displayed in the
PC GUI. The raw data can also be viewed directly using a PC application such as HyperTerminal.
8
MSP-EXP430FR5739 FRAM Experimenter Board
SLAU343B
–
May 2011
–
Revised February 2012
Copyright
©
2011
–
2012, Texas Instruments Incorporated