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.

OMAP-L138 SPI

Other Parts Discussed in Thread: OMAP-L138

Hello!

I am trying to setup a spi communication on the OMAP-L138 experimenter Board.

I connected a breakout board to the J13 connector on the board and wanted to measure the voltage levels. As far as i know the schematic from the board, the J13 has SPI0_CLK, SPI0_ENA, SPI0_SOMI and SPI0_SIMO pins. these pins i wanted to address via c code and measure the voltage level.

I used a sample code from TI where the SPI_init() for initialisation and SPI_xfer() for transmitting/receiving data methods were implemented. For the SPI_init() method i used the correct configuration i think, the only thing i am wondering is if there is a minimum frequency for the SPI, i use 800 Hz. The SPI_init() does finish without any error, but i cannot see any change in voltage level, but there must be one, at least the CLK signal should be visible??

Can anybody help me here out? thanks.

regards Christian

  • Christian,

    Which SPI are you using SPI0 or SPI1? What is the frequency at which you have set the CPU. There is a min an d max value for the SPI electrical timings mentioned inthe data sheet. For SPI0 this is tied to CPU CLK [SYSCLK1] . Maximum SPI can be run is SYSCLK2/3 and minimum at [SYSCLK2/256]. Where SYSCLK2= [SYSCLK1] / 2.

    If you use SPI1 then you can program the clocks independent of the CPU frequency as the input clock to that module goes through PLL1 and not PLL0.

    What is the state of your enable pin after the initialization? The clock will only be seen when data is transmitted and is not a free running clock so try transmitting some data. also to check your pin setup, you can try configuring the pins as GPIO pins and try to see if the right pins toggle to check your hook ups.

    Regards,

    Rahul

  • I am using SPI0, cpu is at 150MHz i think ( = SYSCLK2 is 150MHz ), so minimum would be around 58KHz..

    i thought SPI1 is somewhat reserved for programming the flash? have you got any sample code for SPI or more simple, any code just for toggling bit to see something happens?

    all pin states are low.

    i already tried to transmit one byte but same thing, pin states were low all the time.

    Other question: Is the J13 right? in the schematic there were J28 and J29 which also had wires to SPI0 and SPI1.

    thank you!

    christian