Problems with SPI on BB Blue

90 views
Skip to first unread message

TB

unread,
Apr 30, 2020, 11:02:56 AM4/30/20
to BeagleBoard
Hi,

I'm trying to use SPI to talk to a PS2 Receiver. But whatever I do, the MOSI stays high when sending the data:

spi_capture.png


Any ideas?
Thanks.

Jason Kridner

unread,
Apr 30, 2020, 12:46:44 PM4/30/20
to beagl...@googlegroups.com
On Thu, Apr 30, 2020 at 11:02 AM 'TB' via BeagleBoard <beagl...@googlegroups.com> wrote:
Hi,

I'm trying to use SPI to talk to a PS2 Receiver. But whatever I do, the MOSI stays high when sending the data:

spi_capture.png


As always, check the show-pins.pl output to make sure the mux is right.

Who is the clock master in this system?

What is the SPI configuration code like?
 


Any ideas?
Thanks.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/7ffa5fb5-d939-480d-aeec-e8a9a21d8604%40googlegroups.com.


--
https://beagleboard.org/about - a 501c3 non-profit educating around open hardware computing

TB

unread,
May 1, 2020, 12:15:49 AM5/1/20
to BeagleBoard
Hi,

As always, check the show-pins.pl output to make sure the mux is right.

P9.29 / hdmi audio fs            101 B13 fast rx down 3 spi 1 data 0     ocp/P9_29_pinmux (pinmux_P9_29_spi_pin)
P9
.30                            102 D12 fast rx      1 pwm 0 tripzone   eqep@48300180 (pinmux_eqep0_pins)


it isn't, I think. P9.30 should also be on the spi pin.

but when I try to change the pinmux mode:

$ sudo config-pin p9.30 spi
ERROR
: open() for /sys/devices/platform/ocp/ocp:P9_30_pinmux/state failed, No such file or directory


Somehow the eqep is grabbing that pin, but I don't know how to change this...

 

Who is the clock master in this system?
It's the BB Blue. I think that clock and chipselect work correctly, as I can see them in the logic analyzer.

 
What is the SPI configuration code like?
200khz, mode3, 8bits. but right now, my major problem is getting the MOSI pin to work :-)


TB

unread,
May 1, 2020, 12:34:44 AM5/1/20
to BeagleBoard
I also see in dmesg:

[    1.090099] pinctrl-single 44e10800.pinmux: pin PIN102 already requested by 48300180.eqep; cannot claim for ocp:P9_30_pinmux
[    1.101500] pinctrl-single 44e10800.pinmux: pin-102 (ocp:P9_30_pinmux) status -22
[    1.109087] pinctrl-single 44e10800.pinmux: could not request pin 102 (PIN102) from group pinmux_P9_30_spi_pin  on device pinctrl-single
[    1.121460] bone-pinmux-helper ocp:P9_30_pinmux: Error applying setting, reverse things back



TB

unread,
May 1, 2020, 1:02:21 AM5/1/20
to BeagleBoard
ok, I solved the sending part:

spi_capture_ok.png


I added an overlay that disables `eqep0`:

/dts-v1/;
/plugin/;


/ {
    model
= "TI AM335x BeagleBone Blue";
    compatible
= "ti,am335x-bone-blue", "ti,am33xx";


    fragment@0
{
        target
= <&eqep0>;
        __overlay__
{
     status
= "disabled";
       
};
   
};
};


And how the pins are correctly muxed:

P9.42a                            89 C18 fast         2 spi 1 cs 1       ocp/C18_pinmux (pinmux_C18_spi_pin)
P9
.31 / hdmi audio clk           100 A13 fast rx  up  3 spi 1 clk        ocp/P9_31_pinmux (pinmux_P9_31_spi_sclk_pin)

P9
.29 / hdmi audio fs            101 B13 fast rx down 3 spi 1 data 0     ocp/P9_29_pinmux (pinmux_P9_29_spi_pin)

P9
.30                            102 D12 fast rx down 3 spi 1 data 1     ocp/P9_30_pinmux (pinmux_P9_30_spi_pin)






Michele Xiloyannis

unread,
Oct 26, 2020, 9:37:46 AM10/26/20
to BeagleBoard
HI TB, 

thanks a lot for posting your issue and the solution. I am having exactly the same problem with a BBBlue, with the 2018-10-07 BeagleBone Blue Flasher Image from Strawson Design. 
Could you please give me a bit more details on how you disabled the eqep0? Where did you add the overly that does so?
Many thanks!

Michele 
Reply all
Reply to author
Forward
0 new messages