Texas Instruments MSP-EXP430FR5969 Manuale Utente

Pagina di 45
Software Examples
It should be noted that this application is optimized for speed rather than power. The speed of this
application is approximately 7500KB (7.5MB) per second. On a flash device, the achievable speed would
be approximately 13KB per second.
Larger blocks of data can be written, which results in faster write speeds but also higher power
consumption. For more information on how to optimize FRAM write speeds, refer to the application report
Maximizing FRAM Write Speed on the MSP430FR57xx (
In this application, the system main clock is configured to use the DCO at 8 MHz. The application
configures the DMA transfer of data and continuously executes it while remaining in LPM0. Each time the
DMA writes the 1KB block, a count variable is incremented and the next DMA transfer is triggered. A timer
is set up to interrupt the FRAM writing every 0.25 second to calculate the speed, total the kilobytes of data
written, update the endurance, and then output these parameters on the LCD.
Note that the FRAM endurance percentage is retained after a power cycle. To exit the application and
stop the FRAM writes, the left button (S1) can be pushed allowing the user to return to the main menu.
3.4.4.1
Understanding the Numbers Behind the FRAM Speed Application
The LCD is updated every 250 ms with an updated percentage change in the FRAM endurance. To
calculate the endurance, some approximations were made in order to provide a meaningful output on the
LCD.
Every 250 ms, 1.8MB of FRAM are programmed with a pattern. Hence the speed of FRAM writes is
calculated as 7.564 MB/s. The FRAM is written to in blocks of 1K bytes; it is this 1KB block that is subject
to the lifetime FRAM endurance specification.
FRAM endurance of block = = 10
15
write cycles. This is a minimum specification for FRAM endurance
found in the device data sheet.
Table 9. FRAM Endurance Calculation for 1KB Block of FRAM
Variable
Derived From
Value
E
FRAM endurance
Data sheet
10
15
writes
W
Write speed
Application
7.564 MB/second
B
FRAM block size
Application
1KB (1024 bytes)
N
Number of writes to a unique byte/sec
N = W / B
7386 writes/second
T
LCD
Time between LCD updates
Application
250 ms
1.35 × 10
11
seconds
T
LIFE
Time until endurance specification is met
T
LIFE
= E / N
(more than 4000 years)
L
Lifetime percentage reduction per LCD update
L = (T
LCD
/ T
LIFE
) × 100
1.85 × 10
-10
%
The calculated value of is rounded up to 2 × 10
-10
%, or 0.0000000002%. This is the amount the FRAM
endurance is decremented on the LCD every 250 ms.
Note that the FRAM endurance percentage is retained during on a power cycle. This parameter is
preserved by storing it in FRAM and preventing the variable from being overwritten on a power cycle.
Refer to the NO INIT and LOCATION pragmas in the CCS compiler documentation for more details. This
parameter will be reset when the device is reprogrammed, and the address overwritten.
3.4.5
Battery Free Application
To enter the Battery Free Stopwatch application, select the "Battery Free" option on the main menu and
then press the right button (S2).
This mode is intended to be used when running from the super cap only. See
for more
information on how to power the LaunchPad from the super cap.
When the application is entered, a submenu appears showing two possible actions to be taken. The first
action is to "Run App," which starts the Battery Free Stopwatch application and log . The other option is to
"Transmit Data", which transmits all logged data from previous runs through the MSP430 UART to a PC.
32
MSP-EXP430FR5969 LaunchPad™ Development Kit User's Guide
SLAU535A – February 2014 – Revised June 2014
Copyright © 2014, Texas Instruments Incorporated