# WP77xx/WP76xx SPI minimum speed

**URL:** <https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389>\
**Category:** WP Series\
**Created:** [January 22, 2025, 3:44pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389 "2025-01-22T15:44:04Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 22, 2025, 3:44pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/1 "2025-01-22T15:44:04Z")

</div>

Hello Everyone,

I have low speed SPI slave peripheral, 2400 baud actually.  
In the WP77/WP76 series specification I found that SPI1 master supported speed only from 960 kbps to 25 Mbps. In many other microcontrollers I used, was possible to set lower SPI speed than mentioned in documentation. Is it possible to set lower SPI speed here? Or just do not to try (because it will not work with guarantee)?

What about another approach? setup SPI to 960000 Hz as mentioned in the documentation, and make divider to provide 2400 Hz SPI clock to device. Then each bit to receive/send shall be represented by 400 bits with the same value. Anyone tried this? What maximum SPI master transaction length is supported?

With best regards, Sergey.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [January 22, 2025, 4:50pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/2 "2025-01-22T16:50:56Z")

</div>

You need to make some test to see whether it works or not as this is out of the scope of specification.

You can refer to these sample code and modify the clock speed:

> **[Spi clock interruption](https://mangoh.discourse.group/t/spi-clock-interruption/10147)**
>
> Hi, I’m using a custom WP7702 board and have strange behavior on the SPI bus. When sending 16 bytes in one write command, I see short bursts of 8-bits and then the clock pauses for 25us before sending the next 8 bits. I am expecting a continuous...

> [@How to use SPI ?](https://forum.sierrawireless.com/t/how-to-use-spi/8135/3):
>
> Any news on this? I have been trying to get SPI1 running now for a while on my WP85. SPI1\_MOSI and SPI1\_SCK looks OK on scope but I cannot set the SPI1\_MRDY pin which I use as a slave select to my SPI slave. See my code snippets below. #include "legato.h" #include "interfaces.h" #include \<stdint.h\> #include \<unistd.h\> #include \<stdio.h\> #include \<stdlib.h\> #include \<getopt.h\> #include \<fcntl.h\> #include \<sys/ioctl.h\> #include \<linux/types.h\> #include \<linux/spi/sierra\_spidev.h\> #define SPI\_CPH…

---

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 23, 2025, 12:50pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/3 "2025-01-23T12:50:22Z")

</div>

Minimum SPI frequency is 960000. It’s impossible to set lower value.  
However, I see 22us inter-word delays as in “Spi clock interruption” topic. I investigated, that delay\_usecs in spi transfer structure is always 0, so, it’s not the delay you mentioned in this topic. This delay is related to Qualcomm SPI bus master driver module.  
In more recent kernels they have word\_delay\_usecs SPI transfer parameter, to be able to change this delay from user-space.  
Do we have SPI configuration registers specification for WP77xx/WP76xx?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [January 23, 2025, 1:21pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/4 "2025-01-23T13:21:00Z")

</div>

> [@sergey.semernin](#):
>
> Minimum SPI frequency is 960000. It’s impossible to set lower value.

You have tried that???

> [@sergey.semernin](#):
>
> Do we have SPI configuration registers specification for WP77xx/WP76xx?

No, i don’t have, you might need to contact distributor to get it

Btw, you can also have a look at ./kernel/drivers/spi/spi.c to see if there is any register to change that

---

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 23, 2025, 1:24pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/5 "2025-01-23T13:24:51Z")

</div>

Yes, I tried this. 960 kHz minimum, and 50 MHz maximum. Exactly as mentioned in the documentation.  
I’m in doubt about this inter-word delay. It should not be by default. I found sierra,deassert-time set to 20 in the kernel device tree, but it’s related to SPI\_CS de-assert, and cs\_change is also set to 0 in all spidev calls.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [January 23, 2025, 1:26pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/6 "2025-01-23T13:26:53Z")

</div>

> [@sergey.semernin](#):
>
> Yes, I tried this. 960 kHz minimum, and 50 MHz maximum. Exactly as mentioned in the documentation

Then seems what you are looking for is out of specification

---

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 23, 2025, 1:27pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/7 "2025-01-23T13:27:37Z")

</div>

But 20us inter-word delay is out of SPI specification as well.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [January 23, 2025, 1:31pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/8 "2025-01-23T13:31:17Z")

</div>

Where is the spi specification you mentioned?

---

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 23, 2025, 1:33pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/9 "2025-01-23T13:33:02Z")

</div>

I meant common SPI specification. It should support continuous data block transfers, without slow-down delays.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [January 23, 2025, 1:35pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/10 "2025-01-23T13:35:43Z")

</div>

Some spi slave might not care about this  
Is your hardware being blocked?

---

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 23, 2025, 1:40pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/11 "2025-01-23T13:40:38Z")

</div>

My hardware SPI works at 2400 Hz. The difference between 960000 and 2400 is 400 times. I made generator to provide 2400 Hz SPI\_CLK to device, synchronized with SPI\_CLK from the WP77xx. Then, to transfer 1 bit to device, I should have 400 consequent bits with the same value in SPI buffer. 1 byte is represented by 400 bytes. And vice versa, for receiving of the data from device. For this approach SPI master should not have inter-word delays at all.

---

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 23, 2025, 1:49pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/12 "2025-01-23T13:49:21Z")

</div>

> [@sergey.semernin](#):
>
> sierra,deassert-time

I tried to set “sierra,deassert-time” for spi1 to 0 value. Now inter-word delay is about 2 microseconds. In other words, approximately 2 periods of SPI\_CLK. The question is why this parameter affects transaction with SPI\_CS active and not switching.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [January 23, 2025, 1:55pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/13 "2025-01-23T13:55:33Z")

</div>

See if this helps.  
Here shows 24 clock pulse continuously

> **[le\_spi\_WriteHD() doesn't work right for SPI with 24 bits per word](https://forum.legato.io/t/le-spi-writehd-doesnt-work-right-for-spi-with-24-bits-per-word/3822/3)**
>
> Hi, I’ve created a small SPI test program which runs on my mangOH Green board with a WP76xx controller. fwupdate query returns: Firmware Version: SWI9X07Y\_02.18.05.00 000000 jenkins 2018/07/19 17:40:21 Bootloader Version: SWI9X07Y\_02.18.05.00...

---

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 23, 2025, 2:02pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/14 "2025-01-23T14:02:08Z")

</div>

It’s absolutely different problem,  
I’m using 8 or 32 bits per word, and transferring 400 bytes array at 960000 Hz. On the external device side it will be exactly 1 byte at 2400 Hz. Of course, this array should be properly encoded, to emulate waveform for 2400 Hz rate. 400 bytes **in one SPI transaction**.  
What I see is that SPI\_CS switching properly before the beginning of transaction, and after end of it. However, after each word (8 or 32 clock periods) SPI master making delay for 22 us (by default) or for 2 us (when spi1 sierra,deassert-time is set to 0 in kernel DTS). And during this delay SPI\_MOSI is always set to 0 logic level. This blocks all.

---

<div class="post-metadata">

**Author:** ![sergey.semernin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sergey.semernin](https://forum.sierrawireless.com/u/sergey.semernin)\
**Post date:** [January 23, 2025, 2:12pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/15 "2025-01-23T14:12:35Z")

</div>

So, probably, I need to switch to GPIO bit-banging to emulate low-speed SPI, using high resolution timer in Linux Kernel.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [January 23, 2025, 2:15pm UTC](https://forum.sierrawireless.com/t/wp77xx-wp76xx-spi-minimum-speed/34389/16 "2025-01-23T14:15:26Z")

</div>

Yes, you can try this:

> **[\[WP7605\]\[SW\] How to indicate the periodic signal, in order to use external...](https://forum.legato.io/t/wp7605-sw-how-to-indicate-the-periodic-signal-in-order-to-use-external-window-wdt/5087)**
>
> Back Ground: WP7605 does not support HW WDT, so I consider to use external Window WDT IC in the case of runaway the legato or WP7605. In this case, Window WDT needs the periodic pulse from WP76xx, in order to notify keep-alive. Question: Could...

I remember I can generate some clock signal like 2000Hz with a GPIO pin.
