cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f303 internal command error

prad90
Associate
Posted on April 13, 2015 at 04:22

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

 
1 REPLY 1
Posted on April 13, 2015 at 12:36

Pull the BOOT0 pin high (strap to VDD), reset the board, and try to connect and erase with it running the System Loader.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..