How can i reduce the baudrate with software
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-07-28 11:19 PM
Hi again :) i am using bluetooth module in my project. My bluetooth module support 1200 bps to 921.6Kbps.However i need first set up 300 bps.Then i need use 600-1200-2400-4800-9600 or 19200 bps .How can i?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-07-29 3:10 AM
So problem is with blue-tooth part ?
If yes, read datasheet and first understand how low can you go with bluetooth module, and after that, reconfigure prescalers inside uart config at stm part- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-07-29 3:34 AM
First setup the serial port with 300 baud, send the appropriate AT commands to change the baudrate of the bt module then setup the serial port again for the new baudrate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-07-29 3:41 AM
USARTx->BRR = APBxCLK / Baud;
You could add some rounding, and you might need to enable/disable the USART to do it, and you'd definitely want to wait for the TC event to ensure the current data left the part so as not to change the rate mid-transmission.Not clear what STM32 part you're using, you can usually pull the APB clocks via RCC_GetClocks() or similar APIUp 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
‎2015-07-29 4:42 AM
Yes,my problem with bluetooth module.Beacuse it doesn't support 300 bps communication.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-07-29 6:00 AM
So you have TWO USART channels, and you're trying to mitigate the difference in speed between them?
Do either of the serial connections support flow control?Can you use a simple ring-buffer (FIFO) construction and use those to forward between the serial channels?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
‎2015-07-29 6:18 AM
Yes i have 2 Usart channels but unfortunately i use both of them.S,i don't use FIFO ring buffer.
Methinks,i should use other hardware- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-07-29 7:20 AM
Well that's a design decisions you'll have to make with far more information about the requirements than I.
What's 300 baud used for these days? If you're trying to auto-baud there are better ways to do that.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
‎2015-07-30 3:45 AM
I am using IEC 62056 protocol for smart electric meter reading.According as this protocol,first communication baudrate is 300,then changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-07-30 6:34 AM
Ok, but that's not bluetooth, right. You can talk over bluetooth at rates convenient to that connection, and negotiate whatever rate you need with the meter over it's connection, and mitigate the difference with the STM32.
Up vote any posts that you find helpful, it shows what's working..
