Introduction
This is the documentation for the data structures, functions, variables, defines, enums, and typedefs for the FLASHCALW software driver.
It also comes bundled with several examples. Using a Fibonacci calculation, this example demonstrates how much the PicoCache feature can improve the execution speed.
- Note
- The PicoCache always has a positive impact in terms of power consumption (Explanation: since the PicoCache features allows to do less access to the Flash, the power consumption is therefore reduced). Note however that the PicoCache feature may have a negligible negative impact on the execution speed when there are no wait states on the Flash (which may be the case when the CPU runs at 12MHz in some cases). See also the Flash Characteristics in the electrical characteristics section of the datasheet for more information.
Operating mode of the example:
- After reset, the example will run without PicoCache at 48MHz with 1 wait state.
- A Fibonacci calculation will be done.
- The power consumption of the calculation without PicoCache will be displayed on the board monitor.
- The time spent on the Fibonacci will be displayed on the debug monitor.
- PicoCache will be enabled.
- The Fibonacci calculation will be done again.
- The power consumption of the calculation with PicoCache will be displayed on the board monitor.
- The time spent on the Fibonacci will be displayed on the debug monitor.
- The cache hit number will be displayed on the debug monitor, which is the cause of the performance improvement and power consumption decrease.
- Then the example will run without PicoCache at 12MHz with 0 wait state.
- A Fibonacci calculation will be done.
- The power consumption of the calculation without PicoCache will be displayed on the board monitor.
- The time spent on the Fibonacci will be displayed on the debug monitor.
- PicoCache will be enabled.
- The Fibonacci calculation will be done again.
- The power consumption of the calculation with PicoCache will be displayed on the board monitor. The power consumption will be lower.
- The time spent on the Fibonacci will be displayed on the debug monitor.
- The cache hit number will be displayed on the debug monitor, which is the cause of the performance improvement and power consumption decrease.
Main Files
Compilation Information
This software is written for GNU GCC and IAR Embedded Workbench for Atmel. Other compilers may or may not work.
Device Information
SAM4L devices with a FLASHCALW module can be used.
Configuration Information
This example has been tested with the following kits:
- SAM4L-EK evaluation kit;
- SAM4L Xplained Pro
- SAM4L8 Xplained Pro This example has been tested with the following configuration:
- CPU clock: 48 MHz;
- USARTx abstracted with a USB CDC connection to a PC;
- PC terminal settings:
- 115200 bps,
- 8 data bits,
- no parity bit,
- 1 stop bit,
- no flow control.
Contact Information
For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/