AnsweredAssumed Answered

ST7540 Eval Board SPI ( urg )!!!!!

Question asked by elazhar.ahd on May 22, 2013
Latest reply on Dec 1, 2014 by dr.dsf
Hi ,

I'm using ST7540 Eval Board and i want to send to my Micrcontroller via SPI , 24 bits all at once. The spi i use is 8 bit.

Here is an excerpt of my code :

volatile uint8_t i=3;

    while(i>0){
        i--;

        SPI1->DR=data[i];

        /* Control Register Write */
        REG_DATA_1;
        RxTx_0;

        NSS1_LOW;
    }

    /* Wait for SPI transfer to have fully completed */
    while(!(SPI1->SR & SPI_I2S_FLAG_TXE));
    while(SPI1->SR & SPI_I2S_FLAG_BSY);
NSS1_HIGHT;
.....

Outcomes