Writing a Custom UART Driver
-
@Moderator Hi, our team is going to be writing a driver for UART control of vertiq motors for PX4 soon. Additionally I'm prototyping with a VOXL 2 Mini and have got the tool chain running. I know the voxl 2 works a bit differently than a standard px4 stm32 board. I was looking at the modalIO and I notice it is enabled in both voxl2-slpi and voxl2 default.px4board files. Is the slpi folder for the DSP half of the chip? Is it just a completely different board that I should ignore?
Thanks,
Luca
-
@Moderator Hi, our team is going to be writing a driver for UART control of vertiq motors for PX4 soon. Additionally I'm prototyping with a VOXL 2 Mini and have got the tool chain running. I know the voxl 2 works a bit differently than a standard px4 stm32 board. I was looking at the modalIO and I notice it is enabled in both voxl2-slpi and voxl2 default.px4board files. Is the slpi folder for the DSP half of the chip? Is it just a completely different board that I should ignore?
Thanks,
Luca
@LucaVertiq you will need your uart driver to run in the slpi portion of the build. you should be able to find everything you need here: https://docs.modalai.com/voxl-px4/
-
@LucaVertiq you will need your uart driver to run in the slpi portion of the build. you should be able to find everything you need here: https://docs.modalai.com/voxl-px4/
@Moderator Thanks, that's where I've been looking. I'll have to look harder at the slpi portion of the build to understand it better. If I have more questions I'll be back. Thanks!
-
@Moderator Thanks, that's where I've been looking. I'll have to look harder at the slpi portion of the build to understand it better. If I have more questions I'll be back. Thanks!
@LucaVertiq Yes, you have a choice of where to put the driver depending on what UART port you are planning to use. If you use a UART available to the applications processor then you would use the standard voxl2 build. If you use a DSP UART then you would use the voxl2-slpi build.
-
@LucaVertiq Yes, you have a choice of where to put the driver depending on what UART port you are planning to use. If you use a UART available to the applications processor then you would use the standard voxl2 build. If you use a DSP UART then you would use the voxl2-slpi build.
@Eric-Katzfey Ahh that makes sense. I see in the voxl 2 mini datasheet that it says apps or slpi proc for each uart. That's great.
So on the slpi proc how do I know what uart number to use in PX4. It looks like in the spektrum driver is selects uart 7 and the modal_io driver selects uart 2 which seems to match QUP7 and QUP2 in the datasheet:

Am I understanding that correctly so far?
-
@Eric-Katzfey Ahh that makes sense. I see in the voxl 2 mini datasheet that it says apps or slpi proc for each uart. That's great.
So on the slpi proc how do I know what uart number to use in PX4. It looks like in the spektrum driver is selects uart 7 and the modal_io driver selects uart 2 which seems to match QUP7 and QUP2 in the datasheet:

Am I understanding that correctly so far?
@LucaVertiq Yep, that is correct.
-
@LucaVertiq Yep, that is correct.
@Eric-Katzfey Thanks to you we now have our motors running right off the SLPI processor with PX4 as a UART 'bus'. Everything seems to work great. The main issue was figuring out what qshell commands to send to start it up properly.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login