Difference between revisions of "Getting Started with CutiPy and FreeRTOS"

From wiki.emacinc.com
Jump to: navigation, search
Line 24: Line 24:
  
 
=== Setup ===  
 
=== Setup ===  
1. Download and install [https://www.st.com/en/development-tools/stm32cubeide.html STM32CubeIDE] (The IDE used for CutiPy FreeRTOS development) </br>
+
1. Download and install [https://www.st.com/en/development-tools/stm32cubeide.html STM32CubeIDE] (The IDE used for CutiPy FreeRTOS development, For more information on the STM32CubeIDE click HERE) </br>
 
2. Download EMAC's CutiPy FreeRTOS project </br>  
 
2. Download EMAC's CutiPy FreeRTOS project </br>  
 
3. Connect the ST-Link programmer to the CutiPy board for programming </br>
 
3. Connect the ST-Link programmer to the CutiPy board for programming </br>
Line 42: Line 42:
 
{{:Templateimpl:using | initials=BS | title=Developing with the Cutipy | desc=The following page can be used to get familiarized with Micropython the Cutipy. | project=OE 5.0 }}
 
{{:Templateimpl:using | initials=BS | title=Developing with the Cutipy | desc=The following page can be used to get familiarized with Micropython the Cutipy. | project=OE 5.0 }}
  
1.The baseline CutiPy FreeRTOS build has now been uploaded. Connect to the USB virtual com port on a serial terminal using Putty or TerraTerm.  
+
1.The baseline CutiPy FreeRTOS build has now been uploaded. Connect to the USB virtual com port on a serial terminal using Putty or TerraTerm. The USB virtual com port driver should install automatically after plugging the CutiPy to your PC. After successful installation of the driver '''STMMicroelectronics Virtual COM Port''' should be displayed as an available port. Connect to it as you would any normal serial port.
 +
 
 +
Note: The USB virtual com port will adjust it's baud rate to that selected by the terminal. It has been tested to work with standard baud rate selections from 110 to 921600.  
  
 
2.After connecting the CutiPy FreeRTOS menu will be displayed. Navigate to tests for a demonstration of CutiPy functionality.
 
2.After connecting the CutiPy FreeRTOS menu will be displayed. Navigate to tests for a demonstration of CutiPy functionality.

Revision as of 09:21, 17 March 2020

This page outlines a basic guide to getting starting using the Cutipy.

General Information

Tools Required

  • Desktop PC (Windows/Linux/Mac will work)
  • Micro-USB to USB Cable
  • ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32 with JTAG 20 pin to SWD 10pin adaptor


Setup

1. Download and install STM32CubeIDE (The IDE used for CutiPy FreeRTOS development, For more information on the STM32CubeIDE click HERE)
2. Download EMAC's CutiPy FreeRTOS project
3. Connect the ST-Link programmer to the CutiPy board for programming

  • Connect the 10 pin SWD connector (small ribbon cable) to the CutiPy Board HDR6. Ensure the the painted red wire of the cable is on the same side as the arrow.Connect the other end to the adaptor, again ensuring the arrow is aligned with painted red wire. Connect the ST-Link to the adaptor with the large ribbon cable, and connect the ST-LINK to your desktop with it's provided USB cable

4. Connect your CutiPy to Desktop using the micro-USB to USB cable. Your board is now powered.
5. Open STM32CubeIDE and import the CutiPy FreeRTOS project

  • If needed, upgrade your ST-LINK firmware by navigating to Help and selecting ST-LINK Upgrade. The ST Link upgrade window will open. Select refresh device list, and then select Open in update mode, and finally Upgrade

6. Build and upload the firmware

  • To build and upload select the debug symbol (To just build select the hammer symbol).


Developing with the Cutipy

1.The baseline CutiPy FreeRTOS build has now been uploaded. Connect to the USB virtual com port on a serial terminal using Putty or TerraTerm. The USB virtual com port driver should install automatically after plugging the CutiPy to your PC. After successful installation of the driver STMMicroelectronics Virtual COM Port should be displayed as an available port. Connect to it as you would any normal serial port.

Note: The USB virtual com port will adjust it's baud rate to that selected by the terminal. It has been tested to work with standard baud rate selections from 110 to 921600.

2.After connecting the CutiPy FreeRTOS menu will be displayed. Navigate to tests for a demonstration of CutiPy functionality.


EMAC has provided custom driver functions for the CutiPy's main peripherals. These are located under CutiPy_Drivers. See the source files for function descriptions. All of EMAC's custom functions will be prefixed by CP_ followed by the the DRIVER_NAME. Functions with the prefix CP_FRTOS utilize an RTOS element and should only be called with the scheduler running. We recommend user files be added to the CutiPy_User or that the user add their own custom folders, and not modify the project code directly. EMAC has provide custom system tasks to ease CutiPy use.


Figure 2: Qt Creator EMAC Project



Pages with Related Content

CutiPy Micropython Documentation

Cutipy Test Software

Cutipy-MicroPython Bluetooth LE demo

Micropython

CutiPy-Installing Micropython Firmware