SPI frequency issue on nRF7002 DK

Hi there

I'm trying to make the SPI work on nRF53 (My board is nRF7002 DK) refer the tutorial academy.nordicsemi.com/.../ but I had the issue about frequency of spi peripheral.

Specifically:
When I config the the max frequency of SPI equal to 125Khz, I can get the output signal on the logic analyzer

&spi1 {
    compatible = "nordic,nrf-spim";
    status = "okay";
    pinctrl-0 = <&spi1_default>;
    pinctrl-1 = <&spi1_sleep>;
    pinctrl-names = "default", "sleep";
    cs-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
    max-frequency = <0x7a1200>;
    gendev: gendev@0 {
        compatible = "vnd,spi-device";
        reg = <0>;
        spi-max-frequency = <125000>;  // <= THIS CHANGE
        label = "GenDev";
    };
};

But when I try to change the frequency of SPI to higher, such as 500Khz, 1MHz. Signal on logic analyzer becomes strange (Please refer below picture)

&spi1 {
    compatible = "nordic,nrf-spim";
    status = "okay";
    pinctrl-0 = <&spi1_default>;
    pinctrl-1 = <&spi1_sleep>;
    pinctrl-names = "default", "sleep";
    cs-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
    max-frequency = <0x7a1200>;
    gendev: gendev@0 {
        compatible = "vnd,spi-device";
        reg = <0>;
        spi-max-frequency = <1000000>;  // <= THIS CHANGE
        label = "GenDev";
    };
};
I also tried with SPI0-> SPI4 but still get the same issue
Below is the source code I used (I use nRF connect SDK 2.9.0)
Did I miss anything? Looking forward to your feedback.
Thank you
Parents
  • Hi

    Just so we're on the same page. The SPI pins aren't connected to anything here, you're just checking with a logic analyzer, correct? Are you certain the analyzer supports higher frequencies?

    I don't see this being a problem I'm afraid. If the SPI max frequency is the only thing you changed there shouldn't be any reason for it to not operate. You can try adding some debug logging in your configs and upload the full log here for us to review.

    Best regards,

    Simon

Reply
  • Hi

    Just so we're on the same page. The SPI pins aren't connected to anything here, you're just checking with a logic analyzer, correct? Are you certain the analyzer supports higher frequencies?

    I don't see this being a problem I'm afraid. If the SPI max frequency is the only thing you changed there shouldn't be any reason for it to not operate. You can try adding some debug logging in your configs and upload the full log here for us to review.

    Best regards,

    Simon

Children
No Data
Related