Hi,
I have make a new thread for this problem:
MCP2515 on CE1 do not work at same time with moitessier hat.
(2.0.21 Pi 4)
I have find out following:
By adding:
dtoverlay=mcp2515-can1,cs=1,oscillator=16000000,interrupt=25
throug the CAN BUS App of openplotter the SPI with CE1 should be load.
Code:
dmesg | grep -i -E "(mcp|spi)"
says:
[ 4.689934] mcp251x spi0.1 can0: MCP2515 successfully initialized.
so far all right
but in the devicetree the SPI is called spidev0.0
I think that shoul make problems with Moitessier driver?
(2020-01-13, 09:59 AM)glowntiger Wrote: [ -> ]Hi,
I have make a new thread for this problem:
MCP2515 on CE1 do not work at same time with moitessier hat.
(2.0.21 Pi 4)
I have find out following:
By adding:
dtoverlay=mcp2515-can1,cs=1,oscillator=16000000,interrupt=25
throug the CAN BUS App of openplotter the SPI with CE1 should be load.
Code:
dmesg | grep -i -E "(mcp|spi)"
says:
[ 4.689934] mcp251x spi0.1 can0: MCP2515 successfully initialized.
so far all right
but in the devicetree the SPI is called spidev0.0
I think that shoul make problems with Moitessier driver?
Hi, I can or should do something to correct. If you explain step by step what to do then I am attaching what you need! A pity if it wasn't solved for the next fair there!
Hi Sailoog,
I´m not realy conform with overlays.... But what do you think:
The original raspberry overlay:
https://github.com/raspberrypi/linux/blo...verlay.dts
Here the SPI is load to 0/1:
Code:
/* the spi config of the can-controller itself binding everything together */
fragment@4 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
can1: mcp2515@1 {
reg = <1>;
compatible = "microchip,mcp2515";
pinctrl-names = "default";
pinctrl-0 = <&can1_pins>;
spi-max-frequency = <10000000>;
interrupt-parent = <&gpio>;
interrupts = <25 0x2>;
clocks = <&can1_osc>;
And here the moitessier is also load to 0/1:
https://github.com/mr-rooney/moitessier-...8c1f389773
Code:
moitessier0: moitessier@0{
compatible = "rooco,moitessier";
#address-cells = <1>;
#size-cells = <0>;
What do you think?
Let's not panic, everything is working right
The only wrong thing here is the way we check if the SPI is enabled. We use lsmod to check if spidev is present in the list but when you enable MCP2515 lsmod no longer returns spidev. Just do not trust the warning messages of SPI being disabled because it is enabled and working.
The solution is to switch to another flag. I have tested spi_bcm2835 and it works for MCP2515 enabled and disabled in my Raspberry 4 but I need to know if this is true for raspberry 3 too. Please could you test in RPi3 typing this in the terminal for both states (with MCP2515 and without)?
Code:
lsmod | grep spi_bcm2835
You should get something like:
Hi Sailoog,
thanks.. sometimes the solutions are quite easy...
This is on my Pi 4
On Pi 3 I check in the evening...
Thanks
Thomas
(2020-01-15, 10:06 AM)glowntiger Wrote: [ -> ]Hi Sailoog,
thanks.. sometimes the solutions are quite easy...
This is on my Pi 4
On Pi 3 I check in the evening...
Thanks
Thomas
Hi Glowntiger, even after the latest kernel update of PI3 and also PI4 (4.19.93), and CAP Moitessier update, everything works fine without your card. As an attack on the PI to the MCS, SPI is disconnected and the serial interfaces do not work. I hope that in the meantime you will be able to have a Moitessier CAP to arrive at a solution. How's your booth going at your BOOT? Good job and good wind!
[img]
[/img]
Hi Max,
The fair is going well...
as described above from Sailoog this isn´t a bug of the SPI. It is only a wrong check of the SPI .
(2020-01-22, 12:58 PM)glowntiger Wrote: [ -> ]Hi Max,
The fair is going well...
as described above from Sailoog this isn´t a bug of the SPI. It is only a wrong check of the SPI .
[img]
[/img]
Hi, apart from the red writing of the SPI, which is only a warning without consequences, the configuration of the CAN bus that automatically OPs on "Canbus (canboatjs)" (and not Canbus (canboat) seems to work anyway. Not so 'for the serial port configurations, which automatically switch to "ttyAMA0" and there is no way to make them work! Do the tests as soon as you have time and let me know! Good job and good wind always!
(2020-01-25, 03:16 PM)Max1947 Wrote: [ -> ] (2020-01-22, 12:58 PM)glowntiger Wrote: [ -> ]Hi Max,
The fair is going well...
as described above from Sailoog this isn´t a bug of the SPI. It is only a wrong check of the SPI .
[img][/img]
Hi, apart from the red writing of the SPI, which is only a warning without consequences, the configuration of the CAN bus that automatically OPs on "Canbus (canboatjs)" (and not Canbus (canboat) seems to work anyway. Not so 'for the serial port configurations, which automatically switch to "ttyAMA0" and there is no way to make them work! Do the tests as soon as you have time and let me know! Good job and good wind always!
Vedi anche:
[img]
[/img]
[img]
[/img]
Hi max,
this is only a problem of the serial APP. You can use the serial ports directly in signal K. Then you must set the connection to ttySC0 - ttySC3. This should work perfectly… ;-)
The ttySC port is always the same after reboot...
Fixed in openplotter-moitessier - 2.0.4-beta
marking as solved