Hi @ceggers1
Thanks for your response.
> In our user space code we are reading two spi parallel
yeah, two spi configured in device tree file.
pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82
>;
};
pinctrl_ecspi2_cs: ecspi2cs {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x40000
>;
};
pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x82
MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x82
MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x82
>;
};
pinctrl_ecspi1_cs: ecspi1cs {
fsl,pins = <
MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x40000
>;
};
&ecspi2 {
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>;
cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
status = "okay";
spidev0: spi@0 {
reg = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <5000000>;
};
};
&ecspi1 {
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>;
cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
status = "okay";
spidev1: spi@0 {
reg = <0>;
compatible = "dh,dhcom-board";
spi-max-frequency = <5000000>;
};
};
> but we are facing issue for data loss
In while loop we unable to get proper count data one second timer was running to monitor while look it's not fixed count varies to (13k to 23k data per second)
If we comment another spi thread we are getting 14k data per second.
If two spi thread runs we facing issue for data loss.
We have tried first line one spi read with 3.5MHZ and next line read another spi 1MHZ but we unable to achieve 14k data only we getting 8k data per second.
> we unable to achieve 14k data read per second.
one spi we are reading 6bytes and another spi 2bytes of data
Where need to change sdma transfer size ?
> Now we are thinking like one spi for linux and another spi for m4 core reads the data.
In M4 spi code keep on reads spi data and send via some ipc mechanism to linux user space code. Is this possible.
Thanks & Regards,
Vasu