Hi,
I'm working on a BLDC/PMSM motor driver based on Nuttx and I would like to put it on Nuttx upstream soon.
At this point it is designed to work with STM32F334 (Nucleo board) and X-NUCLEO-IHM08M1 board, but most of the control logic is universal and can be easy ported to other hardware (PID controllers, space vector modulation, FOC current regulator, etc).
So here is my question: is there any place in Nuttx source where I can put control logic code which is reusable?
Gregory, what do you think about creating something like 'control' directory in libc and include/control.h?
Regards
The control logic is highly dependent on the board hardware and most control algorithms will work based on high-priority interrupts which, I understand should be implemented as board level code.
--
You received this message because you are subscribed to the Google Groups "NuttX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nuttx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Do you think it is possible to move these math functions to apps/ like
a library?
Hello again,
I separated most of the reusable functionality from my PMSM motor driver and put it to the libc directory.
For now I decided to change name from "control library" to "dsp library".
You can find it here:
1. https://bitbucket.org/raiden00/nuttx/src/motor_driver/include/dsp.h
2. https://bitbucket.org/raiden00/nuttx/src/motor_driver/libc/dsp/
For now I decided to change name from "control library" to "dsp library".
What do you think about it ?
.... When we talked before, my understanding was that this was an OS internal "library" in which case it should not go in libc but in nuttx/dsp (or nuttx/control as we talked about before). ...
This is still focused primariy on control. Does it really make sense to think of this as a generic DSP library?
I think that a DSP support library is too specif to be at the level of nuttx/dsp. If it is not in libc or libdsp, it probably should be in driver/dsp. There are other OS internal libraries under drivers/ as well (mostly mixed in with functionally related things).
What do you think about that? Can I bring it onto a branch? Are to ready to do the last steps to prepare to merge to master. Are you ready for detailed review?
This is still focused primariy on control. Does it really make sense to think of this as a generic DSP library?I agree that name 'DSP library" is broad and I will not insist on it. I wanted to create a place where in the future some other DSP stuff can go.
I think that a DSP support library is too specif to be at the level of nuttx/dsp. If it is not in libc or libdsp, it probably should be in driver/dsp. There are other OS internal libraries under drivers/ as well (mostly mixed in with functionally related things).
It doesn't use any internal OS interface, only math. The idea was that it could be used in both application code and OS code. In this case, as I understand it should be in nuttx/libdsp.
What do you think about that? Can I bring it onto a branch? Are to ready to do the last steps to prepare to merge to master. Are you ready for detailed review?
I just need to add/update some comments, move it to the correct location (nuttx/libdsp?) and I will prepare pull-request.
--
You received this message because you are subscribed to the Google Groups "NuttX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nuttx+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nuttx+un...@googlegroups.com.
When I look at the OS, I don't think of any of the directories beginning with lib as truly a part of the OS. They are there only for convenience; they have nowhere else to be. I think that some could be moved to apps/. because they are never used within the OS (libnx, libc/wqueue, etc.) I am not sure if I am ready to move them out yet (perhaps next release, 7.25 which will happen next week).
Moving share-able libraries to a separate repository (or /libs directory for now) sounds good for me.