robertobucher / pysimCoder

Block diagram editor and real time code generator for Python
GNU General Public License v3.0
142 stars 31 forks source link

Blocks for control of 3-Phase DC motor over SPI #49

Closed beqirdio closed 2 years ago

beqirdio commented 2 years ago

These are all new blocks which are made for controlling a 3-Phase DC motor by utilizing an SPI connection with a hardware driver which uses FPGA.

One commit is only for the support given for NuttX, tested on the ESP32C3 RISC-V board.

The other commit is for support of RaspberryPi board for the same operations.

There is also one minor addition to the Makefile for the /nuttx/devices folder which includes more support files for the "CONFIG_SPI=y" condition.

Links to the documentation of previous implementation of the code on Simulink which was originally made for the RaspberryPi can be seen here: https://gitlab.fel.cvut.cz/otrees/nuttx-demos/-/wikis/pmsm-control

The new code was developed for the purpose of making a Demonstration for my Bachelor's thesis. The .dgm files will be pushed to the "pysimCoder-examples" repository in order to simply "Plug and Play" the block for direct usage on a 3-Phase Motor.

robertobucher commented 2 years ago

Tomorrow I'll check both PR

Roberto

On 5/11/22 17:12, Michal Lenc wrote:

@.**** commented on this pull request.


In CodeGen/nuttx/devices/Makefile https://github.com/robertobucher/pysimCoder/pull/49#discussion_r870443328:

@@ -48,6 +48,8 @@ ifeq ($(CONFIG_SPI),y) SRCALL += heater.c SRCALL += RLC.c SRCALL += DCMOT.c +SRCALL += nuttx_p3m_spi.c

Just a warning, there may be a merge conflict (or overwrite) with my PR #48 https://github.com/robertobucher/pysimCoder/pull/48. Whatever is merged later will most likely overwrite the previously merged change in CodeGen/nuttx/devices/Makefile.

— Reply to this email directly, view it on GitHub https://github.com/robertobucher/pysimCoder/pull/49#pullrequestreview-969562501, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7WD7RCFM523BB7JVH5ZDTVJPE6XANCNFSM5VVDKQVA. You are receiving this because you are subscribed to this thread.Web Bug from https://github.com/notifications/beacon/AB7WD7ST7BCZL7LGFWE4PJDVJPE6XA5CNFSM5VVDKQVKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOHHFFTBI.gifMessage ID: @.***>