Git Product home page Git Product logo

azure-rtos-on-azure-sphere-mediatek-mt3620's Introduction

page_type languages products description urlFragment
sample
c
azure-rtos
azure-sphere
This sample demonstrates how Azure Sphere and Azure RTOS are able to run together on MT3620 Development Kit.
azure-rtos-on-azure-sphere-mediatek-mt3620

Sample: MT3620 real-time capability application using Azure RTOS

This sample demonstrates how Azure Sphere and Azure RTOS are able to run together on MT3620 Development Kit.

This sample app for an MT3620 real-time core running Azure RTOS that creates several threads and repeatedly transmits message over a UART. These messages can be read in terminal application on a computer using a USB-to-serial adapter. By default, it uses the real-time core's dedicated UART, but if your hardware doesn't expose this UART's TX pin, then the sample can be altered to use a different UART.

To use this sample, clone the repository locally if you haven't already done so:

git clone --recursive https://github.com/Azure-Samples/Azure-RTOS-on-Azure-Sphere-Mediatek-MT3620

Contents

File/folder Description
demo_threadx Sample source code.
threadx Azure RTOS ThreadX source code (submodule).
mt3620_m4_software MediaTek 3620 HAL (submodule).
README.md This README file.

Prerequisites

  1. Seeed MT3620 Development Kit or other hardware that implements the MT3620 Reference Development Board (RDB) design.

  2. A USB-to-serial adapter (for example, FTDI Friend) to connect the real-time core UART to a USB port on your computer.

  3. A terminal emulator (such as Telnet or Termite to display the output.

Prepare your device

To prepare your device on Windows:

  1. Right-click the Azure Sphere Developer Command Prompt shortcut and select More>Run as administrator.

    The --EnableRTCoreDebugging parameter requires administrator privilege because it installs USB drivers for the debugger.

  2. Enter the following azsphere command:

    azsphere device enable-development --enablertcoredebugging
  3. Close the window after the command completes because administrator privilege is no longer required. As a best practice, you should always use the lowest privilege that can accomplish a task.

To prepare your device on Linux:

  1. Enter the following azsphere command:

    azsphere device enable-development --enablertcoredebugging

You may need to update the OS by using if you have an older device.

azsphere device recover

Set up hardware to display output

To prepare your hardware to display output from the sample:

  1. Attach the USB-to-serial adapter to your PC.

For Seeed RDB

  1. Connect GND on the USB-to-serial adapter to GND on your dev kit. On MT3620 RDB hardware, GND is Header 2, pin 2.

  2. Connect RX on the USB-to-serial adapter to TXD0 on your dev kit. On MT3620 RDB hardware, TXD0 is Header 2, pin 3.

Pinout

For Avnet Azure Sphere Starter Kit

  1. Connect GND on the USB-to-serial adapter to GND on your dev kit. On Avnet Azure Sphere Starter Kit hardware, GND is Click Socket #1, Header 2, pin 8.

  2. Connect RX on the USB-to-serial adapter to TXD0 on your dev kit. On Avnet Azure Sphere Starter Kit hardware, TXD0 is Click Socket #1, Header 2, pin 4.

Pinout

For Windows:

  1. Determine which COM port the adapter uses on the PC. If you're using the FTDI Friend adapter, start Device Manager, select View > Devices by container, and look for FT232R USB UART.

  2. On the PC, start a terminal emulator and then open a 115200-8-N-1 terminal to the COM port used by the adapter.

For Linux:

  1. Find out which port the serial device is connected to:

    dmesg | grep ttyUSB

    The port should be named ttyUSBn, where n indicates the port number.

  2. Set up a terminal program to monitor the port. For example, the following commands set up Minicom to monitor port 5, but you can use any program you prefer:

    sudo apt install minicom
    
    sudo minicom -D /dev/ttyUSB5 -b 115200

Build and run the sample

See tutorial to learn how to build and deploy this sample: Tutorial: Build a real-time capable application

Note: You need Azure Sphere SDK version >= 20.07 to build and run the sample.

Observe the output

The connected terminal emulator should display output from the demo_threadx program. The program outputs the threads status incrementally:

Output

References

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-rtos-on-azure-sphere-mediatek-mt3620's People

Contributors

liydu avatar microsoftopensource avatar kartben avatar bawilless avatar microsoft-github-operations[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.