Skip to content

GSoC 2021: pysimCoder integration with NuttX

Michal Lenc edited this page Aug 5, 2021 · 13 revisions

NuttX Support for Rapid Control Applications Development with pysimCoder

This page contains information about project NuttX Support for Rapid Control Applications Development with pysimCoder applied by Michal Lenc for 2021 Google Summer of Code under The Apache Foundation. The mentors of this project are Roberto Bucher, Pavel Píša and Brennan Ashton. In depth week by week update, including problems and demonstrations, can be found in NuttX Github issue GSoC: NuttX support for pysimCoder (info thread). Documentation describing compilation of pysimCoder with NuttX with the representative configurations for target platforms will be presented by the end of GSoC period.

Project description

Main goal of the project is to integrate and test pysimCoder support for various kinds of drivers supported by NuttX RTOS. The main target platform is iMXRT1060 MCU, but some other platforms (STM32 or RISC-V MCUs) can also be considered for testing and demonstration. The list of planned implementations includes:

  • SocketCAN support
  • incremental encoder application demonstration with iMXRT MCU
  • digital/analog converter and additional block for a test sensor
  • multiple channel PWM block (might require further implementation to NuttX driver)
  • current sensing support
  • and more

List of commits to pysimCoder and NuttX

This list contains contributions to pysimCoder and NuttX project during GSoC period

Representative outputs from the project

Meetings

This section contains informations about weekly meetings with project mentors starting the first week of the coding period (meetings before the oficial start of GsoC are not mentioned here). Problems to be discussed on the meeting should also be mentioned here prior to the meeting,

Meeting 01 – 10. 6. 2021

  • presented application for DC motor control with Nucleo F446RE
  • discussed ideas about implementing PSD controller block and anti windup block
  • discussed the process of implementating NuttX sensors drivers to pysimCoder
  • decision to store information about progress and meetings in pysimCoder wiki

Meeting 02 - 24. 6. 2021

  • presented contributions since last meeting (DHT sensor, DAC block, PWM multichannel block and PWM driver for iMXRT)
  • discussed the option to create a single block that would control DC motor
  • discussed the approach with current sensing testing and demonstration

Meeting 03 - 1. 7. 2021

  • presented implementation of TCPsocketTx block and real time plotter adjustment to receive data over TCP
  • discussed the tickless mode options in NuttX configuration
  • discussed options of implementing state space controllers

Meeting 04 - 8. 7. 2021

  • discussed possible aproaches what to do in blocks when initialization fals (current aproach is to close the device and exit the application, but this might not be the best option when the problem occurs only in nonessential block like TCPsocketTX that sends data to the plotter)
  • presented changes to nuttx_ADC block (multiple channel output from ADC), discuss implementing some of the ADC parameters (number of channels, resolution) to block parameters
  • presented updates regarding the tickless mode for iMXRT MCU

Meeting 05 - 15. 7. 2021

  • presented finisheded tickless mode for iMXRT MCU
  • discussed upcoming PMSM demo application

Meeting 06 - 22. 7. 2021

  • discussed recent changes to PWM block and the approach to ADC multichannel block (resulted in adding new ioctl command for ADC driver and terminating loops in PWM drivers when channel number is -1)
  • discussed external hardware triggering for ADC

Meeting 07 - 5. 8. 2021

  • discuss NuttX Documentation for pysimCoder integration
  • present current progress with PMSM application example