I can confirm that this patch works for us. Thanks.
Posts by heing
-
-
It is not possible to read data from serial port when input buffer contains exactly 9 bytes. The following code demonstrates the issue:
The number 9 is related to the length of the rx_fifo_trig in drivers/tty/serial/imx.c. For kernel 5.4.70, it was possible to set this value to 1 in the device tree, but for kernel 5.15.148, this didn't work for me anymore. The new work-around was to disable dma using the "no-dma" setting in device tree. Anyway, this seems like a bug in the serial port implementation which should be fixed.
-
I can confirm that this is still an issue in 5.15.148 and the mentioned work-around no longer works.
F+S: can you provide more information about this issue and how to fix it?
-
Anyone knows if this is this still an issue in kernel 5.15.148?
-
Thanks. It did not make any difference for me, but what actually worked was changing the chip select to use GPIO instead of native chip select line:
Using GPIO instead of native chip select is also mentioned here:
kernel.org/doc/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txtI don't understand why the native chip selected suddenly changed to active high. The reason for using GPIO instead was not related to that. I really haven't looked into changing that though.
Also, the fsl,spi-num-chipselects is obsolete and should be replaced by num-cs. If not, the value defaults to 3.
-
After upgrading to Linux 5.15.148, the chip select on spidev on ecspi3 goes high when active instead of low. I've tested using unmodified device tree files on armStoneA9r2q. Running on kernel 5.4.70 works fine. ecspi2 spidev seems to work as expected. Any reason why this would happen?
Verified using downloaded F&S Kirkstone sdcard image and spidev_test.c application.
-
Thank you! This seems to have solved my issue.
-
After some more investigation, I've found out that the problem depends on the length of the payload. I have short circuited RX and TX on port ttymxc2 and run the following python script (requires pyserial):
The code produces the following output:
Length 9 failed
Length 18 failed
Length 27 failed
Length 36 failed
Length 45 failed
Length 54 failed
Length 63 failed
Length 72 failed
Length 81 failed
Length 90 failed
Length 99 failed
All requests of length dividable by 9 are lost. This happens on kernel 5.4.70, but not on 4.1.15. Is anyone able to reproduce this behavior?
-
I have a sensor connected to /dev/ttymxc2 and this works fine with kernel 4.1.15. After upgrading to kernel 5.4.70, the communication stops working. The sensor uses a binary protocol with request and reply. After the upgrade, some of the replies from the sensor are lost, but some are still received. This is consistent. Certain commands always work and others never work. Typical for commands that doesn't work is that the delay before response is higher, 20-30ms.
I've verified with an oscilloscope that the sensor sends the response.
I use pyserial, but I've also verified the issue using stty and dd.
Is there any reason why serial communication behaves differently in the two kernel versions? Kernel configuration and devicetree is unchanged.
-
Where can I find information about the armStoneA9r3 board?
-
If you don't care about patches from F&S, you can use a vanilla Buildroot. Just use the F&S kernel. We use Buildroot version 2017.11.2 without any problems. I have also booted Debian 9 from sd card without much trouble, but I haven't had a chance to test it. Btw, official Debian 9 support would be cool and would enable us to run things like Azure IoT Edge on the board.
-
Another question:
The GPS sends the 1PPS signal on pin 42 (LED_WWAN) and pin 46 (LED_WPAN) on the Mini PCIe connector. Is any of these pins connected to the CPU so I can read it using GPIO?
Kind regards,
Hein Gustavsen
Miros AS -
Thank you! I knew about the USB interface, but I was so caught up in the PCI error message that I did not think about trying USB. I had to enable USB_ACM in the kernel (USB Modem (CDC ACM) support) and then I got the /dev/ttyACM0 device as expected.
Thank you for helping me resolve this issue!
Kind regards,
Hein Gustavsen
Miros AS -
Is the 1.5V voltage used by the module?
Thank you for this tip. The GPS receiver does not use 1.5V as far as I can see.
Our armStoneA9r2 does not provide 1.5V on the PCIe socket, but I guess that this is not the problem here. I will wait for you to test the PCIe interface and provide me with the correct kernel and device tree configuration.
Kind regards,
Hein Gustavsen
Miros AS -
For which field of application do you need it?
We use an Advantech EWM-G108H PCIe GPS module.Kind regards,
Hein Gustavsen
MIros AS -
Any news on this?
-
Thank you!
-
Thank you. Software I2C on GPIO pins works fine for me.
Kind regards,
Hein Gustavsen
Miros AS -
Jonas, did you manage to get the PCIe running?
F+S: What is the current status for PCIe on armStoneA9r2? Do you have any patches or do you plan to include support in the upcoming release?
I plan to use a PCIe GPS receiver (USB).
Kind regards,
Hein Gustavsen
Miros AS -
This is still a problem. armStoneA9r2 contains GPIO reference card for armStoneA9.