Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

spi framework_scispi giving bad values

$
0
0

i am sending 0x00 but getting on mosi line 0x01

please find the my code

 

void spi_thread_entry(void)
{

tx_thread_sleep (1);
const uint8_t config_8[] =
{
0xA5,0x81
};

 

DPR_ERR = PSoc_Spi.p_api->open(PSoc_Spi.p_ctrl,PSoc_Spi.p_cfg);
if (SSP_SUCCESS != DPR_ERR)
{
//while (1);
}
DPR_ERR = g_ioport.p_api->pinWrite(IOPORT_PORT_04_PIN_13,IOPORT_LEVEL_LOW);
if (SSP_SUCCESS != DPR_ERR)
{
while (1);
}
DPR_ERR= PSoc_Spi.p_api->write(PSoc_Spi.p_ctrl,&config_8,sizeof(config_8), SPI_BIT_WIDTH_8_BITS,1000);
if (SSP_SUCCESS != DPR_ERR)
{
return 0;
}
DPR_ERR = g_ioport.p_api->pinWrite(IOPORT_PORT_04_PIN_13,IOPORT_LEVEL_HIGH);
if (SSP_SUCCESS != DPR_ERR)
{
while (1);
}

}

 

 

 

 

please give the reply ASAP


Viewing all articles
Browse latest Browse all 5781

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>