-
Notifications
You must be signed in to change notification settings - Fork 102
GNSS receiver as SPI slave #74
Comments
Hi there and thanks for contacting. An SPI driver wouldn't be a difficult thing to do but we would need to implement and test it across all our currently supported platforms before we could publish it properly here, which is where the time goes. First question: what platform is this on (I think NRFConnect/Zephyr but please confirm)? Depending on your timescales, a few possibilities arise:
@hkro, @manemannen (our product managers) probably have an opinion on how high up the priority-list this goes [only important for options 2, 3, and 4 of course], though I'd guess that customer-pull trumps most things :-). |
@RobMeades thanks for the quick reply! We are using nRFConnect SDK with Zephyr. We will work on 1 for now, but if any of the other options become things you are actively working on, please let us know because they would much appreciated! |
@RobMeades Option 1 is proving to be more of a burden than anticipated. There are apparent issues during startup, particularly in functions such as |
OK: I have a bit of a break in what I am meant to be doing at the moment and so I will see if I can do something between 2 and 3 and push out a preview branch that will at least get you working. There will still be a chance of API changes after the preview branch because I will not be able to test it properly on all platforms but such changes will be minor. I hope to have something for next week. |
After the preview branch of this feature, we'll ship it in ubxlib v1.2. After UART, SPI is the 1st choice to attach a GNSS receiver as a slave to a ubxlib host (SPI master). |
Update: the SPI |
I have now pushed a preview branch of SPI support here: https://github.com/u-blox/ubxlib/tree/preview_spi_rmea. To repeat the dire warnings I've added there, this preview branch has NOT been heavily tested and the SPI-related contents of it (i.e. the most recent four commits of the branch) remain SUBJECT TO CHANGE. All of the examples/tests are updated to include use of SPI where relevant and I've run all of them manually, quite a few times, on Zephyr nRF52/nRF53, so I believe it is good, however it has not had the maturity/thrash testing I would normally like. In other words, option (3) above. Let me know how you get on with it. |
@RobMeades I'm trying to build it and getting a few errors:
What version of Zephyr are you using for this to make sure I'm on the same or can find some differences? |
We are using NCS 2.1.0 and can't backport to 1.6.1 right now, so that's likely our issue. I may dig into how we have to modify that for 2.1.0. |
Of course, this is probably some other Zephyr 3.x change. Gah. Maybe I should go get a copy of NCS 2.1.0... |
Double gah! The Zephyr version we are using allows you to just specify a chip select GPIO number and it will work; the later versions of Zephyr has drawn the chip select into the horrible mess of the device tree and removed the flexibility. Gawd, I hate the device tree. |
Is that something you'll be able to look into? Or should I? |
Don't worry, I'll fix it tomorrow. |
Update: though I have what might be a fix, Nordic have moved where they store their toolchains after version 2 and our installation scripts can no longer find them. If you want to have a go at using the fix while I hack the hack of the hack to try to persuade the right tools to install, find attached the relevant file, which needs to go in the Amazing how running the tiniest embedded system somehow needs three PC applications and more than a gigabyte of download to install it :-|. |
Update: I've built with NRF Connect 2.1.0 now but they've changed the debugger side as well so I will need to do battle with that on Monday. In the meantime an updated file with compilation errors fixed is attached in case you feel the urge. |
Update: I have now verified that our Zephyr-platform SPI implementation supports the version 3 Zephyr structure as used in NRF Connect 2.1.0 and the preview branch is updated to reflect this. |
@RobMeades I'll give that a shot today. Thank you! |
Having issues with the device tree not finding my device. I'm fairly familiar with the device tree these days, so I'm a little baffled. How do you have the SPI device setup in your device tree file? |
[from Rob, logged in as I tested on an NRF53 DK board, for which I took the standard Zephyr
...where:
...and:
[Just as an aside, our standard test Then, for the pins passed into the This led to one dodge: even though I'm passing the So in my test code the |
Ok, digging into this again today. Forgot to mention, uPortSpiInit() wasn't being called anywhere so I kept getting an error because the gMutex was NULL. |
Receiving data now. Still seem to be a few issues, but they may be on my end, so investigating why. Keep receiving 0xFF's after the initial message I receive. Trying to just follow the example to filter for "GPGGA" messages right now. |
The SPI support code has now been pushed to |
With the SPI configuration available on several devices, but not being available in the ubxlib, could we get the SPI support in ubxlib?
The text was updated successfully, but these errors were encountered: