Skip to main content

Timeline for Help? SPI communication slow

Current License: CC BY-SA 3.0

12 events
when toggle format what by license comment
Aug 18, 2015 at 14:34 vote accept Paul Terwilliger
Aug 18, 2015 at 14:34
Aug 18, 2015 at 6:21 answer added Lokanath timeline score: 1
Aug 17, 2015 at 21:36 comment added fceconel I'm afraid it'll be hard to circumvent the performance bottleneck; it may be due to the fact that there's a system call to be made (ioctl), which for many reasons is a time-consuming operation, or something in the driver code itself. You'd probably need to interface directly to the SPI port (and maybe this needs to be done in a device driver), which is no trivial task; I have no experience with Yocto or the SPI drivers for the Edison, so I don't think I can offer much further help.
Aug 17, 2015 at 18:41 comment added Paul Terwilliger @fceconel I found that the time to set up the SPI port over and over is eating a lot of time. I added the results to my post. Would you be able to help me with this?
Aug 17, 2015 at 18:40 history edited Paul Terwilliger CC BY-SA 3.0
added 453 characters in body
Aug 17, 2015 at 16:59 comment added Paul Terwilliger @fceconel I will try that and post results, thanks!
Aug 17, 2015 at 16:50 history edited Paul Terwilliger CC BY-SA 3.0
Added all of my code
Aug 17, 2015 at 16:32 comment added fceconel I'd suggest to try mraa_spi_write_buf, doing a large enough block transfer and comparing the results. Possibly the time to setup the SPI port over and over to transfer each byte is eating a lot of time.
Aug 17, 2015 at 16:17 comment added Paul Terwilliger I have omitted the initialization code. I can add that.
Aug 17, 2015 at 16:08 comment added Oleg Mazurov where is the piece that initializes SPI peripheral?
Aug 17, 2015 at 16:00 comment added MathieuL What is the data rate?
Aug 17, 2015 at 15:51 history asked Paul Terwilliger CC BY-SA 3.0