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.

  • Resolved

RTOS/XTCIEVMK2LX: Send data using SPI communication through FMC

Intellectual 395 points

Replies: 5

Views: 1697

Part Number: XTCIEVMK2LX

Tool/software: TI-RTOS

Hello, experts.

I'm still struggling for getting an ADC board (DEV-ADC34J22) work with XTCIEVMK2LX. (Refer this.)

According to the user guide of the ADC board, it has two chips that can be configured via SPI interface: ADC34J22 and LMK04828B.

The board is connected to XTCIEVMK2LX with FMC1, but not directly, through an adapter board (FMC to HSMC) because the ADC board has an HSMC connector only.

It seems there are three SPI interfaces on XTCIEVMK2LX, and the SPI1 seems to be the one that connects to FMC according to the data sheet.

I don't know how to select a chip I want to configure on the ADC board, but anyway I decided to send the default data (provided in the user guide) to the board over FMC using SPI communication in C.

I found the driver library for SPI, and confirmed it works well by running the test application that writes some data to the NOR flash. Referring the example code, I wrote my own code as follows (some code is omited):

void Board_initSPI(void)
    Board_initCfg boardCfg;
    SPI_v0_HWAttrs spi_cfg;

    /* Get the default SPI init configurations */
    SPI_socGetInitCfg(SPI_PORT, &spi_cfg); // SPI_PORT = 1

    /* Modify the default SPI configurations if necessary */
    spi_cfg.intNum = 10; // Set this to avoid the 'Hwi already defined' error.

    /* Set the default SPI init configurations */
    SPI_socSetInitCfg(SPI_PORT, &spi_cfg);



void send_config(UArg arg0, UArg arg1)
	SPI_Handle spiHandle;
	SPI_Params spiParams;
	SPI_Transaction spiTransactionAdc;
	SPI_Transaction spiTransactionLmk;

	spiParams.transferTimeout = 10;
	spiHandle = SPI_open(SPI_PORT, &spiParams);

	if (!spiHandle)
		System_printf("SPI_open failed.\n");
		System_printf("SPI_open success.\n");

	spiTransactionAdc.count = sizeof(adcDefaultData);
	spiTransactionAdc.txBuf = adcDefaultData;
	spiTransactionAdc.rxBuf = NULL;

	if (!SPI_transfer(spiHandle, &spiTransactionAdc))
		System_printf("Sending ADC default data failed.\n");

	spiTransactionLmk.count = sizeof(lmkDefaultData);
	spiTransactionLmk.txBuf = lmkDefaultData;
	spiTransactionLmk.rxBuf = NULL;

	if (!SPI_transfer(spiHandle, &spiTransactionLmk))
		System_printf("Sending LMK default data failed.\n");



 * ======== main ========
Int main(void)

    System_printf("entering Board_initSPI()...\n");
    System_printf("exiting Board_initSPI()...\n");

    System_printf("entering SPI_init()...\n");
    System_printf("exiting SPI_init()...\n");

    System_printf("entering BIOS...\n");

    return (0);

void AtExit(Int stat)
	System_printf("exiting BIOS...");


The cfg file is as follows:

var Settings = xdc.useModule('ti.board.Settings');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var ti_drv_spi_Settings = xdc.useModule('ti.drv.spi.Settings');
var ti_drv_uart_Settings = xdc.useModule('ti.drv.uart.Settings');
var ti_osal_Settings = xdc.useModule('ti.osal.Settings');
var ti_csl_Settings = xdc.useModule('ti.csl.Settings');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var System = xdc.useModule('xdc.runtime.System');
var SysStd = xdc.useModule('xdc.runtime.SysStd');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var Memory = xdc.useModule('xdc.runtime.Memory');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
System.SupportProxy = SysStd;
var CpIntc = xdc.useModule('');
Settings.boardName = "evmK2L";
ti_drv_spi_Settings.socType = "k2l";
ti_drv_uart_Settings.socType = "k2l";
ti_osal_Settings.osType = "tirtos";
ti_osal_Settings.socType = "k2l";
ti_csl_Settings.deviceType = "k2l";
var task0Params = new Task.Params(); = "task0";
task0Params.stackSize = 4096; = Task.create("&send_config", task0Params);
Task.numPriorities = 4;
var heapMem0Params = new HeapMem.Params(); = "heapMem0";
heapMem0Params.size = 204800; = HeapMem.create(heapMem0Params);
Memory.defaultHeapInstance =;

There's no problem to build and launch the code, but when I click the "Resume" button on CCS, it's hung. The status of the debug probe shows "Running." The output is as follows:

entering Board_initSPI()...
exiting Board_initSPI()...
entering SPI_init()...
exiting SPI_init()...
entering BIOS...
SPI_open success.

 It seems the program is hung when trying SPI_transfer().

I'm not sure whether it's a correct way to configure the chips on the ADC board or not, actually. If I'm doing it in totally wrong way, please teach me what's the correct way. The ultimate goal is to get data from the ADC board in a programmatic way. I'm still not sure if I can make it with the hardware configuration, but anyway I thought the ADC board must be configured first before using RF SDK tools to access it.

Thank you very much!


  • Hi,

    I've escalated this thread internally. Feedback will be posted here.

    Best Regards,


     Please make sure you read the forum guidelines first.

  • In reply to Yordan Kovachev:


    On the FMC connector for the EVM, there are two SPI connections.   Since there are 2 FMC connectors, there are 2 SPI instances that directly connect to the 66AK2L06/TCI6630K2L SOC.  On the FMC connector, the SPI_XXX_LMK is controlled by the FPGA.   The SPI_XXXX is controlled through the SOC.   A software control example would only work with using H8 from both FMC connectors.  To get the specific FPGA control routing, you could modify the FPGA to use a GPIO location on the first FMC.  You need to contact eInfoChips the EVM provider, and get a copy of the Xilinx FPGA source code, and DSP programming project to utilize two SOC SPI ports on one FMC connector.

    Note: Utilizing the RFSDK, normally the SPI_XXXX is used to control the AFE750x device on the AFE750x EVM.  The SPI_XXX_LMK is used to control an LM04828 devuce on the AFE750x EVM.   There are no other provided software examples for SPI control.  The RFSDK has a Linux ARM driver for the SPI communication through SOC SPI.   The FPGA version has fixed power on time, SPI programmation for the LMK04828.

    I have included an IO table, which is extracted from the eInfoChips schematic diagram.


    Joe Quintal

  • In reply to Radio-Joe:

    Hello, Joe.

    Thank you for your kind and detail answer! It sounds like, however, what I'm trying to do is almost impossible to achieve for me. So, could you please suggest any other convenient and easy way to achieve my ultimate goal, which is to get converted data by ADC on XTCIEVMK2LX in a programmatic way? This is related to my another question I recently posted in this forum (link). I want to get data from ADC and analyze it on XTCIEVMK2LX for high speed data transfer and analysis. The data size is big enough and real-time analysis is a matter of importance, so I need/want to utilize the DSP EVM. Could you tell me if I can achieve this goal with ADC34J22EVM? If so, I may want to purchase it.

    Thank you very much!

  • In reply to Huioon Kim:

    On the TI website for 66aK2L06, find a reference to TI design 4 for an RF Receiver real input-Complex output, and IF DAC with Complex output.

    Design 4 - - ADC32RF8x family, uses JESD lanes 0 and 1, Sync lane 0
    DAC38J84 family, uses JESD lanes 0, and 1, Sync lane 0
    DLC card, (to have Tx and Rx split across two FMC connectors, the DLC card is required)
    note: to use only the 66AK2L06 and ADC, or 66AK2L06 and DAC the DLC is not required, clocking
    needs to be provided

    You can request the RFSDK software, MCSDK 3147 software. You can install these, and only with 66AK2L06 EVM, you can control the DFE, JESD
    through the RFSDK with specific examples. You want Design 4, JESD loopback. From the Tools and Software folder in the above Design 4 link.

    The simplest path to illustrate the JESD ADC receiver with the 66AK2L06
    Obtain the ADC32RF80 EVM - this matches the reference design use, you could use a different RF8x as long as the ADC JESD output provides the same IQ output at
    ADC decimated output IQ - 245.76Msps complex, across serdes lanes 0 and 1, serdes rate 4.9152Gbps,
    ADC decimated output IQ - 368.64Msps complex, across serdes lanes 0 and 1, serdes rate 7.3728Gbps

    There should be instructions for ADC + 66AK2L06 only, otherwise you must request a DLC card also

    Under the related tools and software, you will need to request MCSDK 3147 BIOSLINUXMCSDK, and RFSDK.
    You need to program the 66AK2L06.

    With the software only there is a design 4 example, with JESD Lane Loopback, you can show the Tx -> Rx demonstration with digital loopback
    without the ADC card.

    When you obtain the ADC EVM, you will need to provide the RF clock to the ADC. You will need to have some RF input typically an RF Local Oscillator LO source. Within the demo instructions there are specific measured examples for using the ADC GUI over USB to a PC, and running a terminal or TCPIP connection to the RFSDK GUI to control the radio.

    Although this is a more complicated setup than your request, it is one that has an example, online, and has been tested.
    -> Spectrum Analyzer
    Local Oscillator RF source -> RF output -> power splitter -> 32RF80ADC EVM <------------------------> 66AK2L06 EVM
    TestPC <- USB -> TestPC <- USB -> Serial term Arm0, XDS200
    <- 1G Ethernet -> Ether0

    Please download the User Guide to view this.

    Related to a real ADC with JESD204B transport, 66ak2l06 -
    Design 2 uses the 14x250 ADC, this is a single real ADC,

    Related to the ADC34J22 EVM, the closest TI design is Design5, this is being completed by a third party developer Azcom, in Italy.
    In this case it is a real ADC, that is 4 Rx channels.

    Joe Quintal
  • In reply to Radio-Joe:

    Hello, Joe.

    Is this Design 5?:

    I'm sorry I couldn't see any number among the list under the TI Designs section of the 66AK2L06 page. Actually I don't even know why you call TIDEP0081 "Design 4," too. :)

    Anyway there are three designs under the TI Designs section of 66AK2L06 as follows:

    - Optimized Radar System Reference Design Using a DSP+ARM SoC
    - Wideband Receiver Design Using 66AK2L06 JESD204B Attach to ADC32RF80 Reference Design
    - 66AK2L06 DSP+ARM Processor with JESD204B Attach to Wideband ADCs and DACs

    You denoted the second one as Design 4 and first one as Design 2, so I guessed the third one is the Design 5. Am I right?

    Anyway I'm reading its reference guide now (tidu946a.pdf). I want to try to connect the ADC34J22EVM to XTCIEVMK2LX directly without a DLC card. Can I do that for my purpose?

    Thank you very much!

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.