[Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/eyesIFX/chips/tda5250 eyesIFXBaudrates.h, NONE, 1.1 tda5250RegDefaultSettings.h, 1.9, 1.10 tda5250BusResourceSettings.h, 1.8, 1.9

akoepke andreaskoepke at users.sourceforge.net
Wed Mar 5 03:14:03 PST 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/chips/tda5250
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2015/chips/tda5250

Modified Files:
	tda5250RegDefaultSettings.h tda5250BusResourceSettings.h 
Added Files:
	eyesIFXBaudrates.h 
Log Message:
baudrates revisited


--- NEW FILE: eyesIFXBaudrates.h ---
/* auto generated from tda5250BusResourceSettings.h using the following perl script: 

#!/usr/bin/perl -w
use strict;
my $state = "START";
my $br;
while(<>) {
    if(/UBR_1MHZ_/) {
	($br) = /UBR_1MHZ_(\d+)/;
	if($state eq "START") {
	    print '#if ';
	    $state = "MIDDLE";
	}
	else {
	    print '#elif ';
	}
	print 'TDA5250_UART_BAUDRATE == ', $br,"\n";
	print '#define TDA5250_UART_UBR UBR_1MHZ_', $br, "\n";
	print '#define TDA5250_UART_UMCTL UMCTL_1MHZ_', $br, "\n";
    }
}
print '#endif',"\n"

*/

#if TDA5250_UART_BAUDRATE == 35108
#define TDA5250_UART_UBR UBR_1MHZ_35108
#define TDA5250_UART_UMCTL UMCTL_1MHZ_35108
#elif TDA5250_UART_BAUDRATE == 10240
#define TDA5250_UART_UBR UBR_1MHZ_10240
#define TDA5250_UART_UMCTL UMCTL_1MHZ_10240
#elif TDA5250_UART_BAUDRATE == 10922
#define TDA5250_UART_UBR UBR_1MHZ_10922
#define TDA5250_UART_UMCTL UMCTL_1MHZ_10922
#elif TDA5250_UART_BAUDRATE == 11702
#define TDA5250_UART_UBR UBR_1MHZ_11702
#define TDA5250_UART_UMCTL UMCTL_1MHZ_11702
#elif TDA5250_UART_BAUDRATE == 12603
#define TDA5250_UART_UBR UBR_1MHZ_12603
#define TDA5250_UART_UMCTL UMCTL_1MHZ_12603
#elif TDA5250_UART_BAUDRATE == 13653
#define TDA5250_UART_UBR UBR_1MHZ_13653
#define TDA5250_UART_UMCTL UMCTL_1MHZ_13653
#elif TDA5250_UART_BAUDRATE == 14894
#define TDA5250_UART_UBR UBR_1MHZ_14894
#define TDA5250_UART_UMCTL UMCTL_1MHZ_14894
#elif TDA5250_UART_BAUDRATE == 16384
#define TDA5250_UART_UBR UBR_1MHZ_16384
#define TDA5250_UART_UMCTL UMCTL_1MHZ_16384
#elif TDA5250_UART_BAUDRATE == 18204
#define TDA5250_UART_UBR UBR_1MHZ_18204
#define TDA5250_UART_UMCTL UMCTL_1MHZ_18204
#elif TDA5250_UART_BAUDRATE == 20480
#define TDA5250_UART_UBR UBR_1MHZ_20480
#define TDA5250_UART_UMCTL UMCTL_1MHZ_20480
#elif TDA5250_UART_BAUDRATE == 23405
#define TDA5250_UART_UBR UBR_1MHZ_23405
#define TDA5250_UART_UMCTL UMCTL_1MHZ_23405
#elif TDA5250_UART_BAUDRATE == 27306
#define TDA5250_UART_UBR UBR_1MHZ_27306
#define TDA5250_UART_UMCTL UMCTL_1MHZ_27306
#elif TDA5250_UART_BAUDRATE == 32768
#define TDA5250_UART_UBR UBR_1MHZ_32768
#define TDA5250_UART_UMCTL UMCTL_1MHZ_32768
#elif TDA5250_UART_BAUDRATE == 40960
#define TDA5250_UART_UBR UBR_1MHZ_40960
#define TDA5250_UART_UMCTL UMCTL_1MHZ_40960
#endif

Index: tda5250RegDefaultSettings.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/chips/tda5250/tda5250RegDefaultSettings.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** tda5250RegDefaultSettings.h	13 Feb 2008 11:52:42 -0000	1.9
--- tda5250RegDefaultSettings.h	5 Mar 2008 11:14:00 -0000	1.10
***************
*** 72,76 ****
  #define INITIAL_RF_POWER RF_HITX_DAMPING_0dB
  
! #define TDA5250_REG_DEFAULT_SETTING_CONFIG           FULL_RANGE
  #define TDA5250_REG_DEFAULT_SETTING_FSK              0x0A0C
  #define TDA5250_REG_DEFAULT_SETTING_XTAL_TUNING      0x0012
--- 72,76 ----
  #define INITIAL_RF_POWER RF_HITX_DAMPING_0dB
  
! #define TDA5250_REG_DEFAULT_SETTING_CONFIG           MED_RANGE_LP
  #define TDA5250_REG_DEFAULT_SETTING_FSK              0x0A0C
  #define TDA5250_REG_DEFAULT_SETTING_XTAL_TUNING      0x0012

Index: tda5250BusResourceSettings.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/chips/tda5250/tda5250BusResourceSettings.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tda5250BusResourceSettings.h	13 Feb 2008 10:34:28 -0000	1.8
--- tda5250BusResourceSettings.h	5 Mar 2008 11:14:00 -0000	1.9
***************
*** 41,51 ****
  };
  
  enum {
!     // real milli seconds
!     UBR_1MHZ_23405=0x002A,  UMCTL_1MHZ_23405=0xDD, // 23405 bit/s
!     UBR_1MHZ_35108=0x001C,  UMCTL_1MHZ_35108=0xAA, // 35108 bit/s    
  };
  
! msp430_uart_union_config_t tda5250_uart_config = { {ubr: UBR_1MHZ_35108, umctl: UMCTL_1MHZ_35108, ssel: 0x02, pena: 0, pev: 0, spb: 0, clen: 1, listen: 0, mm: 0, ckpl: 0, urxse: 0, urxeie:0, urxwie: 0, urxe: 1, utxe: 0} };
  
  #endif
--- 41,78 ----
  };
  
+ /* frequency of crystal: 18089580 Hz,
+    divide by 18 -> 1004976 Hz */
+ 
+ #ifndef TDA5250_UART_BAUDRATE
+ #define TDA5250_UART_BAUDRATE 40960U
+ #endif
+ 
  enum {
!     /** for reference, not recommended for new experiments */
!     UBR_1MHZ_35108=0x001C,  UMCTL_1MHZ_35108=0xAA, // 35108 bit/s
! 
!     /** use real frequency, use only settings that result in an even byte time */
!     UBR_1MHZ_10240=0x0062,  UMCTL_1MHZ_10240=0x08, // 10240 bit/s
!     UBR_1MHZ_10922=0x005C,  UMCTL_1MHZ_10922=0x00, // 10922 bit/s
!     UBR_1MHZ_11702=0x0055,  UMCTL_1MHZ_11702=0xEF, // 11702 bit/s
!     UBR_1MHZ_12603=0x004F,  UMCTL_1MHZ_12603=0xDD, // 12603 bit/s
!     UBR_1MHZ_13653=0x0049,  UMCTL_1MHZ_13653=0xB5, // 13653 bit/s
!     UBR_1MHZ_14894=0x0043,  UMCTL_1MHZ_14894=0xAA, // 14894 bit/s
!     UBR_1MHZ_16384=0x003D,  UMCTL_1MHZ_16384=0x92, // 16384 bit/s
!     UBR_1MHZ_18204=0x0037,  UMCTL_1MHZ_18204=0x84, // 18204 bit/s
!     UBR_1MHZ_20480=0x0031,  UMCTL_1MHZ_20480=0x80, // 20480 bit/s
!     UBR_1MHZ_23405=0x002A,  UMCTL_1MHZ_23405=0x7F, // 23405 bit/s
!     UBR_1MHZ_27306=0x0024,  UMCTL_1MHZ_27306=0x7B, // 27306 bit/s
!     UBR_1MHZ_32768=0x001E,  UMCTL_1MHZ_32768=0x5B, // 32768 bit/s
!     UBR_1MHZ_40960=0x0018,  UMCTL_1MHZ_40960=0x55, // 40960 bit/s
  };
  
! #include "eyesIFXBaudrates.h"
! 
! msp430_uart_union_config_t tda5250_uart_config = { {ubr: TDA5250_UART_UBR, umctl: TDA5250_UART_UMCTL, ssel: 0x02, pena: 0, pev: 0, spb: 0, clen: 1, listen: 0, mm: 0, ckpl: 0, urxse: 0, urxeie:0, urxwie: 0, urxe: 1, utxe: 0} };
! 
! enum {
!     TDA5250_32KHZ_BYTE_TIME = (32768UL*10)/TDA5250_UART_BAUDRATE
! };
  
  #endif



More information about the Tinyos-2-commits mailing list