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-L1 EVM with C6748 spi example

Other Parts Discussed in Thread: OMAP-L138

Hi

I have the OMAP-L138 EVM with C6748 SOM. 

From the spi example code (pspdrivers_01_30_00_05\packages\ti\pspiom\examples\evm6748\spi\edma\src code), I understand that it uses spi0 to acces a flash chip and erases, writes and reads a sector of that chip. Since spi_Test() does not complain that data comparison fails, I assume this code works.

However, I have a few problems with this example:

1. I can't seem to find a flash chip connected to spi0. The only flash chip that I can find is M25P64, which is a 64 Mbit chip connected to spi1 (according to the schematics). Am I overlooking something?

2. I have a custom breakout board for J13 (PMDC) and J28 (EMIF-A); spi0 should be available on these connectors. However, if the example program runs, I cannot see proper clock, simo and somi signals. The clock signal seems like a nice sinusiod at 25 MHz with 1.2 V amplitude (captured on my scope with 500 MSa/s, so it shouldn't be a scoop bandwith issue). The other signals are constant (don't change). This clock is also present when the cpu is halted and before spi is initialized, so I'm not sure that it really is a proper spi signal. Should spi0 signals always be present on J13/J28 when spi sample is run? Or are there some multiplexers / dip switches that need to be set?

3. spi1 should be available on J30 (AUDIO). I don't have a breakout for that connector, but probing there with my scope did not reveal any spi signals. Again: multiplexer / dip switches issue?

Best regards

Admar

  • 1) On the EVM the SPI flash is hooked up to SPI1. I believe the sample code you are looking at also used SPI1, but you can double check this. There is no SPI flash connected to the SPI0 pins, so the test should fail with SPI0.

    2) Can you check the PINMUX registers in SYSCFG to make sure they are set to SPI mode? That is most likely the issue.

    3) Again it is probably an issue with the PINMUX registers not being set. If you checked that and it was correct, try doing a simple GPIO toggle test using the memory window and verify that the connectivity is there.

    Jeff

  • 1) You're right. I was a little confused by the line 'GIO_create("/Spi0",IOM_INOUT,NULL,&chanParams,&gioAttrs);'. I thought '/Spi0' meant 'use device spi0', but I see now that in spiSample.tci, Spi0 is configured to use device id 1. If I understand correctly, this device id determines that it uses spi1.

    2 & 3) I haven't touched the pinmux settings, so they are the same as for the evm6748 platform init (0x00101110u). I checked this with SPRUGM7D, but from that document, I would guess this needs to be 0x00111110 (i.e.: also set SPI1_SOMI Control to 1 (select SPI1_SOMI), instead of 0 (select 3-state)). Yet, the example code (read/write flash) is working with SPI1_SOMI set to 3-state. So: is SPI1_SOMI pinmux not needed (3-state is ok)? Or is the example code changing the pinmux again somewhere else in the code and I haven't yet discovered that?

    It also turned out that the probes from my scope were not good (not suitable for high frequency signals it seems). I've changed them for better probes and made sure the ground reference is ok and now I do see proper spi signals on the pins of the flash chip.

    I've now modified the code to use spi0 (by setting deviceId to 0 in spiSample.tci and setting PINMUX3 to 0x10001111 and to repeat sending out 0xFF, 0x55, 0x00, 0xAA over spi. I now do see something like spi signals on J28: I see a clock signal at approximally 21 MHz on the clock pin and the 4 bytes on the SIMO pin. However, the levels are wrong: for both clock and simo, "high" is at 3.4 V and "low" is at 1.8 V. I measure this on the vias near J13 and J28, and the ground that I used was J24 (DGND). Is this ok? Or should those levels be 3.3 - 0 or 1.8 - 0?

    Regards

    Admar

  • Unfortunately the SPI0 pins are muxed with the MII pins, which are connected to the ethernet PHY on the SOM. The SIMO pin is being driven by the CRS output of the PHY, so unless you can disable the PHY you will see contention when using SPI0.

    Can you use a difference chip select on SPI1 instead? This goes to the J30 connector instead, but should be a lot easier to get working.

    Jeff

  • Thanks a lot. I've switched back to SPI1 and hacked my breakout board and now I see proper SPI signals on J30. (At least: clock and data look fine. I'm still struggling a little with getting chip select to work, but there are several posts in this forum here which should help me with this.)

    Admar

  • Hi Jeff,

    I hope this followup can still be seen by you. I am facing the same problem of using SPI0_SIMO signal. Unfortunately in my case, SPI1 has been used as slave by other device and I have to use SPI0 as a master to drive a DAC. 

    I was wondering is there any way to power down the PHY? I found from some other post that even powering down PHY doesn't work because the pull-up/pull-down resistor in the PHY is always connected. It seems that I have no other choice but to physically disconnect that wire from PHY, which how can be done in the PCB?

    thanks,
    Fu