AnsweredAssumed Answered

STM32f303 internal command error

Question asked by kakarla.krishna on Apr 13, 2015
Latest reply on Apr 13, 2015 by Clive One
Hi All,
I have an STM32f303 discovery board that I'm trying to interface with a New Haven LCD display. The LCD uses SPI for communication. I was able to enable SPI communication and I've been able to observe the data and clock waveforms on the configured SPI pins using a Saleae Logic4 Logic analyzer. The problem is, I haven't been able to initialize the LCD even though I implemented the step by step procedure provided by the vendor. 
I read from the datasheet that the LCD uses an internal oscillator that has a clock frequency of 380kHz. But the SPI clock has a frequency of 1MHz.
So in order to reduce the frequency I reduce the HSI clock frequency using RCC_HCLKConfig(RCC_SYSCLK_Div64 just to make sure that the SPI clock is in sync with the internal oscillator clock of the LCD. I then connect my LCD and the STM board.
The moment I tried to program the STM board, I get an internal command error. I do not understand what went wrong but then after reading a couple of forums, found out that I burnt my board. I thought it was probably static discharge that could have caused the problem. 
I buy another board and without pre-scaling the HSI clock, program the new board. The new board gets programmed without any problems. Now I hook the logic analyzer up with the board and use the clock prescaler line. I get the same internal command error again.

I do not understand how I'm managing  to burn the boards up. Is it because of the clock pre-scaler line or static discharge or due to the logic analyzer or LCD? When I use a prescaler of 4 I do not have a problem but using a prescaler of 64 is causing all kinds of nasty problems. I have managed to burn two boards up and would like your help before I proceed further.

Thanks,
Krishna

 

Outcomes