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.

Testing SPI



Hello,

   Can anyone tell me how can I test if my SPI module is working. I am using F28069, to get the signals from ADC.

Thank you.

Regards-

  • Well, the way I'd test it (and have tested it many times) is
    to hook a scope probe up to each of the following pins:
     - SPISIMOx
     - SPISOMIx
     - SPICLKx
     - SPISTEx .

    where x is a letter signifying which SPI port you are using.

    The last applies only if you are using the built-in slave


    select line to select your SPI slave. If you are using some
    other pin, substitute it where I say "slave select."

    I would trigger on the slave select line, run my SPI
    application, and look for waveforms that resemble those in
    the appropriate section of your SPI Reference Guide.

    If you don't have a 4-channel scope, I would put my trigger
    probe on the slave select line and one on each of the other
    3, and test them one at a time.

    If your board is made of 100% SMT parts and you didn't place
    intentional test points on those lines for testing, I have
    had good luck at soldering AWG 28 wire into vias in the
    traces of the lines you want to measure, and clipping scope
    probes to them. 

    If a trace has no vias, you can try soldering to the chip
    pins, but that requires a lot more skill and hand/eye
    co-ordination.

    If you see no output on the SPI lines while application is
    running, I would set a breakpoint right before the return
    point in whatever function initializes the SPI port, and
    when the IDE hits it, go in and examine all the registers
    changed by the function, verifying they match what I just
    wrote to them.

    This has worked for me, at least.