Skip to content

Latest commit

 

History

History
122 lines (78 loc) · 3.93 KB

README.md

File metadata and controls

122 lines (78 loc) · 3.93 KB

Firmware Infineon/Cypress PSoC6 Internal

Edge Impulse enables developers to create the next generation of intelligent device solutions with embedded machine learning. This repository contains the Edge Impulse firmware for Infineon/Cypress PSoC62 43012 Pioneer Kit with IoT SENSE. This device supports all of Edge Impulse's device features, including ingestion, remote management and inferencing.

Introduction

This project supports:

  • Data ingestion using the EdgeImpulse Studio
  • Sensor Fusion for Inertial and Environment sensor
  • Live inference, including of a Sensor Fusion model
  • Data sampling from the BMX160 IMU and DPS310 Barometer+Temperature sensor on the IoT SENSE board
  • Storing samples on the external NOR Flash using the QSPI inteface

Project dependencies (all libraries are provided in this code repository):

  • PSoC6 io_retarget library for debug UART functionality
  • PSoC6 serial-flash library for accessing NOR Flash over QSPI interface
  • PSoC6 SPI library for hardware-driven Master SPI interface needed by the BMX160 driver
  • BMX160 driver with Bosch BMI160 and BMM150 library for IMU functionality
  • Fix for BMX160 CHIPID (see more in Troubleshooting)
  • Buffix for DPS310 configuration

Requirements

Software

  • Install ModusToolbox SDK and IDE
  • Toolchain in the SDK is GNU Arm® embedded compiler v9.3.1

Hardware

Building

ModusToolbox IDE

Comammand Line

  1. Install ModusToolbox

  2. Clone this repository.

  3. Open terminal and go to the directory with cloned project

  4. Run the following commands

    make getlibs
    make build
    

Docker

  1. Build docker image

    docker build -t edge-impulse-infineon .
    
  2. Build firmware

    docker run --rm -v $PWD:/app edge-impulse-infineon
    

Flashing

ModusToolbox IDE

Infineon provides extensive documentation, with screenshots, about how to use the ModusToolbox IDE. Topics covered include:

  • Importing a project
  • Building the project
  • Flashing the project to the board

Please visit this link for the Infineon ModusToolbox IDE guide

Command Line

  1. After building the firmware (see steps above) connect the board and run

    make program
    

Standalone

  1. Install CyProgrammer

  2. Connect the board and run CyProgrammer

  3. Select a probe/kit

  4. Select compiled hex file with compiled firmware

  5. Connect to the board

  6. Program the firmware

  7. After successful flashing, you should see a LED blinking patter

Troubleshooting / Known issues

BMX160 issues

This project includes a modified version of the BMI160 library in order to modify the expect CHIPID from 0xD1(BMI160) to the correct 0xD8(BMX160). In case ModusToolbox updates the BMI160 library, please make sure to check the BMI160_CHIP_ID definition in bmi160_defs.h file.

The project also addresses the following BMX160 specifics for out-of-the-box experience:

  • BMX160 needs a rising edge on Chip Select early after power-on.
  • Do not assign Chip select pin to the SPI driver, instead assign it to the BMX160 driver.
  • Do not work at the recommended 10MHz SPI or expect scrambled bits, 8MHz provides stable output.