MSPM0 Setting
STEP 1 : SysConfig - NONMAIN
easyDSP uses the code generated by SysConfig. Below figures are made based on SysConfig 1.16.1.
At first, you can set the NONMAIN area such as BCR and BSL configuration.
If you use TI factory default, you can skip this step 1. If not, please check below.
First, set the BCR configuration.
Fast Boot Mode is disabled. And BSL is enabled.
Second, set the BSL configuration.
If necessary, set the 32 byte password for entering to bootstrap mode. It's all 0xFF by TI factory default.
BSL Invoke Pin Check should be enabled.
You can use default BSL invoke pin or you can change it to another pin but BSL invoke pin level should be high in any case.
If necessary, set the UART pin.
Finally enable BSL read out.
Note : Since easyDSP can't program NONMAIN flash memory region (such as BCR and BSL configuration area), please use the debugger or any other tool to program NONMAIN flash.
STEP 2 : Hardware
As confitured in STEP 1 or by TI factory default, connect BSL_invoke, BSLRX and BSLTX to easyDSP header.
If you use TI factory default (No change to NONMAIN flash in STEP 1), refer to the target MCU datasheet to identify pin number of those pins. For instance, BSLRX, BSLTX and BSL_invoke has pin number 26, 27 and 22 respectively for MSPM0L1306xRHB. For instance, BSLRX, BSLTX and BSL_invoke has pin number 57, 56 and 11 respectively for MSPM0G3507SPM.
For your information, BSL_RX and BSL_TX belong to UART0.
Other considerations :
- Direct connection between easyDSP /RESET and MCU NRST.
- RX and TX pins of easyDSP header are pulled up with 100kOhm resistor in the pod.
- In case pull-up resistor is attached, resistor value should be higher than several k Ohm.
STEP 3 : SysConfig - UART
Since BSL_RX and BSL_TX use UART0, create UART0 peripheral with the name of 'UART_0'.
The target baud rate is selectable but it should be same to that of easyDSP project setting.
The data format should be 8bit data, one stop bit and no parity bit.
FIFO should be enabled with its RX and TX FIFO threshold level as below.
Receive and Transmit interrupt should be enabled with the lowest priority level.
It is recommended to have pull-up resistor for TX and RX pins.
Finally as configured in step 1, RX and TX pins are set.
STEP 4 : easyDSP source file
Please include driverlib from TI in your project since easyDSP uses it for UART communication.
Two files are provided for easyDSP communication (easyMSPM0.h, easyMSPM0.c). Please include them in your project. You can find them in the easyDSP installation folder (\source\MSPM0).
Please include easyMSPM0.h in the main.c. And in the main(), call easyDSP_init() after the initialization of MCU.
In the easyDSP_init() function, all the setting for easyDSP monitoring are done.
STEP 5 : IDE
1. Hex file (Intel format) is used for flash programming. So it should be created in every compiling time in the same folder of output file (ex *.out) with same file name. The hex file extension could be either 'hex' or 'ihex'. easyDSP first check if the hex file with extension 'hex' exists and use it for flash programming. If the hex file with extension 'hex' doesn't exist, easyDSP uses the hex file with extension 'ihex'. Pleae set your IDE accordingly to create hex file in every compiling time.
Please refer to the setting of CCS. Especially for CCS, memory width should be 8.
2. For easyDSP monitoring, the debug information should be included in the output file (ex, *.out). And the option of assembler, compiler and linker should be set accordingly.
3. Depending on compiler's optimization level and linker setting, the unused variables could be excluded from the debug information and not shown in the easyDSP.
If you like to avoid this, don't use compiler optimization and set the linker option properly. Like below in case of CCS.
4. In case of CCS, to program NONMAIN memory area of flash, below option should be set.