Readme

Example Summary

SPI interface Flash plugin handles the data transaction between the BSL host and the ROM BSL through the following 4 API Hooks:

SPI plugin is added as a new interface since there is no BSL SPI ROM implementation available.

SPI flash plugin image shall be built like any other application and will be loaded to main flash. Once this plugin image is loaded, ROM SPI interface will become active in interface list along with UART, I2C during BSL ROM Auto detection phase. To revert the device to disable ROM SPI interface, use SWD_Factory_Reset.

For more details on the Flash plugin refer to BSL User Guide.

This example can be used to register new SPI interface implementation.

NOTE:

TIPS:

Peripherals & Pin Assignments

Peripheral Pin Function
SYSCTL
SPI0 PA6 SPI SCLK (Clock)
SPI0 PA5 SPI PICO (Peripheral In, Controller Out)
SPI0 PA4 SPI POCI (Peripheral Out, Controller In)
SPI0 PA8 SPI CS0 (Chip Select 0)
DEBUGSS PA20 Debug Clock
DEBUGSS PA19 Debug Data In Out

BoosterPacks, Board Resources & Jumper Settings

Visit LP_MSPM0L1306 for LaunchPad information, including user guide and hardware files.

Pin Peripheral Function LaunchPad Pin LaunchPad Settings
PA6 SPI0 SCLK J1_7 N/A
PA5 SPI0 MOSI J2_15 N/A
PA4 SPI0 MISO J2_14 N/A
PA8 SPI0 CS0 J1_4
  • PA8 can be connected to XDS-110 backchannel or to boosterpack connector:
    • To use on boosterpack connector and disconnect XDS-110:
      J16 2:3: Connect pin to J1_4
PA20 DEBUGSS SWCLK J2_13
  • PA20 is used by SWD during debugging
    • J101 15:16 ON Connect to XDS-110 SWCLK while debugging
    • J101 15:16 OFF Disconnect from XDS-110 SWCLK if using pin in application
PA19 DEBUGSS SWDIO J2_17
  • PA19 is used by SWD during debugging
    • J101 13:14 ON Connect to XDS-110 SWDIO while debugging
    • J101 13:14 OFF Disconnect from XDS-110 SWDIO if using pin in application

Device Migration Recommendations

This project was developed for a superset device included in the LP_MSPM0L1306 LaunchPad. Please visit the CCS User’s Guide for information about migrating to other MSPM0 devices.

Low-Power Recommendations

TI recommends to terminate unused pins by setting the corresponding functions to GPIO and configure the pins to output low or input with internal pullup/pulldown resistor.

SysConfig allows developers to easily configure unused pins by selecting BoardConfigure Unused Pins.

For more information about jumper configuration to achieve low-power using the MSPM0 LaunchPad, please visit the LP-MSPM0L1306 User’s Guide.

Example Usage

Connect target with the BSL Host (any microcontroller with SPI) by making the following connections between the SPI Controller and SPI Peripheral:

Compile, load the example.

Create BSL invocation condition using BSL Invoke pin or any other invocation methods. Send Connection command from the host. BSL Acknowledgement should be received. Send GetDeviceInfo command from the host. BSL should respond back with the SPI interface Flash plugin version information.

Similarly Send erase, program, verification commands to program data in the memory.

The given example can be paired up with bsl_host_mcu_spi example in sdk. When connections are made and examples are loaded respectively, with each button press from the host side, commands will be send and the target device will be programmed with demo application.