找回密码
 注册
搜索
查看: 1322|回复: 6

[讨论] 蓝牙无法初始化,寻求帮助

[复制链接]
发表于 2007-9-16 13:52:52 | 显示全部楼层 |阅读模式
蓝牙芯片是:BC41B143A06-IXB-E4[52RD.com]
软件版本是:6226 06B[52RD.com]
相关的配置参数是:[52RD.com]
/* If using a build from 18.X the buildVersion parameter must be set to TRUE.[52RD.com]
   If using a build before 18.X the buildVersion parameter must be set to FALSE. */[52RD.com]
kal_bool bchs_buildVersion = KAL_TRUE;[52RD.com]
/* If using a BlueCore3-ROM chip the blueCore3ROM parameter must be set to TRUE,[52RD.com]
   else it must be set to FALSE                                         */[52RD.com]
kal_bool bchs_blueCore3ROM = KAL_TRUE;/*尝试过false,现象依旧*/[52RD.com]
/* Set the UART baud rate[52RD.com]
   9.6k     0x0027[52RD.com]
   19.2k    0x004F[52RD.com]
   38.4k    0x009D[52RD.com]
   57.6k    0x00EC[52RD.com]
   115.2k      0x01D8[52RD.com]
   230.4k      0x03B0[52RD.com]
   460.8k      0x075F[52RD.com]
   921.6k      0x0EBF   [52RD.com]
   1382.4k     0x161E                        */[52RD.com]
kal_uint16 bchs_baud = 0x0EBF;[52RD.com]
/* Set the Crystal frequency [52RD.com]
   13Mhz    13000 [52RD.com]
   16Mhz    16000[52RD.com]
   26Mhz    26000 [52RD.com]
   32Mhz    32000                      */[52RD.com]
kal_uint16 bchs_mhz = 26000;//16000[52RD.com]
/* Set the device Address                       */[52RD.com]
kal_uint16 bchs_btNap = 0x0002;[52RD.com]
kal_uint16 bchs_btUap = 0x005b;[52RD.com]
kal_uint32 bchs_btLap = 0x123456;[52RD.com]
/* Set hostio_map_sco_pcm [52RD.com]
   If hostio_map_sco_pcm is TRUE then all attempts [52RD.com]
   to open SCO connections map to PCM ports           */[52RD.com]
kal_bool bchs_hostio_map_sco_pcm = KAL_TRUE;[52RD.com]
/* Set hostio_map_sco_codec If hostio_map_sco_codec [52RD.com]
   is TRUE, and if hostio_map_sco_pcm is also TRUE, [52RD.com]
   then all SCO connections are routed through [52RD.com]
   the built-in audio codec rather than though [52RD.com]
   the normal PCM interface.                    */[52RD.com]
kal_bool bchs_hostio_map_sco_codec = KAL_FALSE;[52RD.com]
/* PIO to enable when built-in codec is [52RD.com]
   enabled (PSKEY_CODEC_PIO) [52RD.com]
   Mimimum value is 0x0000[52RD.com]
   Maximum value is 0x000F                      */[52RD.com]
kal_uint16 bchs_codec_pio = 0x000B;[52RD.com]
/* Setup Crystal frequency trim [52RD.com]
   Mimimum value is 0x0000[52RD.com]
   Maximum value is 0x00FF                      */[52RD.com]
kal_uint16 bchs_ana_ftrim = 0x0025;[52RD.com]
/* Setup Power Table                            */[52RD.com]
kal_uint16 bchs_pt_setting[BCHS_MAX_PT_RECORD_NUMBER * 2];[52RD.com]
/* Minimum CPU clock speed with PCM port running[52RD.com]
   Acceptable values are:[52RD.com]
   0 CPU_FAST (full rate) [52RD.com]
   1 CPU_SLOW_4M (4 MHz) [52RD.com]
   2 CPU_SLOW_2M (2 MHz) [52RD.com]
   3 CPU_SLOW_1p024M (1.024 MHz)              */[52RD.com]
kal_uint16 bchs_pcm_min_cpu_clock = 0x0000;[52RD.com]
/* Setup the maximum number of SCO links [52RD.com]
   Mimimum value is 0x0000[52RD.com]
   Maximum value is 0x0003                      */[52RD.com]
kal_uint16 bchs_max_scos = 0x0002;[52RD.com]
/* host wake up settings */[52RD.com]
kal_uint16 bchs_wakeup_enable = 0x0001;     /* enable = 0x0001, disable = 0x0004 */[52RD.com]
kal_uint16 bchs_wakeup_sleep_delay = 5000;  /* in milliseconds */[52RD.com]
kal_uint16 bchs_wakeup_break_length = 150;  /* duration of wake up signals in milliseconds */[52RD.com]
kal_uint16 bchs_wakeup_pause_length = 0;    /* duration between wake up signals in milliseconds */[52RD.com]
kal_uint16 bchs_wakeup_signal = 0x0052;[52RD.com]
[52RD.com]
上面这些参数有没有问题?或者程序其他部分需要修改?不知道哪位xd调试过,能够指点一二,非常感谢!
发表于 2007-9-16 17:36:37 | 显示全部楼层
请check蓝牙的gpio是否设置正确。你所贴上的代码是基本不需要修改的。
点评回复

使用道具 举报

 楼主| 发表于 2007-9-17 16:43:44 | 显示全部楼层
gpio设置我修改了custom_equipment.c里的:
/*GPIO_LABELID_BTPWR_EN */                                {GPIO_INVAILD, GPIO_PORT_24, netname[10], NULL },
/*GPIO_LABELID_BT_RESET */                        {GPIO_INVAILD, GPIO_PORT_47, netname[12], NULL },

以及bt_hw_define.h
#define BT_GPIO_RESET         47        //GPIO_39 : PMIC reset
#define BT_GPIO_POWER        24    //Old:12    //KP Jerry modify on 2007-2-28    //GPIO_12: Power

不知道有没有其他还需要修改的地方?请xd多多指教
点评回复

使用道具 举报

发表于 2007-9-17 20:59:29 | 显示全部楼层
btmtk_config.c好像也需要改。
点评回复

使用道具 举报

 楼主| 发表于 2007-9-17 21:07:20 | 显示全部楼层
我用的蓝牙芯片是csr,btmtk_config.c里是mtk的蓝牙芯片的定义吧
点评回复

使用道具 举报

发表于 2007-9-18 12:20:50 | 显示全部楼层
gpio设置我修改了custom_equipment.c里的:
/*GPIO_LABELID_BTPWR_EN */    {GPIO_INVAILD, GPIO_PORT_24, netname[10], NULL },
/*GPIO_LABELID_BT_RESET */   {GPIO_INVAILD, GPIO_PORT_47, netname[12], NULL },


------这个就是有问题的,GPIO_INVAILD-》GPIO_VALID ,你怎么可以用invaild?!, gpio设置我修改了custom_equipment.c里的:
/*GPIO_LABELID_BTPWR_EN */    {GPIO_INVAILD, GPIO_PORT_24, netname[10], NULL },
/*GPIO_LABELID_BT_RESET */   {GPIO_INVAILD, GPIO_PORT_47, netname[12], NULL },


------这个就是有问题的,GPIO_INVAILD-》GPIO_VALID ,你怎么可以用invaild?!
点评回复

使用道具 举报

 楼主| 发表于 2007-9-22 11:05:06 | 显示全部楼层
回复 shawn_lee,已经修改为GPIO_VALID,现象依旧。
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-7-13 11:53 , Processed in 0.052306 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表