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.

TMS570LC4357: SPI SPI1CLK no output signal

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN,

Hi guys,

I am new to this board and I had followed the link below step by step do the configuration in HALCoGen, still can't get any clock signal from the SPI1CLK. Can anyone help me???

https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/469448 

  • Hello,

    What are you trying to do, setting the device as slave or master? The clock is always supplied by the master.

  • Hi Miro,

    I had setup my TMS570LC4357 as a MASTER and enable CLKMOD. The thing that I want to do which I want to generate a clock frequency with 8 MHz because I need it to transmit data to another ADC board (slave). Then, I upload my code to my device and probe spi1clk pin to my oscilloscope. There is no output clock signal on my oscilloscope. Kindly help me.

    
    /* USER CODE BEGIN (0) */
    #include "HL_spi.h"
    /* USER CODE END */
    
    /* Include Files */
    
    #include "HL_sys_common.h"
    
    /* USER CODE BEGIN (1) */
    /* USER CODE END */
    
    /** @fn void main(void)
    *   @brief Application main function
    *   @note This function is empty by default.
    *
    *   This function is called after startup.
    *   The user can use this function to implement the application.
    */
    
    /* USER CODE BEGIN (2) */
    uint16_t TX_SEND[10]={0x0010};
    uint16_t RX_RECEIVE[10];
    /* USER CODE END */
    
    uint8	emacAddress[6U] = 	{0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU};
    uint32 	emacPhyAddress	=	1U;
    
    int main(void)
    {
    /* USER CODE BEGIN (3) */
        spiInit();
    
    
        spiDAT1_t spiTrans1_t;
    
        spiTrans1_t.CS_HOLD = FALSE;
        spiTrans1_t.WDEL = TRUE;
        spiTrans1_t.DFSEL = SPI_FMT_0;
        spiTrans1_t.CSNR = FALSE;
    
        while(1)
        {
            spiEnableLoopback(spiREG1, 1u);
            spiTransmitAndReceiveData(spiREG1, &spiTrans1_t, 16, TX_SEND, RX_RECEIVE);
        }
    /* USER CODE END */
    
        return 0;
    }
    
    
    /* USER CODE BEGIN (4) */
    /* USER CODE END */
    

  • Hello,

    Please, check in PINMUX tab if all used SPI pins are pinmuxed to be used with SPI module. Also make unused SPI pins as non functional (GIO)

  • Hi Miro,

    I also had configured that part and disable R2 MIBSPI1NCS but still get the same result.

  • Hello,

    Attached are both HALCoGen and CCS projects made for HDK. In this code data SPI1 sends data to SPI3 when button is pressed. There must be a wired  connection between SPI1 and SPI3. You can use is for reference.

    6874.SPI_SPI1_SPI3_TMS570LC4357.ZIP

  • Hi Miro,

    Is there any way I can know whether my slave receive data because my oscilloscope still couldn't get any clock signal from spi1clk.

  • Hello,

    At HDK SPI1CLK (ball F18) is exposed to Connector J9 pin 6 and at LaunchPad  it is exposed to J5.7. Did you probe the right pins?