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.

OMAPL138 LCDK SPI0 Issue

Other Parts Discussed in Thread: OMAPL138, ADS1298R, OMAP-L138

OMAPL138 LCDK SPI0 Issue

 

Hello,

I have recently started  to work with OMAPL138LCDK. My goal is to connect the Texas Instruments ADS1298R ECGFE front page via SPI. The most convenient solution is to connect it via J15 connector on the LCDK, as it has  all the SPI0 pins required for the connection to the ADS.I have  to setup the OMAPL138 so that the signals would appear on the J15 SPI pins: SPIO_SOMI, SPIO_SIMO, SPIO_CLK, UART0_TX (which from what I understood can be configured also as SPIO_SCSN4), all according to the following schematics: http://processors.wiki.ti.com/images/b/bc/OMAP-L138_C6748_LCDK_Ver_A4.pdf 

To implement the communication between the ADS and the LCDK I attempted to use the solution which I found in the OMAP_STARTERWARE version 1.10.03.03 the project called spi_c64x_omapl138_lcdkOMAP138 which reset the fingerprint sensor via SPI1. I successfully compiled the program, loaded it to the OMAPL138 and it worked- In my oscilloscope set to single trigger mode I caught the SPI1 clock signal on the J16 camera  connector CLK output, which luckily was also other output of SPI1 along with the fingerprint sensor.  Both the DSP-side and ARM-side configurations worked properly.  However, as due to the difference of connectors I cannot use the J16 connector to connect to the ADS, so I tried to modify the project file- the spiflash.c ( omap_starterware location: \examples\lcdkOMAPL138\spi\spi.c if you want to open it in editor other than Code Composer Studio 5).Working on CCS 5.2.1.00018,  I did the following modifications to the mentioned file:

 

1.I replaced all  the “SOC_SPI_1_REGS” with “SOC_SPI_0_REGS”

 and all the “HWI_PSC_SPI1” with “HWI_PSC_SPI0”

 

I checked thoroughly if there was any not-replaced “SPI1”’s or “SPI_1” in the project and there are none left.

 

2. I replaced SPIPinMuxSetup argument  “1” with “0”- now pins should be set for SPI0

 

 

3.I changed  SPI1CSPinmuxSetup to SPIOCSPinMuxSetup(4) to use the CS4 pin on J15

 

4. In  static void SetUpInt(void) I  changed IntEventMap arguments to

IntEventMap(C674X_MASK_INT4, SYS_INT_SPI0_INT); for the DSP

And    

IntRegister(SYS_INT_SPINT0, SPIIsr);

 IntChannelSet(SYS_INT_SPINT0, 2);

 IntSystemEnable(SYS_INT_SPINT0);

For the ARM

5. for the fonction I replaced the ifdef with the following code:

#ifdef _TMS320C6X

    IntEventClear(SYS_INT_SPI0_INT);

#else

    IntSystemStatusClear(20);//Changed from 56- 20 is the SPI0 equivalent of SPI1 interrupt register

#endif

   

6. In case of any pin interference I commented any UART configurations and functions in the project.

 

7. I did not change other options- so long I wish to just configure the SPI0

 

After the modifications I made I expected to obtain a signal on the SPIO_CLK pin on my oscilloscope (again, I wisk to acquire the singal in single trigger mode) after connecting the probe and starting the loaded program just as it was in case of SPI0. However, no signal appears- the oscilloscope is not even triggered.Although the SPI interrupts do occur throughout the project execution(I checked it via debugger if  the ISR is accessed), which would indicate proper interrupt configuration with incomplete or wrong pin configuration. If you have any idea hot to solve this problem,  I am all ears.

Best Regards

Rafal