This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR1843: The SPI communication rate set in the code is different from the rate at which the oscilloscope detects CLK

Part Number: IWR1843

Hello:

We are using SDK3.6.0 and radar toolbox 1.0.0.26 software version. During the development of IWR1843 using SPI protocol communication, it is found that the SPI communication rate set in the code is inconsistent with the actual frequency of CLK output detected by the oscilloscope. The corresponding relationships of the specific test groups are as follows:

Set the SPI communication rate in the code(MHz

Oscilloscope detects CLK(MHz

 10

 10.57

 30

33.333 

 40

50 

Here I have two questions to ask:

1. Is there a one-to-one correspondence between the SPI rate set by the code and the frequency of the final output CLK, or is there a large gap between the corresponding relationship between each radar chip (this is because I do not have a lot of statistics on the corresponding relationship between the output frequencies of 18 radar chips, so I do not know Sure)

2. The rate set by the code is different from the actual output rate. Is this a rule for setting the SPI communication rate or a software defect?

If different 18 radar chips can output basically the same CLK frequency at the same SPI communication rate, this is also satisfactory for normal use. If you can help explain the reason for this phenomenon, please feel free to enlighten me, thank you.

Best Regards,

Gary

  • Hello Gary,

    Please refer to the relevant Technical Reference Manual, section 23, for the MibSPI peripheral: https://www.ti.com/lit/ug/swru522e/swru522e.pdf

    Specifically, look at the diagram under 23.2.2 MibSPI Mode:

    Here you can see the system/registers that actually directly affect the clock that is generated. The high-level SDK code/API abstract away this ability to directly control the clock; however, you may modify the register values themselves (or at least read them and understand how the values within configure the clock). The prescale is block controls the clock divide, thus generating the speed of the SPICLK from the VBUS peripheral clock. The SPIFMT0 register's PRESCALE field and the EXTENDED_PRESCALE register set the prescale amount at the register level.

    So, to answer your questions:

    1. Yes, there is a 1:1 correlation between the SDK SPI APIs and the values that get set in the registers. You can look into the SDK functions to see this.

    2. This is to be expected, there is only a certain amount of granularity that can be exacted with a discrete prescaler.

    3. If you set the same CLK speed (using the SDK APIs) on 18 radars, the radars' resultant clock speed will all be "off" by the same amount.

    Regards,
    Luke

  • Hi Luke,

    what does "the final clock speed of the radar will all be "off" by the same amount" in the third point exactly mean?

    Best Regards,

    Gary

  • Hi Gary,

    You are observing that when you request, let's say, 30MHz clk in code, your o-scope is detecting an actual output SPI clock of 33.33MHz. If you ran the same test on multiple radars all running the same SDK, you would see 33.33MHz on them all.

    The difference between the clock you request in software and the clock you see actually output is deterministic and will be the same across all the tested radars running the same code.

    Regards,
    Luke