Texas Instruments MSP430x1xx Stopping a Write or Erase Cycle, Flash Memory Controller Interrupts

Models: MSP430x1xx

1 432
Download 432 pages 41.81 Kb
Page 145
Image 145

Flash Memory Operation

5.3.5Stopping a Write or Erase Cycle

Any write or erase operation can be stopped before its normal completion by setting the emergency exit bit EMEX. Setting the EMEX bit stops the active operation immediately and stops the flash controller. All flash operations cease, the flash returns to read mode, and all bits in the FCTL1 register are reset. The result of the intended operation is unpredictable.

5.3.6Configuring and Accessing the Flash Memory Controller

The FCTLx registers are 16-bit, password-protected, read/write registers. Any read or write access must use word instructions and write accesses must include the write password 0A5h in the upper byte. Any write to any FCTLx register with any value other than 0A5h in the upper byte is a security key violation, sets the KEYV flag and triggers a PUC system reset. Any read of any FCTLx registers reads 096h in the upper byte.

Any write to FCTL1 during an erase or byte/word write operation is an access violation and sets ACCVIFG. Writing to FCTL1 is allowed in block write mode when WAIT=1, but writing to FCTL1 in block write mode when WAIT=0 is an access violation and sets ACCVIFG.

Any write to FCTL2 when the BUSY=1 is an access violation.

Any FCTLx register may be read when BUSY=1. A read will not cause an access violation.

5.3.7Flash Memory Controller Interrupts

The flash controller has two interrupt sources, KEYV, and ACCVIFG. ACCVIFG is set when an access violation occurs. When the ACCVIE bit is re-enabled after a flash write or erase, a set ACCVIFG flag will generate an interrupt request. ACCVIFG sources the NMI interrupt vector, so it is not necessary for GIE to be set for ACCVIFG to request an interrupt. ACCVIFG may also be checked by software to determine if an access violation occurred. ACCVIFG must be reset by software.

The key violation flag KEYV is set when any of the flash control registers are written with an incorrect password. When this occurs, a PUC is generated immediately resetting the device.

5.3.8Programming Flash Memory Devices

There are three options for programming an MSP430 flash device. All options support in-system programming:

-Program via JTAG

-Program via the Bootstrap Loader

-Program via a custom solution

Flash Memory Controller

5-15

Page 145
Image 145
Texas Instruments MSP430x1xx manual Stopping a Write or Erase Cycle, Configuring and Accessing the Flash Memory Controller

MSP430x1xx specifications

The Texas Instruments MSP430x1xx series is a family of ultra-low-power microcontrollers that are highly regarded in the embedded systems community for their versatility and performance. Designed for applications ranging from portable instrumentation to low-power industrial devices, the MSP430x1xx combines flexibility and efficiency with advanced features tailored for energy-sensitive applications.

One of the standout characteristics of the MSP430x1xx is its ultra-low-power operation. This series offers several low-power modes that can significantly extend battery life in portable devices. The microcontroller can be in active mode, low-power mode, or even in a deep sleep state, allowing developers to optimize power consumption based on the application's requirements. In fact, some configurations can operate at just a few microamps, making it ideal for battery-operated devices.

Another key feature is the 16-bit RISC architecture that provides powerful processing capabilities while maintaining a low power profile. The MSP430x1xx series supports a maximum clock speed of 16 MHz, allowing for efficient task execution while consuming minimal energy. This architecture ensures that programs run smoothly while the microcontroller remains energy efficient.

The MSP430x1xx is equipped with various integrated peripherals, including analog-to-digital converters (ADCs), timers, and communication interfaces like UART, SPI, and I2C. The inclusion of a powerful ADC enables the microcontroller to handle sensor readings with high accuracy, making it suitable for applications like environmental monitoring and medical devices. The integrated timers provide essential functionality for real-time applications, allowing for event-driven programming and precise timing control.

Memory options in the MSP430x1xx series are also robust, with configurations offering flash memory sizes from 1 KB to 64 KB. This flexibility allows developers to choose the optimal memory size for their specific applications, accommodating a wide range of requirements.

Additionally, the MSP430x1xx microcontrollers are designed with a wide operating voltage range, typically from 1.8V to 3.6V, making them compatible with various power sources and further enhancing their usability in diverse applications.

In summary, the Texas Instruments MSP430x1xx series of microcontrollers is an excellent choice for developers seeking low-power, high-performance solutions for embedded applications. With an efficient architecture, a rich set of peripherals, and flexible memory options, these microcontrollers are positioned to meet the growing demands of modern electronic designs, particularly in battery-powered and energy-sensitive applications.