Discussion:
[Gumstix-users] I2C interface as bridge between Aero2Core to Duvero
Glen Wernersbach
2017-01-24 17:59:42 UTC
Permalink
Hi All,

I am curious if it is possible to use the I2C interface as data bridge from
the Aero2Core to the Duvero?

I can¹t get the serial to reliably work in periods less than a second.

Glen
--
Andrew C. Smith
2017-01-25 17:45:48 UTC
Permalink
Hi Glen,

My apologies for being absent on here ... I'll try and go back and answer
all your previous questions.

Although I've never actually done it, theoretically I think it should be
possible to do communication over I2C (using jumper wires on the header). I
would expect that one of the devices can act as a slave. However, why are
you resorting to using I2C? UART is the easiest but you've said you're
having issues (I'll try and address those other threads). What about SPI?
I have done some communication between the DuoVero and M4 via SPI and it
worked well enough. I did see some packet errors with large packets at
higher rates (DuoVero is master, M4 is slave). We're currently working on
resolving this SPI bridge issue.


Thanks,

Andrew



--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971218.html
Sent from the Gumstix mailing list archive at Nabble.com.
Glen Wernersbach
2017-01-25 18:26:33 UTC
Permalink
I may have meant SPI. There are two bridges in the documention. Uart and one other.

See my previous thread about uart. Trying to send 64bytes every 16ms from M4 to duovero. Something is not right in that direction. Other direction works great!

Glen Wernersbach View Profile
Innovator and CEO
MotionLABs LLC.
Making the Next Thing Happen Now!
629 Old State Route 74 – Suite 210
Cincinnati, Oh 45244
513-240-9929
Post by Andrew C. Smith
Hi Glen,
My apologies for being absent on here ... I'll try and go back and answer
all your previous questions.
Although I've never actually done it, theoretically I think it should be
possible to do communication over I2C (using jumper wires on the header). I
would expect that one of the devices can act as a slave. However, why are
you resorting to using I2C? UART is the easiest but you've said you're
having issues (I'll try and address those other threads). What about SPI?
I have done some communication between the DuoVero and M4 via SPI and it
worked well enough. I did see some packet errors with large packets at
higher rates (DuoVero is master, M4 is slave). We're currently working on
resolving this SPI bridge issue.
Thanks,
Andrew
--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971218.html
Sent from the Gumstix mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Andrew C. Smith
2017-01-25 19:01:03 UTC
Permalink
So that's 64bytes at just over 60Hz ... that's not a lot of data. The
default MAVLink data stream I don't think is too far off that, most of the
messages are at 10Hz but some are more. What software are you using on
either end? Are you using stock PX4 software on the M4? Yocto on the
DuoVero?

Thanks,

Andrew



--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971221.html
Sent from the Gumstix mailing list archive at Nabble.com.
Glen Wernersbach
2017-01-25 19:34:45 UTC
Permalink
Yocto with Linux real time recipes on duovero.

Stand M4 software.

Used the mavlink-socket example for serial setting on duovero.

Used the mavlink server serial setting on the M4.

Mavlink is disabled.

Been though lots of different things to try to get this working.



Glen Wernersbach View Profile
Innovator and CEO
MotionLABs LLC.
Making the Next Thing Happen Now!
629 Old State Route 74 – Suite 210
Cincinnati, Oh 45244
513-240-9929
Post by Andrew C. Smith
So that's 64bytes at just over 60Hz ... that's not a lot of data. The
default MAVLink data stream I don't think is too far off that, most of the
messages are at 10Hz but some are more. What software are you using on
either end? Are you using stock PX4 software on the M4? Yocto on the
DuoVero?
Thanks,
Andrew
--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971221.html
Sent from the Gumstix mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Glen Wernersbach
2017-02-03 21:18:35 UTC
Permalink
Andrew,

Do you have any sample code on how to address the SPI bridge from the Duovero Linux?

Glen

Glen Wernersbach View Profile
Innovator and CEO
MotionLABs LLC.
Making the Next Thing Happen Now!
629 Old State Route 74 – Suite 210
Cincinnati, Oh 45244
513-240-9929
Post by Andrew C. Smith
Hi Glen,
My apologies for being absent on here ... I'll try and go back and answer
all your previous questions.
Although I've never actually done it, theoretically I think it should be
possible to do communication over I2C (using jumper wires on the header). I
would expect that one of the devices can act as a slave. However, why are
you resorting to using I2C? UART is the easiest but you've said you're
having issues (I'll try and address those other threads). What about SPI?
I have done some communication between the DuoVero and M4 via SPI and it
worked well enough. I did see some packet errors with large packets at
higher rates (DuoVero is master, M4 is slave). We're currently working on
resolving this SPI bridge issue.
Thanks,
Andrew
--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971218.html
Sent from the Gumstix mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
g***@jetsoftdev.com
2017-02-08 13:49:50 UTC
Permalink
So on the Duovero Linux the TTYO... devices address the serial.

Does the TTYS... address the spi ports?



--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971244.html
Sent from the Gumstix mailing list archive at Nabble.com.
Andrew C. Smith
2017-02-14 14:53:53 UTC
Permalink
Hi Glen,

I do have some SPI bridge stuff that I used for a project. It worked OK up
to a certain bandwidth but then I would see failures. The cutoff bandwidth
was lower than what I needed so I opted not to publish it. We are currently
picking away at a replacement, once that's verified it will get posted. In
the mean time, I'll try and find the code and post it here.

No the TTYS device is not the SPI port. The SPI ports on the M4 and the
DuoVero require a bit more work to use.


Andrew



--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971245.html
Sent from the Gumstix mailing list archive at Nabble.com.
Glen Wernersbach
2017-02-14 16:51:20 UTC
Permalink
Andrew,

Thanks. Let me know I am stuck right not being able to communicate reliably between yo boards and have been considering go to another platform. Would rather not start my project all over again.

It's a little work to try my serial test software on your standard download. I really don't think this is the problem. I think you have a driver, FIFO or interrupt problem. I will do it if you think it is worthwhile.

Glen



Glen Wernersbach View Profile
Innovator and CEO
MotionLABs LLC.
Making the Next Thing Happen Now!
629 Old State Route 74 – Suite 210
Cincinnati, Oh 45244
513-240-9929
Post by Andrew C. Smith
Hi Glen,
I do have some SPI bridge stuff that I used for a project. It worked OK up
to a certain bandwidth but then I would see failures. The cutoff bandwidth
was lower than what I needed so I opted not to publish it. We are currently
picking away at a replacement, once that's verified it will get posted. In
the mean time, I'll try and find the code and post it here.
No the TTYS device is not the SPI port. The SPI ports on the M4 and the
DuoVero require a bit more work to use.
Andrew
--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971245.html
Sent from the Gumstix mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Glen Wernersbach
2017-02-20 19:56:55 UTC
Permalink
Andrew,

Any more info on this?

If I can¹t get a fairly reliable data connection between to the two chips
I am going to have to move to another platform other than Gumstix. I hate
to move because I have already put a lot of development into this
platform.

Right now at over serial 16ms I get a failure every third packet. At a
second period maybe one out of 10.

I will try your standard off the shelf OS for the duovero side but I am
pretty sure that is not the issue.

Glen
--
Glen Wernersbach View Profile <http://www.linkedin.com/in/GlenWernersbach>
Innovator and CEO
MotionLABs LLC.
"Making the Next Thing Happen Now!"

513-240-9929
Post by Andrew C. Smith
Hi Glen,
I do have some SPI bridge stuff that I used for a project. It worked OK up
to a certain bandwidth but then I would see failures. The cutoff bandwidth
was lower than what I needed so I opted not to publish it. We are currently
picking away at a replacement, once that's verified it will get posted.
In
the mean time, I'll try and find the code and post it here.
No the TTYS device is not the SPI port. The SPI ports on the M4 and the
DuoVero require a bit more work to use.
Andrew
--
http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-t
o-Duvero-tp4971217p4971245.html
Sent from the Gumstix mailing list archive at Nabble.com.
--------------------------------------------------------------------------
----
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Glen Wernersbach
2017-03-03 05:25:37 UTC
Permalink
Andrew,

There is definitely a problem with the serial bridge. When I connect the
Duvero UART to the M4 UART using the header and jumpers. My code works
fine. When I use the same expect code just with different TTY to
communicate over the serial bridge between the two chips, it fails.

What is the differences between these two UART sets?

Glen
--
Glen Wernersbach View Profile <http://www.linkedin.com/in/GlenWernersbach>
Innovator and CEO
MotionLABs LLC.
"Making the Next Thing Happen Now!"

513-240-9929
Post by Andrew C. Smith
Hi Glen,
I do have some SPI bridge stuff that I used for a project. It worked OK up
to a certain bandwidth but then I would see failures. The cutoff bandwidth
was lower than what I needed so I opted not to publish it. We are currently
picking away at a replacement, once that's verified it will get posted.
In
the mean time, I'll try and find the code and post it here.
No the TTYS device is not the SPI port. The SPI ports on the M4 and the
DuoVero require a bit more work to use.
Andrew
--
http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-t
o-Duvero-tp4971217p4971245.html
Sent from the Gumstix mailing list archive at Nabble.com.
--------------------------------------------------------------------------
----
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Glen Wernersbach
2017-03-04 21:24:44 UTC
Permalink
Any progress on the spi bridge code?

I can always pass things through the M4 over the my wired serial bridge but seems backwards.



Glen Wernersbach View Profile
Innovator and CEO
MotionLABs LLC.
Making the Next Thing Happen Now!
629 Old State Route 74 – Suite 210
Cincinnati, Oh 45244
513-240-9929
Post by Andrew C. Smith
Hi Glen,
I do have some SPI bridge stuff that I used for a project. It worked OK up
to a certain bandwidth but then I would see failures. The cutoff bandwidth
was lower than what I needed so I opted not to publish it. We are currently
picking away at a replacement, once that's verified it will get posted. In
the mean time, I'll try and find the code and post it here.
No the TTYS device is not the SPI port. The SPI ports on the M4 and the
DuoVero require a bit more work to use.
Andrew
--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971245.html
Sent from the Gumstix mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Andrew C. Smith
2017-03-06 15:57:22 UTC
Permalink
Hi Glen,

Wow, I'm really sorry about the delay on this.

I have attached a couple programs.

spidev_test.c <http://gumstix.8.x6.nabble.com/file/n4971263/spidev_test.c>
spi_bridge_m4.cpp
<http://gumstix.8.x6.nabble.com/file/n4971263/spi_bridge_m4.cpp>

spidev_test.c uses the spidev driver on the COM to initiate the transfer and
send data.
spi_bridge_m4.cpp is a program that runs on the M4 to receive data and send
some back.

In this setup, the M4 is the slave and the COM is the master. Setting a SPI
to slave on the M4 requires recompiling your code and making some changes to
the kernel and some of the SPI config files. I've added a couple of patches
here. I wouldn't suggest applying the patches directly to your tree because
they're based off an old version of PX4 and NuttX. Use them to create your
own patches. Some stuff may not be necessary, this was just stuff I used
for testing.

0001-Added-SPI-slave-mode-support.patch
<http://gumstix.8.x6.nabble.com/file/n4971263/0001-Added-SPI-slave-mode-support.patch>
0001-Added-spi_bridge-module-which-will-eventually-ta.patch
<http://gumstix.8.x6.nabble.com/file/n4971263/0001-Added-spi_bridge-module-which-will-eventually-ta.patch>


Hope this helps,

Andrew





--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971263.html
Sent from the Gumstix mailing list archive at Nabble.com.
Glen Wernersbach
2017-03-06 16:17:16 UTC
Permalink
Thanks,

These are necessary patches for yocto in on the duovero side?


My EE guesses you have a problem with something like CTS lines on the M4 to duvero serial bridge direction. Have not looked at the schematics or scoped it.

This is a lot more debug work than I wanted to do on a standard product.


Glen Wernersbach View Profile
Innovator and CEO
MotionLABs LLC.
Making the Next Thing Happen Now!
629 Old State Route 74 – Suite 210
Cincinnati, Oh 45244
513-240-9929
Post by Andrew C. Smith
Hi Glen,
Wow, I'm really sorry about the delay on this.
I have attached a couple programs.
spidev_test.c <http://gumstix.8.x6.nabble.com/file/n4971263/spidev_test.c>
spi_bridge_m4.cpp
<http://gumstix.8.x6.nabble.com/file/n4971263/spi_bridge_m4.cpp>
spidev_test.c uses the spidev driver on the COM to initiate the transfer and
send data.
spi_bridge_m4.cpp is a program that runs on the M4 to receive data and send
some back.
In this setup, the M4 is the slave and the COM is the master. Setting a SPI
to slave on the M4 requires recompiling your code and making some changes to
the kernel and some of the SPI config files. I've added a couple of patches
here. I wouldn't suggest applying the patches directly to your tree because
they're based off an old version of PX4 and NuttX. Use them to create your
own patches. Some stuff may not be necessary, this was just stuff I used
for testing.
0001-Added-SPI-slave-mode-support.patch
<http://gumstix.8.x6.nabble.com/file/n4971263/0001-Added-SPI-slave-mode-support.patch>
0001-Added-spi_bridge-module-which-will-eventually-ta.patch
<http://gumstix.8.x6.nabble.com/file/n4971263/0001-Added-spi_bridge-module-which-will-eventually-ta.patch>
Hope this helps,
Andrew
--
View this message in context: http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-to-Duvero-tp4971217p4971263.html
Sent from the Gumstix mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Glen Wernersbach
2017-02-23 16:12:46 UTC
Permalink
Andrew,

I am back to I2C and jumppering the two headers together.

The I2C appears to be referenced by a device in the Duvero operating
system. Do you Ithink the jumpered i2C would work for reliable
communication between the two chips at periods 16ms or less.

Glen
--
Glen Wernersbach View Profile <http://www.linkedin.com/in/GlenWernersbach>
Innovator and CEO
MotionLABs LLC.
"Making the Next Thing Happen Now!"

513-240-9929
Post by Andrew C. Smith
Hi Glen,
My apologies for being absent on here ... I'll try and go back and answer
all your previous questions.
Although I've never actually done it, theoretically I think it should be
possible to do communication over I2C (using jumper wires on the header).
I
would expect that one of the devices can act as a slave. However, why are
you resorting to using I2C? UART is the easiest but you've said you're
having issues (I'll try and address those other threads). What about SPI?
I have done some communication between the DuoVero and M4 via SPI and it
worked well enough. I did see some packet errors with large packets at
higher rates (DuoVero is master, M4 is slave). We're currently working on
resolving this SPI bridge issue.
Thanks,
Andrew
--
http://gumstix.8.x6.nabble.com/I2C-interface-as-bridge-between-Aero2Core-t
o-Duvero-tp4971217p4971218.html
Sent from the Gumstix mailing list archive at Nabble.com.
--------------------------------------------------------------------------
----
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...