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.

J784S4XEVM: Use SPI5 Communication with chip select in J784S4XEVM

Part Number: J784S4XEVM

Tool/software:

Hello there,

I currently use MCSPI driver in my evaluation board. I have coded my function with referenced from "main_mcspi_slave_mode.c" application. I can transmit and receive my SPI messages in polling mode. However, Slave ECU is not return desired signals cause of chip select does not triggered. My chip select pin (CS0) is only working on LOW (0V) and it cannot triggered to HIGH(3.3V) any time. When analyze chip select pin with oscilloscope, I can see some noises in chip select pin when sending clock signals, but no any clock signal triggered my chip select voltage is pure 0V. How can I trigger my chip select pin? Here is my configuration for MCSPI communciation.

Pin Mux Configs:

HW_WR_REG32(MAIN_SPI5_CLK_PADCFG_BASE, MAIN_SPI5_CLK_MODE | \
        ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION)));
HW_WR_REG32(MAIN_SPI5_D0_PADCFG_BASE, MAIN_SPI5_D0_MODE | \
        ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION)));
HW_WR_REG32(MAIN_SPI5_D1_PADCFG_BASE, MAIN_SPI5_D1_MODE | \
        ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION)));
HW_WR_REG32(MAIN_SPI5_CS0_PADCFG_BASE, MAIN_SPI5_CS0_MODE | \
        ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION)));

SPI Configs:

MCSPI_Params_init(&spi_params);
spi_params.transferMode = SPI_MODE_BLOCKING;  
spi_params.transferTimeout = 0U;                 
spi_params.transferCallbackFxn = NULL;               
spi_params.mode = SPI_MASTER;         
spi_params.bitRate = 1333333; // Hz (?)            
spi_params.dataSize = 16U;                 
spi_params.frameFormat = SPI_POL1_PHA1;      
spi_params.custom = NULL;  

SPI_socGetInitCfg(spi_domain, spi_instance, &spi_hw_cfg);
spi_hw_cfg.enableIntr = BFALSE;
spi_hw_cfg.edmaHandle = NULL;
spi_hw_cfg.dmaMode    = BFALSE;
spi_hw_cfg.chMode     = MCSPI_MULTI_CH;
spi_hw_cfg.pinMode    = SPI_PINMODE_4_PIN;
spi_hw_cfg.chnCfg[0].dataLineCommMode = MCSPI_DATA_LINE_COMM_MODE_6;
spi_hw_cfg.chnCfg[0].csPolarity = MCSPI_CS_POL_LOW;
spi_hw_cfg.chnCfg[0].tcs = MCSPI_CH0CONF_TCS0_ONECYCLEDLY;
SPI_socSetInitCfg(spi_domain, spi_instance, &spi_hw_cfg);