1、波特率计算方法
在UART和SPI两种模式下,波特率都是由一个CC2430内在的波特率发生器产生,UxBAUD.BAUD_M[7:0]和UxGCR.BAUD_E[4:0]寄存器分别记录了转换的尾数和指数,公式如下:
Buadrate=(256+Baud_M)*(2的Baud_E次方)*F/(2的28次方)
其中F为系统的时钟频率=16MHz或者32MHz。The maximum baud rate for UART mode is F/16 when BAUD_E is 16 and BAUD_M is 0, and where F is the system clock requency. The maximum baud rate for SPI mode and thus SCK frequency, is F/2 when BAUD_E is 19 and BAUD_M is 0. Setting higher baud rates than this will give erroneous results。
Baud rate (bps) UxBAUD.BAUD_M UxGCR.BAUD_E Error (%)
2400 59 6 0.14
4800 &n