This post was last edited by wuguangtao on 2020-10-20 21:55 # MSP430F5529LP unboxing and environment setup## It happened to be Saturday today when I received the evaluation express. The packaging was like this, with TI's logo and the rocket head of the launchPad, a classic style.
After unboxing, there are 3 items: 1. MSP430F5529LP development board 2. USB data cable, used for power supply, code download and debugging of the board 3. LaunchPad instruction page
### Board First look at the front of the board, the red PCB board, which is also a classic color, the same as the G2553 I used before. Interestingly, the F5529 pins are brought out on both sides of the board, and both ends can be used, the front is a male head and the back is a female head.
The `MSP430F5529` chip contains 80 pins, but this launchpad only brings out 40 of them. For details on which pins are brought out, please continue reading. ### Instruction page
The instruction page has two sides. The top is the front side, which includes the cover and the pin mapping on the board. Here, the definition of all the lead pins is shown in detail, including power, UART, analog input, PWM output, SPI, IIC, timer and other pins. Regarding the pin definition, you can also get the following detailed information from the energia official website↓
Here are not only pin descriptions, but also basic peripheral descriptions, such as 4 buttons (RESET, BSL, PUSH1, PUSH2), 2 LEDs (LED0, LED1), and the definition of all jumpers: From left to right, the jumpers are (GND, 5V, 3.3V, RTS, CTS, RDX, TDX, SBW RESET, SBW TEST). The specific hardware circuit will be discussed in detail later. The power jumper is closed by default, which means that the board can be powered by USB, which can be known from the official information. The following is a detailed description of the jumper provided in the reference material. | Jumper (from left to right) | Description | | ---------------------------- | --------------------------------------------------------------- | | GND | Ground | | 5V | 5-V VBUS, sourced from the USB host. The F5529 target needs this if attempting a USB connection with it. | can use this to indicate whether it is ready to receive data from the host PC. The arrows indicate the direction of the signal. | | CTS << | Backchannel UART: Clear-To-Send, for hardware flow control. TXD >> | Backchannel UART: the target F5529 sends data through this signal. The arrows indicate the direction of the signal. | | SBW RST | Spy-Bi-Wire emulation: SBWTDIO data signal. This pin also functions as the RST signal (active low). | | SBW TST | Spy-Bi-Wire emulation: SBWTCK clock signal. This pin also functions as the TST signal. | | N/C | Not connected. Reserved. |
Next, let's look at the other side of the description page, which shows the basic parameters of the chip, detailed description of the board peripherals, quick development wizard and other information. The board uses a new 100% open source onboard emulator, which enables programming, debugging and UART applications through USB, which is quite convenient, and there is no need to buy a separate emulator. Let's look at the basic parameters of the chip: - 25 MHz CPU (relatively low main frequency) - 128kB Flash / 8 kB RAM (if USB is not used, 2kB can be added) - 12-bit SAR ADC, comparator, timer, hardware accelerator - SPI/UART/I2C - Integrated full-speed `USB 2.0`, including complete software library support for `HID`, `MSC` and `CDC` There are no outstanding features, it's just average. The main highlight may still be the USB function. For more detailed on-chip peripherals, please refer to the `MSP430F5529` [datasheet](https://www.ti.com/product/MSP430F5529).
Next is the board peripherals, which has been mentioned before. Here is another illustration. The upper part of the board is the ez-FET emulator, which is open source and has an integrated USB. In addition to downloading and debugging, it can also provide power and UART communication. The lower part of the board is the chip and peripherals. BSL (bootstrap loader) is a BootLoader button, which is different from the jump cap method we have seen before, and it is worth studying in the future. The right side of the instruction page teaches us how to start playing, provides a simple description of the Demo app, and then explains the subsequent environment construction in detail. Finally, it tells you which development tools can be used for development and what network resources can be used. Everyone should be relatively clear about the development tools. The main ones that support MSP430 are: 1. Energia (simple and easy to use) 2. CCS (TI main recommendation) 3. IAR Okay, it's time to power on and start building the environment. ## Environment construction### Install energia In order to get started quickly, install energia first
, manually copy it to the browser, otherwise it may add strange parameters by default and cannot be opened.
After downloading and unzipping, you can see that there are two executable files. The one with the debug suffix will have an additional debug log information window. By default, it is not needed. Just use the first one `energia.exe`.
After opening, it will look like this. At this time, you can connect the board to the PC via a USB cable. The PC will automatically recognize the USB. At the same time, the software will automatically recognize the board model and prompt you to download the software library. Just install it.
After downloading, you can see the chip types supported by the current library. Including the current MSP430F5529.
### Download LED demo The demo that comes with the board is not LED flashing, which is unexpected. Later, I read the instructions and found that the default demo should be USB function, and it can be controlled by buttons. However, I flashed it to other codes before I tried it. I will make up for it later. Let's download Energia's LED flash demo and try it out. Select 01. Basics-> Blink.
```c /* Blink The basic Energia example. Turns on an LED on for one second, then off for one second, repeatedly. Change the LED define to blink other LEDs. Hardware Required: * LaunchPad with an LED This example code is in the public domain. */ // most launchpads have a red LED #define LED RED_LED //see pins_energia.h for more LED definitions //#define LED GREEN_LED // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(LED, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(1000); for a second } ``` The code is very simple, just switching the LED level in a loop, and you can download it after compiling. When downloading to the board, I encountered a problem. The program could not be downloaded, and the failure message was "MSP430: Error initializing emulator: No USB FET was found", but it was clearly recognized normally, and the device manager also showed COM3 and COM4. Why? Later, Google found that my device manager only showed the communication port, but did not show the specific device information (MSP ....), so according to what was said on the Internet, I guessed that it was still a problem that the driver was not installed, and then I installed a `ubiflash`, and the result was that the two drivers were installed according to the process.
After installation, everything was normal, and the device manager also showed MSP-related words, perfect.
Then download again, success! Sprinkle flowers. The environment is set up and tested, perfect.
The test results are as follows:
PS: ubiflash is obviously not a must-have, but the USB driver must be installed. I think if you install the CCS software first, it may come with its own driver. If not, you can also download it online. But I didn't try it, so if you have the same problem, you can give it a try. - https://www.driverscape.com/download/msp-debug-interface ## The End The first review is dedicated to MSP430F5529, keep up the good work. ## References 1. [MSP430F5529 datasheet](https://www.ti.com/product/MSP430F5529) 2. [Energia Tutorial: MSP430F5529 LaunchPad - youtube](https://www.youtube.com/watch?v=WXRcbUxK0YQ) 3. [Guide to the MSP430F5529 LaunchPad (MSP-EXP43 0F5529LP)](https://energia.nu/pinmaps/msp-exp430f5529/) 4. [MSP BSL(bootloader)](https://www.ti.com/tool/MSPBSL)