Texas Instruments MSP430 Application Report
Hide thumbs Also See for MSP430:

Advertisement

Quick Links

.....................................................................................................................
Stefan Schauer
The MSP430 bootstrap loader (BSL) enables users to communicate with embedded
memory in the MSP430 microcontroller during the prototyping phase, final production,
and in service. Both the programmable memory (flash memory) and the data memory
(RAM) can be modified as required.
The commonly used UART protocol with RS232 interfacing is supported, allowing
flexible use of both hardware and software.
To use the bootstrap loader, a specific BSL entry sequence has to be applied to
specific device pins. An added sequence of commands initiates the desired function. A
boot-loading session can be exited by continuing operation at a defined user program
address or by the reset condition.
Access to the MSP430 memory via the bootstrap loader is protected against misuse by
a user-defined password.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SLAA089D - December 1999 - Revised August 2006
Submit Documentation Feedback
Features of the MSP430 Bootstrap Loader
ABSTRACT
..........................................................................................
......................................................................................
........................................................................
..........................................................................................
.................................................................................
..........................................................................................
......................................................................................
....................................................................................
..............................................................................
............................................................................
.........................................................................................
................................................................
SLAA089D - December 1999 - Revised August 2006
Contents
....................................................
..........................................................
..................................................
...................................
Features of the MSP430 Bootstrap Loader
Application Report
MSP430
2
2
3
4
4
4
5
12
12
12
13
13
15
15
16
23
1

Advertisement

Table of Contents
loading

Summary of Contents for Texas Instruments MSP430

  • Page 1: Table Of Contents

    An added sequence of commands initiates the desired function. A boot-loading session can be exited by continuing operation at a defined user program address or by the reset condition. Access to the MSP430 memory via the bootstrap loader is protected against misuse by a user-defined password. Contents ..................
  • Page 2: Introduction

    It can be activated by a utility that sends commands via the familiar UART protocol. The BSL enables the user to control the activity of the MSP430 and to exchange data using a personal computer or other device that supports a UART protocol.
  • Page 3: Uart Protocol

    • There are less than two positive edges at the TEST pin while RST/NMI is low • TEST is low when RST/NMI rises from low to high • JTAG has control over the MSP430 resources • Supply voltage, V , drops down and a power-on reset (POR) is executed •...
  • Page 4: Synchronization Sequence

    When losing control over the UART protocol, either by line faults or by violating the data frame conventions, the only way to recover is to rerun the BSL entry sequence to initiate another BSL session. Features of the MSP430 Bootstrap Loader SLAA089D – December 1999 – Revised August 2006 Submit Documentation Feedback...
  • Page 5: Data Frame

    Table For more information on serial standard protocol (SSP), see the TI application report, Application of Bootstrap Loader in MSP430 With Flash Hardware and Software Proposal, literature number SLAA096. Data-Stream Structure • The first 8 bytes (HDR through LH) are mandatory (xx represents dummy data).
  • Page 6 CKH = INV [ B2 XOR B4 XOR … XOR Bn ] Example Sequence The following example shows a request to read the memory of the MSP430 from location 0x0F00. All values shown below are represented in hexadecimal format. TO BSL:...
  • Page 7 DATA_ACK is sent back by the BSL. Otherwise, the BSL confirms with a DATA_NAK. Note: BSL versions V1.40 and higher support online verification inside the MSP430 for addresses 0200h–FFFFh, which reduces programming/verification time to 50%. Online verification means that the data is immediately verified with the data that is written into the flash without transmitting it again.
  • Page 8 Check the device datasheet for more information on the cumulative (mass) erase time that must be met and the number of erase cycles required. Features of the MSP430 Bootstrap Loader SLAA089D – December 1999 – Revised August 2006 Submit Documentation Feedback...
  • Page 9 9600 baud. With faster data transition, shorter programming cycles can be achieved, which is especially important with large flash memory devices. This command is not password protected. SLAA089D – December 1999 – Revised August 2006 Features of the MSP430 Bootstrap Loader Submit Documentation Feedback...
  • Page 10 The minimum processor frequency is lower than in the standard ROM BSL (see Section 12.3, Initialization Status). D1 to D3 are bytes in hexadecimal notation. Features of the MSP430 Bootstrap Loader SLAA089D – December 1999 – Revised August 2006 Submit Documentation Feedback...
  • Page 11 • D2: Device family type (low byte) • D11: BSL version (high byte) • D12: BSL version (low byte) The remaining 12 bytes are for internal use only. SLAA089D – December 1999 – Revised August 2006 Features of the MSP430 Bootstrap Loader Submit Documentation Feedback...
  • Page 12: Loadable Bsl

    LOCKA bit should also be checked. • Applying the standard RESET sequence (see Figure 1) forces the MSP430 to start with the user reset vector at address 0FFFEh. Password Protection The password protection prohibits every command that potentially allows direct or indirect data access.
  • Page 13: Code Protection Fuse

    BCD representation. This is common for all devices and BSL versions: • 0FF0h–0FF1h: Chip identification (e.g., F413h for an F41x device). • 0FFAh–0FFBh: BSL version number (e.g., 0130h for BSL version V1.30). Please see the MSP430 device/BSL version assignment in Chapter 12.2 Vectors to Call the BSL Externally The entry part of the boot ROM holds the calling vectors for BSL access by program: •...
  • Page 14 Their contents are not buffered. – F1xx/F2xx: • The basic clock module registers used are: • DCOCTL at address 056h • BCSCTL1 at address 057h Features of the MSP430 Bootstrap Loader SLAA089D – December 1999 – Revised August 2006 Submit Documentation Feedback...
  • Page 15: Special Consideration For Bsl Version 1.10

    3. MSP430x4xx Family User’s Guide (SLAU056) 4. Application of Bootstrap Loader in MSP430 With Flash Hardware and Software Proposal (SLAA096) For a list of third parties that offer BSL hardware and software solutions, please see the MSP430 web site http://www.ti.com/sc/msp430 (>...
  • Page 16: Appendix A Differences Between Devices And Bsl Versions

    Appendix A Appendix A Differences Between Devices and BSL Versions In summary, the tables in this appendix show the key information of MSP430 device/BSL version assignment related to their hard/software resources. Table A-1. BSL Version 1.10 on F13x, F14x(1), F11x, and F11x1...
  • Page 17 Timer_A, affected controls TACTL, TAR, CCTL0, CCR0 #00h, &CCTL0 #00h, &CCTL0 mov.b #00h, &BCSCTL2 Preparation for SW call mov.b #00h, &FLLCTL1 #00h, SR &0C00h &0C00h SLAA089D – December 1999 – Revised August 2006 Features of the MSP430 Bootstrap Loader Submit Documentation Feedback...
  • Page 18 System clock, affected controls BCSCTL1, DCOCTL Timer_A, affected controls TACTL, TAR, CCTL0, CCR0 mov.b #00h, &BCSCTL2 Preparation for SW call #00h, SR &0C00h Features of the MSP430 Bootstrap Loader SLAA089D – December 1999 – Revised August 2006 Submit Documentation Feedback...
  • Page 19 #00h, SR &0C00h br &0C00h Comment Erase segment Addresses 1000h to 11FFh are verified coherently (3 segments). Also use erase check command command. SLAA089D – December 1999 – Revised August 2006 Features of the MSP430 Bootstrap Loader Submit Documentation Feedback...
  • Page 20 #00h, SR &0C00h br &0C00h Comment Erase segment Addresses 1000h to 11FFh are verified coherently (3 segments). Also use erase check command command. Features of the MSP430 Bootstrap Loader SLAA089D – December 1999 – Revised August 2006 Submit Documentation Feedback...
  • Page 21 Also use erase check command. The LOCK and LOCKA bits must be cleared by the user application before entering the BSL mov.w #FWKEY+LOCKA, &FCTL3 SLAA089D – December 1999 – Revised August 2006 Features of the MSP430 Bootstrap Loader Submit Documentation Feedback...
  • Page 22 Also use erase check command. The LOCK and LOCKA bits must be cleared by the user application before entering the BSL mov.w #FWKEY+LOCKA, &FCTL3 Features of the MSP430 Bootstrap Loader SLAA089D – December 1999 – Revised August 2006 Submit Documentation Feedback...
  • Page 23: Appendix Bmsp430 Bsl Replicator

    Pressing SW1 generates a BSL entry sequence, followed by a download of the program stored in flash to a target MSP430 device. Status LED4 is illuminated if the download was successful. Otherwise, Status LED3 is illuminated, indicating a failure.
  • Page 24 • TX/RX – 9600 baud, 8N1 UART. • RST/NMI – connects to target’s RST/NMI pin. • TEST – connects to target’s TEST pin for MSP430 devices having shared JTAG pins • TCK – connects to target’s TCK pin for MSP430 devices having dedicated JTAG pins.
  • Page 25 Pin Devices BSL_PATCH = 1? Install BSL Patch Download and Success? Verify Program LED3 On Success? LED4 On Figure B-2. BSL Replicator Flow Chart SLAA089D – December 1999 – Revised August 2006 Features of the MSP430 Bootstrap Loader Submit Documentation Feedback...
  • Page 26 Implementation SW2 Event? Execute Program Success ? LED3 On On Target LED4 On Figure B-3. BSL Replicator Flow Chart (continued) Features of the MSP430 Bootstrap Loader SLAA089D – December 1999 – Revised August 2006 Submit Documentation Feedback...
  • Page 27 – bytes – length of block. Maximum value is 250 • bslMsgVer(BslMsg* pMsg) – creates message for the BSL command, BSL Version (CMD ID 0x1E). Reads BSL version number and MSP430 device information from target. Parameter: – pMsg – pointer to BslMsg data structure SLAA089D –...
  • Page 28 • bslEntrySeq(void) – generates BSL entry sequence. If the input signal BSL_SEQ is tied to VCC, then the signals required to place a MSP430 device having dedicated JTAG pins into BSL mode will be generated. If BSL_SEQ is tied low, then the signals required to place a MSP430 device having shared JTAG pins into BSL mode will be generated.
  • Page 29 0xFFFFh. Creating the BSL Replicator Source 1. Use IAR’s IDE to create a MSP430 project for the Host device (BSL Replicator). 2. Add the bsl_replicator.c source file to the BSL Replicator project. 3. Add the PATCH.s43 source file to the BSL Replicator project if using the BSL patch for the target.
  • Page 30 TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions:...

Table of Contents