Problems with SPI on BB Blue

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.

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:

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?

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 :slight_smile:

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

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)

`

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