Problem with STM32F103ZE SPI data send
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-03 7:47 PM
Hello I am trying to send opcode bytes MCBSTM32 to GP22. But as I debug in Keil I observe the the byte to be sent(0x50) is nit being written on the SPI data register in stm32f10x_spi.c. Instead the data register is showing 0xx00FF. I fail to understand why this is happening. Please help. Thanks.
#spi #stm32- Labels:
-
SPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-03 8:56 PM
The SPI->DR is TWO distinct peripheral registers, it is not a memory cell, and you and the debugger cannot read the value you wrote to the outgoing register buffer.
Reading it will also effect bits in SPI->SR Don't park a register view over peripheral registers that will be altered by doing so. The debugger can and will do things which are invasive.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-03 9:04 PM
Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-03 10:25 PM
Sir, Can you please suggest any method by which I can confirm that the correct opcode has been transmitted to the GP22 IC from STM32f103ZE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-04 4:18 AM
Can you please suggest any method by which I can confirm that the correct opcode has been transmitted to the GP22 IC from STM32f103ZE?
If you want to examine the signalling on the wire you'd use an oscilloscope or a logic analyzer. Then, if you believe the hardware is doing it's job, you can also print the bytes out before you send them.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-09 2:27 AM
Thanks Clive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-10 11:51 AM
