APPLICATION NOTE 7430

MAX32570 Demo Examples Application Note


Abstract:

This application note provides a detailed explanation of how to use the demo examples of the MAX32570 secure microcontroller with the Maxim SDK. Demo examples demonstrate key functionality of MAX32570 secure microcontroller, such as thin-film-transistor liquid-crystal display (TFT), touchscreen, keypad, MSR, near-field communication (NFC), smart card. The document should be used in conjunction with the corresponding Maxim Micro SDK Installation and Maintenance User Guide.


Introduction

The DeepCover® secure microcontroller (MAX32570) provides an interoperable, secure, and cost-effective solution to build next generation trusted devices. It can be used in single-chip applications, such as pin pads, mobile POS (MPOS), and secure card reader for PIN (SCRP) and in dual-chip applications, such as countertop and tablet POS. It includes all the essential functions to address those applications, including a multi-protocol radio frequency (RF) contact-less controller and radio front-end, a dual smart card controller, a parallel camera interface, a magnetic strip reader, a TFT controller, and a secure keypad controller.

The MAX32570 software development kit (SDK) includes:

  • FreeRTOS demo example
  • Bare-metal demo example

This document details required hardware setup, creation, building, running, and debugging the demos. It also contains a detailed explanation about content of the demo example.

System Requirements

To setup the EV kit and run the demo example on the MAX32570-QNKIT or MAX32570-MNKIT, the following equipment, instructions, and connections are required:

  1. MAX32570-QNKIT or MAX32570-MNKIT (JTAG debugger, two USB type A to micro-USB type B cables, and a power adaptor are included in the EV kit package)
  2. Windows® PC (Windows 10) and any serial console application, such as Tera Term, to see console output messages on the PC.
  3. The latest Maxim SDK version must be installed on the PC. For details of the installation process, refer to the Maxim Micro SDK Installation and Maintenance User Guide.
  4. Connect a USB type-A to a micro-B cable between the USB-UART ports (UART0) on the MAX32570 EV kit and the PC (Figure 1).
  5. Connect the CMSIS-DAP debug adapter for loading images and debugging.
  6. Connect the NFC antenna board (ANT board) to the EV kit. MAX32570-QNKIT includes NFC ANT. This step does not apply if using MAX32570-MNKIT.
  7. Plug the power adapter into the EV kit.

MAX32570-QNKIT and required components.Figure 1. MAX32570-QNKIT and required components.

The full connection of MAX32570-QNKit is shown in Figure 2.

MAX32570-QNKit connections.Figure 2. MAX32570-QNKit connections.

Maxim SDK (MSDK) Installation

The MAX32570 SDK provides demo examples to download and install on your PC.

  1. Select this link to download Maxim's Micros Software Development Kit (SDK).
  2. To complete installation, double-click the MaximMicros.exe file and follow the instructions.

MAX32570 Software Development Kit (SDK)Figure 3. MAX32570 Software Development Kit (SDK).

MAX32570 Demo Example Project

The following instructions provide details for creating a MAX32570 demo example.

Creating Demo Example Project

  1. Run the Eclipse MaximSDK desktop app.

    Starting Eclipse on the startup menuFigure 4. Starting Eclipse on the startup menu.

  2. Select the workspace folder containing the demo example and click Launch. Note that it is best to choose a path that contains no spaces.
  3. Start the wizard by clicking on File > New > Maxim Microcontrollers.
  4. Starting a new project wizardFigure 5. Starting a new project wizard

  5. Enter the Project name and click Next.

    Select the project type and nameFigure 6. Select the project type and name.

  6. On the Select Project Configuration window, click the drop-down arrows to select the following information:
    • Chip type – MAX32570
    • Board type – Refer to EV kit to determine board type.
      • MAX32570-QN EV KIT > QN_EvKit_V1
      • MAX32570-MN EV KIT > MN_EvKit_V1
    • Demo example type
      • MAX32570_Demo_FreeRTOS
      • MAX32570_Demo_BareMetal
    • Adapter type – CMSIS-DAP

    Selecting the project configurationFigure 7. Selecting the project configuration.

  7. Click the Finish button to create the demo project.

Building and Loading an Example Project

  1. In Project Explorer, right-click on the project folder and select Build Project.

    Build the projectFigure 8. Build the project.

  2. Verify the build is finished, as shown in Figure 9.

    CDT build console outputFigure 9. CDT build console output.

  3. To clean the project, right-click on the project and select Clean Project.

    Clean project windowFigure 10. Clean project window.

  4. Console output after cleanFigure 11. Console output after clean.

  5. To load firmware on the board, right-click on the project and select Debug As > Debug Configuration.
  6. Select the project and click the Debug button. The firmware will be loaded in the MAX32570 device onto the EV kit.
  7. Loading binary to the MAX32570 deviceFigure 12. Loading binary to the MAX32570 device.

FreeRTOS Demo Example

The MAX32570_FreeRTOS_Demo example is implemented on FreeRTOS Kernel v10.2 version . It demonstrates how to drive and use the following:

  • Thin-film-transistor liquid-crystal display (TFT)
  • Touch screen
  • Keypad
  • Magnetic stripe reader (MSR)
  • Near-field communication (NFC)
  • Smartcard
  • Image/font usage
  1. After building the MAX32570_FreeRTOS_Demo example and loading binary on the MAX32570-QNKit, the display screen appears.
  2. Use Switch1 (SW1, shown in Figure 13) to power on/off the EV kit.

    Loading binary to the MAX32570 deviceFigure 13. Demo main screen.

    On the TFT screen, each icon represents a different demonstration item. Menu selection is controlled by area detection within the touchscreen.

  3. Press the desired icon to launch the demo.
  4. Press the Home button to return to the main menu.

    After 15 seconds in idle state, screensaver mode is displayed.

Menu 1: Smart Card Demo

  1. On the TFT screen, select the Smartcard icon. The Smartcard screen displays (Figure 14).
  2. Insert a smartcard into the slot to display the card's answer to reset (ATR).
  3. Demo smart cardFigure 14. Demo smart card.

Smart card can be driven with 3V (class B mode) or 5V (class A mode). To switch from 3V to 5V mode or vice versa, apply the following modifications:

  1. On the EV kit, configure SC_PWR_SEL (JP19) jumper.
  2. In the software, set SMARTCARD_EXT_AFE_Voltage in demo_config.h file to the appropriate value based on the JP19 status.
  3. Rebuild and load firmware.

Smart card voltage selection in softwareFigure 15. Smart card voltage selection in software.

Menu 2: NFC Demo

  1. On the TFT screen, select the NFC icon. The NFC screen displays (Figure 16).

    Demo NFCFigure 16. Demo NFC

  2. Place the NFC (ISO14443 A or B) card in proximity range of the antenna PCB connected on the left side of the EV kit. A successful reading results in a beep, and the card data displays on the screen (Figure 17).

    NFC card read screenFigure 17. NFC card read screen.

Menu 3: MSR Demo

  1. On the TFT screen, select the MSR icon. The MSR screen displays (Figure 18).
  2. Swipe a card through the MSR card track to begin activity.
  3. Demo MSRFigure 18. Demo MSR.

Menu 4: Keypad Demo

  1. On the TFT screen, select the Keypad icon. The Keypad screen displays (Figure 19).
  2. Use the keypad or touchscreen to test. Keypad selections display on the TFT screen.
  3. Keypad menuFigure 19. Keypad menu

Menu 5: Information Screen Demo

  1. On the TFT screen, select the Information icon to display available fonts (Figure 20).
  2. Use the left and right arrow icons to scroll through the pages.
  3. Information menuFigure 20. Information menu.

Menu 6: Slideshow Demo

  1. On the TFT screen, select the Slideshow icon to display a full image on the screen (Figure 21).
  2. To begin slideshow, select the Start button on the screen.
  3. Slideshow menuFigure 21. Slideshow menu.

Bare-metal Demo Example

The bare-metal demo provides the same functionality as the FreeRTOS demo. It is included as a reference for customers who prefer not to use RTOS in their development.

  1. To test the bare-metal demo, see the Creating Demo Example section in this document.
  2. On the Select Project Configuration window, in the Demo example type field, select MAX32570_Demo_BareMetal.

MAX32570-MNKit

The MAX32570-MNKit does not include NFC, MSR, and keypad functionality. If an attempt is made to run a demo on the MNKit for NFC, MSR, or keypad, the following message is displayed This EvKit Does not support MSR/NFC.

MAX32570-MNKitFigure 22. MAX32570-MNKit.

Maxim and DeepCover are registered trademarks of Maxim Integrated Products, Inc. Windows® is a registered trademark of Microsoft Corporation.