AnsweredAssumed Answered

CR95HF UART Speed Change

Question asked by Luis Montoya on Mar 22, 2018
Latest reply on Apr 3, 2018 by Peter Boringer

I'm Using the CR95HH under a linux Microcontroler.


in this case, I'm using the UART port to communicate (not SPI), the default BaudRate is 57600, and works fine, but when I try to change the Baud rate to maximum Speed (Datasheet mention 2 Mbps max), I can't find the right procedure to do that.


the page 38 of Datasheet have the description of command 0x0A,  according with this, we need to use a formula to calculate the BaudRate ==> "13.56 /(2*<BaudRate>+2) Mbps", where "BaudRate" is any number from 0 ~ 255.


If I apply this formula, no one number give me the exact Baudrate than Linux support. in any case, I use the most closer to linux Standard. but the only one than works is the Default (B57600)


By the Way, I'm using "C" under linux

my Actual procedure is:


1.- Open Uart port at 57600

2.- Send WakeUp command to Device

3.- send new Baudrate command (0x0A 0x01 0x05)  ==> 0x05 for 1.13 Mbps (Linux more closer B1152000)

4.- Close Uart Port

5.- Open UART at 1152000

6.- Start Using...


I try many different speeds but the only one than works is the default.


any Idea?


the Linux UART BAUD supported are (from termios.h):





#define B57600 0010001
#define B115200 0010002
#define B230400 0010003
#define B460800 0010004
#define B500000 0010005
#define B576000 0010006
#define B921600 0010007
#define B1000000 0010010
#define B1152000 0010011
#define B1500000 0010012
#define B2000000 0010013
#define B2500000 0010014
#define B3000000 0010015
#define B3500000 0010016
#define B4000000 0010017