Changing the baudrate of SPI
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-11-19 4:50 PM
Posted on November 20, 2011 at 01:50
Do I need to disable SPI before changing the SPI baudrate?
Or, would it be enough if I just wait till the end of the communication and then change the baudrate without disable/enable the peripheral?The spec says ''These bits (Buadrate) should not be changed when communication is ongoing.'' However, it says exactly the same thing for the clock polarity, yet it is not possible to change the polarity without disabling it first.Does anyone have a relevant experience/idea about this?
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-11-20 7:52 AM
Posted on November 20, 2011 at 16:52
You'd want to change it after data has been transmitted, otherwise you're going to slew the clock/data, slave devices may/may-not like this. If you clear the receive register full bit, it will set once the last bit has been transmitted/received. At that point it should be safe to drop the chip select, and change the data rate. You'll need to review the timing parameters for the slave device, and confirm your coding with an oscilloscope.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
