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.

error in spi programming of tmdxevm6678 EVM

Hi,

   my program for initializing SPI . 

   **********************************

#include <c6x.h>
#include <stdint.h>
#include <evmc66x_spi.h>

void main(void) {

// status=spi_claim(0,1000000)//

/* Enable the SPI hardware */
SPI_SPIGCR0 = CSL_SPI_SPIGCR0_RESET_IN_RESET;
spi_delay (2000);
SPI_SPIGCR0 = CSL_SPI_SPIGCR0_RESET_OUT_OF_RESET;

}

*************************

Error:

unresolved symbol Osal_platformSpiCsEnter, first referenced in    ./evmc66x_spi.obj spi C/C++       Problem
unresolved symbol Osal_platformSpiCsExit, first referenced in        ./evmc66x_spi.obj spi C/C++       Problem

1)what the above error indicates please help me solving the error.

2) how can I get the 10mhz frequency clock from SPI_CLK pin, please give source code or give me idea.

Please help me in getting above two problems to solve. 

thanking you.

regards,

chandu.

  • 1. Do you still see the error please?

    I think the compiler could complain "spi_delay()" function since it is defined as "static" in "evmc66x_spi.c". You can copy it over to your "spi.c" if you see errors.

    But I do not see any problem with "Osal..." symbols you mentioned.

    2. Section 2.1 in SPI user guide mentions the equation of SPICLK. The SPI module clock seems to be SYSCLK1/6, where SYSCLK1 is the CorePac clock.

    You can program PRESCALE in SPI register to get the clock frequency you need.