marcosartore
Posts: 14
Joined: Thu Jan 15, 2015 3:07 pm

CM3 as SPI Master ?

Tue Feb 14, 2017 5:42 am

Hi,
as far as I know the Rpi board cannot be programmed to work as an SPI Master. I am wondering if the novel CM3, having more signals routed on the connector, can instead behave as an SPI Master. Any advice ?

Moreover, up to now I have programmed the Rpi SPI in C by means of the bcm2835 library by Mike McCauley. Does this library still work with the BCM2837 of the CM3 ? Any other programming option ?

Many thanks in advance,
Marco

User avatar
RaTTuS
Posts: 10456
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: CM3 as SPI Master ?

Tue Feb 14, 2017 7:55 am

I think you have it the wrong way round.
the RPi can only act as a master
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

marcosartore
Posts: 14
Joined: Thu Jan 15, 2015 3:07 pm

Re: CM3 as SPI Master ?

Tue Feb 14, 2017 9:21 am

I'm sorry, you are definitely right, I switched the master-slave words. Pardon.
So, let me ask the opposite: can the CM3 act as an SPI slave ?
Thanks,
Marco

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: CM3 as SPI Master ?

Wed Feb 15, 2017 9:14 am

@joan here has attempted to use the spi peripheral in slave mode, unfortunately so far without success: viewtopic.php?t=162790&p=1061380

baantonia
Posts: 63
Joined: Fri Feb 06, 2015 2:19 pm

Re: CM3 as SPI Master ?

Wed Feb 15, 2017 9:52 am

I've attempted on other Pis but failed SPI slave mode. I have a CM1 but don't have a CM3 yet, one on order.
Seems an issue across all versions?
If it can be done I'm not sure what I'm doing wrong. So far have found no code to compare against.
As far as I can see data gets placed into the FIFO but doesn't go onto the wire and the FIFO eventually fills up, other signals are fine.

Return to “Compute Module”