LPSPI frequency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPSPI frequency

162 Views
ankita_hegde
Contributor I

Hello Team,

We are using NXP's I.MX8DXL processor with LPSPI for CANFD communication. With this setup we are able to send around 900 can messages per second for 500Kb bit-rate and 1Mb data-bit rate so we want to increase this count.


Currently we have spi-max-frequency as 5MHz so what is the maximum spi frequency in case of lpspi and also by increasing this frequency can we send larger number of messages per second.

this is our dts for reference:

&lpspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi2>;
fsl,spi-num-chipselects = <1>;
cs-gpios = <&lsio_gpio4 22 GPIO_ACTIVE_HIGH>;
status = "okay";


tcan4x5x0: tcan4x5x@0 {
compatible = "ti,tcan4x5x";
reg = <0>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <5000000>;
bosch,mram-cfg = <0x0 3 2 32 10 1 32 7>; 
clocks = <&hclk>, <&cclk>;
clock-names = "hclk", "cclk";
interrupt-parent = <&lsio_gpio3>;
interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
data-ready-gpios = <&lsio_gpio3 12 GPIO_ACTIVE_HIGH>;
reset-gpios= <&exp2 12 GPIO_ACTIVE_HIGH>;
iw-tcan-prop;
wakeup-source;
status = "okay";

};
};

Regards,
Ankita

0 Kudos
Reply
2 Replies

121 Views
ankita_hegde
Contributor I

Hello @Alejandro_Salas 

Thank you for the previous reply. We referred the dts file you had sent and made spi frequency as 10MHz but we were able to get only 1020 CAN messages per second.


Basically we want to increase the number of CAN messages received, so is there any suggestion that you can give that will help in increasing this rate.

Regards,

Ankita

0 Kudos
Reply

142 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @ankita_hegde 

I hope you are doing well.

Please refer to the imx8qxp-lpddr4-val-lpspi.dts, there is configured the LPSPI2 to works at 10MHz.

 

Best regards,

Salas.

0 Kudos
Reply