Skip to content

Latest commit

 

History

History
155 lines (110 loc) · 9.86 KB

File metadata and controls

155 lines (110 loc) · 9.86 KB

NXP Application Code Hub

BusPal Application for FRDM MCX Families

This project contains different folders, one for each supported BusPal device:

  • FRDM-MCXW71
  • FRDM-MCXA156

BusPal

Buspal acts as a bus translator with an established connection with blhost over UART and with the target device over I2C, SPI or CAN, and assists blhost in carrying out commands and responses from the USB target device.

This software pack provides the buspal application ported to different MCX device families, as an extension to the original BusPal application provided with the Kinetis Bootloader package, available only for selected platforms.

For more details on the BusPal software tool and the MCU bootloader for NXP MCUs, refer to the following link: https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcu-bootloader-for-nxp-microcontrollers:MCUBOOT

Boards: FRDM-MCXW71

Categories: Bridge, Tools

Peripherals: CAN, I2C, SPI, UART

Toolchains: MCUXpresso IDE

Table of Contents

  1. Software
  2. Hardware
  3. Setup
  4. Results
  5. Support
  6. Release Notes

1. Software

This project was implemented using MCUXpresso IDE version 11.10.0, and FRDM-MCXW71 SDK version 2.16.000.

To communicate with BusPal device, SPSDK is used for I2C and SPI interfaces. To communicate via CAN, blhost needs to be used.

2. Hardware

This project uses the following board to act as BusPal:

Additional hardware required:

  • Host Computer
  • Target MCU

3. Setup

3.1 SW Setup

3.1.1 Download and Install required Software(s)

3.1.2 Clone the Repository to get the BusPal Application

  • Open MCUXpresso
  • In the Quickstart Panel, click on Import from Application Code Hub
  • Type the name of the project in the search bar, and select it
  • Click on "GitHub link", then Next
  • Select the corresponding branch for the appropriate BusPal device
  • Click on Next on the following windows, and finally click on Finish

3.1.3 Build the Project and Flash BusPal into device

  • Right click on the project and then on "Build Project"
  • Plug the FRDM-MCXW71 board to the PC using the USB-C port
  • Right click on the project and select "Debug As". Select MCUXpresso IDE LinkServer (inc. CMSIS DAP) probes
  • Debugger will start downloading the program to device. MCU-LINK probes will be identified. Click "OK" to continue
  • Click on "Resume" button or press F8 key on your keyboard to continue running the downloaded program on device
  • Click on "Terminate" button or press CTRL + F2 to terminate the debug session
  • Reset the FRDM-MCXW71 board by pressing SW1 or by unplugging and plugging again to the PC

3.2 HW Setup

3.2.1 Boot Target MCU into ISP mode

To stablish a link between a BusPal device and a target MCU, the latter needs to be booted into ISP mode. Each NXP device has its own procedure to follow the ISP path, please refer to the documentation of the specific target MCU that will be used and follow the instructions on how to boot the device into ISP mode.

3.2.2 Connect BusPal to target MCU

Depending on the desired communication interface, the user should use different pins on the FRDM-MCXW71 board. Follow the table below to use the pins that correspond to the interface selected.

I2C SPI CAN
J2 pin 1 (I2C1_SCL) J2 pin 8 (LPSPI_PCS0) J21 pin 1 (CAN_H)
J2 pin 2 (I2C1_SDA) J2 pin 7 (LPSPI_SOUT) J21 pin 2 (CAN_L)
J2 pin 6 (LPSPI_SIN)
J2 pin 5 (LPSPI_SCK)

I2C pins in FRDM-MCXW71 board: alt text

SPI pins in FRDM-MCXW71 board: alt text

CAN pins in FRDM-MCXW71 board: alt text

4. Results

After following the procedure to boot Target MCU into ISP mode, and connecting the appropriate BusPal interface, the host tool will be able to communicate to the target MCU as shown:

I2C alt text

SPI alt text

CAN alt text

Note: Make sure to change the COM port to the appropriate number that the host PC has dedicated for the BusPal device. Note: Before switching to a different serial interface, target MCU needs to reset and re-enter ISP mode.

5. Support

Project Metadata

Board badge Board badge

Category badge Category badge

Peripheral badge Peripheral badge Peripheral badge Peripheral badge

Toolchain badge

Questions regarding the content/correctness of this example can be entered as Issues within this GitHub repository.

Warning: For more general technical questions regarding NXP Microcontrollers and the difference in expected functionality, enter your questions on the NXP Community Forum

Follow us on Youtube Follow us on LinkedIn Follow us on Facebook Follow us on Twitter

6. Release Notes

Version Description / Update Date
1.0 Initial release on Application Code Hub September 23rd 2024
Trademarks and Service Marks: There are a number of proprietary logos, service marks, trademarks, slogans and product designations ("Marks") found on this Site. By making the Marks available on this Site, NXP is not granting you a license to use them in any fashion. Access to this Site does not confer upon you any license to the Marks under any of NXP or any third party's intellectual property rights. While NXP encourages others to link to our URL, no NXP trademark or service mark may be used as a hyperlink without NXP’s prior written permission. The following Marks are the property of NXP. This list is not comprehensive; the absence of a Mark from the list does not constitute a waiver of intellectual property rights established by NXP in a Mark.
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, Airfast, Altivec, ByLink, CodeWarrior, ColdFire, ColdFire+, CoolFlux, CoolFlux DSP, DESFire, EdgeLock, EdgeScale, EdgeVerse, elQ, Embrace, Freescale, GreenChip, HITAG, ICODE and I-CODE, Immersiv3D, I2C-bus logo , JCOP, Kinetis, Layerscape, MagniV, Mantis, MCCI, MIFARE, MIFARE Classic, MIFARE FleX, MIFARE4Mobile, MIFARE Plus, MIFARE Ultralight, MiGLO, MOBILEGT, NTAG, PEG, Plus X, POR, PowerQUICC, Processor Expert, QorIQ, QorIQ Qonverge, RoadLink wordmark and logo, SafeAssure, SafeAssure logo , SmartLX, SmartMX, StarCore, Symphony, Tower, TriMedia, Trimension, UCODE, VortiQa, Vybrid are trademarks of NXP B.V. All other product or service names are the property of their respective owners. © 2021 NXP B.V.