Skip to content

Ino Getting Started

jaenrig-ifx edited this page Aug 5, 2020 · 5 revisions

Overview

In this quick tutorial we will go through one of the hall-switch examples available for the TLE4964-3M and the XMC microcontroller family in Arduino.

Required experience

  • Experience level: beginner
  • Basic computer user level
  • Basic programming skills (C/C++)
  • Basic soldering skills (recommended)

Required Hardware

Name Picture
TLE4964-3M Shield 2Go
XMC 2Go
Magnet (included with the Shield 2Go)
Pin headers (included with the boards)
Micro-USB to USB A cable

Required Software

  • Windows 10
  • Segger J-Link
  • Arduino IDE
  • XMC-for-Arduino (Installed with Arduino IDE)
  • This library (Installed with Arduino IDE)

Tutorial

Software Installation

  1. Install Arduino IDE. If you are new to Arduino, please download the program and install it first.

  2. Install XMC Board. The official Arduino boards are already available in the Arduino software, but other third party boards as the Infineon XMC MCU based need to be explicitly included. Follow the instructions in the link to add the XMC board family to Arduino.

  3. Install the library. In the Arduino IDE, go to the menu Sketch > Include library > Library Manager. Type hall-switch and install the library.

Hardware Setup

The TLE4964-3M Shield 2Go just need to be stacked on the XMC 2Go microcontroller board.

Then, simply connect it to the computer with the USB cable.

Note ⚠️ : If the pin headers provided are not press-fit you will need to solder them on the corresponding boards. Otherwise, use your preferred way of connecting the hardware.

Ready To Go!

With everything ready, now we are going to upload and run one of the library examples.

  1. Select the board.

    Once installed, you can select the one of the supported board from the menu Tools > Board:... and configure its parameters.

    Then we simply need to install the library to use it in your project:

  2. Include it in your sketch. With the library installed in the Arduino IDE, you can include it from the menu "Sketch > Include Library > Hall-Switch". The header #include <hall-switch-ino.h> will be added to your sketch. You can also open and test one of the examples provided in File > Examples > Hall-Switch

    Open one of the examples: File > Examples > Hall-Switch > lib-interrupt.

    After selecting the board (Tools > Board > XMC1100 2Go*), and the proper COM port ( Tools > Port), the example sketch can be verified and uploaded to the target .

    Finally, we can check the monitor output . Do not forget to select the proper baudrate. Just move a magnet near the sensor and check the output field value changing from ON to OFF. Also the XMC2Go LED will turn on with the magnetic field presence :)