cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723ZG Problem with SPI

MKozł.1
Associate

Hello Dears..

After weekend im so tired with fight to make work SPI1 in H723... So my last idea is your help....

But from begining..

I was so happy and proud owner STM32F446RE

Made nice project with sensors, ir, tft lcd display, rs232, eeprom etc etc . Work with this board was so good.. all work well and without problems...

Then i though i need better board because i need more ram for buffers and other things.. so nothing to do just buy better STM board..

I find h723zg.. bought.. and excited go move my project to new board.

And so? First thing .. LCD (ili9486).. so i start move code.. ​i had code from example producent and work well in f446..

Configure Spi from CUBE default peripherials.. set all same like in f446 and... Nothing. Zero communication with lcd..

I tried a lot things and ideas.. used registers​, used hal_transmit, hal_transmitreceive.. nothing... Same ideas work correct in f446.. in h723 im not able make connection with lcd..

Debugger show nothing.. all is okay when i go step by step.. i think somhing bad is with configuration SPI?

Pls help because im so close to bring to trash this h7 :(​

My function to send data to lcd:

uint8_t SPI4W_Write_Byte(uint8_t value)                                    
{   
    SPI1->CR2 |= (SPI_CR2_TSIZE & sizeof(value));
 
    SPI1->CR1 |= SPI_CR1_SPE;
    SPI1->CR1 |= SPI_CR1_CSTART;
 
    if(((SPI1->SR) & SPI_SR_TXP) == SPI_SR_TXP)
    {
       	*((__IO uint8_t*)&SPI1->TXDR) = value;
 
    }
    while(((SPI1->SR) & SPI_SR_EOT) != SPI_SR_EOT){};
    SPI1->CR1 |= SPI_CR1_SPE;
}

 My settings.

0693W00000QLNjjQAH.jpg0693W00000QLNjoQAH.jpg

2 REPLIES 2
KDJEM.1
ST Employee

Hi @Marcin Kozłowski​ and welcome to the Community 🙂,

Make sure that the pins are well configured (SPI1_SCK , SPI1_CS ...) for that you can refer to the User Manual UM2407.

Also, I advise you to get inspired from the available SPI examples in the STM32CubeH7 MCU package. These examples may help you in the configuration by following the instructions in the readme file.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Slh
Senior

Check your board's schematic, maybe your pin(s) shared with another hardware function via jumper or resistor.