找回密码
 立即注册

使用微信账号登录

只需一步,快速开始

查看: 8852|回复: 16

[CSR8系列] source中添加uart失败,PanicNull

[复制链接]
连续签到天数:1天
签到总天数:1023天
签到总奖励:12600金币
发表于 2017-5-9 11:22:35 | 显示全部楼层 |阅读模式

马上注册,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册  

×
我在8670中使用uart,单独的uart程序是已经调通了的,然后在加入到source程序中出错了。

我就先尝试最简单的,在main函数中添加如下代码:
  1. int main(void)
  2. {   
  3.     Sink uart_sink;
  4.     uart_sink = StreamUartSink();   
  5.     PanicNull(uart_sink);
复制代码
然后就出错了,要么就panic,要么就Failed to send or process command,或者cannot start debugger等。
把这几行代码去掉,程序就正常了。

把这三行代码添加到sink工程中,就不会出错。

球指点啊!

楼主热帖
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
连续签到天数:1天
签到总天数:1023天
签到总奖励:12600金币
 楼主| 发表于 2017-5-9 11:28:21 | 显示全部楼层
transport已经设置为raw
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1023天
签到总奖励:12600金币
 楼主| 发表于 2017-5-9 11:42:20 | 显示全部楼层
debug中还有一个错误,也不知道怎么搞:
pscli -trans "SPITRANS=USB SPIPORT=0" @usb_vm @hci_onchip -m source.psr_ : concluded with Failure (Failed to update key 0x01F9, Host interface)
make: [keys] Error 3 (ignored)
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:57天
签到总奖励:387金币
发表于 2017-5-11 10:00:37 | 显示全部楼层
Pskey中的Host interface 需要设置为 Uart
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1023天
签到总奖励:12600金币
 楼主| 发表于 2017-5-11 10:07:47 | 显示全部楼层
Sanil1988 发表于 2017-5-11 10:00
Pskey中的Host interface 需要设置为 Uart

谢谢,我在source.psr中设置&01f9 = 0004。但是烧录后在pstool中查看,还是0,no host to chip connection。
这个是怎么回事呢?
我在同一个psr中修改其他pskey,在pstool中都能看到变化,唯独这个怎么改都不变。
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:57天
签到总奖励:387金币
发表于 2017-5-11 10:15:08 | 显示全部楼层
在工程.mak文件中查下
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1023天
签到总奖励:12600金币
 楼主| 发表于 2017-5-11 10:50:57 | 显示全部楼层
Sanil1988 发表于 2017-5-11 10:15
在工程.mak文件中查下

我看了一下,mak里只设置了transport、EXECUTION_MODE、LIBS和INPUTS,未看到关于host interface的设定。


  1. # Set transport make variable
  2. ifneq (,$(findstring -DANALOGUE_INPUT_DEVICE,$(DEFS)))
  3. TRANSPORT=none
  4. else
  5. TRANSPORT=usb_vm
  6. endif

  7. # Check for BlueCore version
  8. ifneq (,$(findstring -DBC5_MULTIMEDIA,$(DEFS)))
  9. EXECUTION_MODE=native
  10. endif

  11. # Include Kalimba algorithms that are built from the DSP applications that are included as part of the project
  12. .PHONY : image/sbc_encoder/sbc_encoder.kap \
  13.         image/usb_dongle_48_to_16k_stereo/usb_dongle_48_to_16k_stereo.kap \
  14.         image/usb_dongle_48_to_8k_stereo/usb_dongle_48_to_8k_stereo.kap \
  15.         image/usb_dongle_16k_mono/usb_dongle_16k_mono.kap \
  16.         image/usb_dongle_8k_mono/usb_dongle_8k_mono.kap \
  17.         image/aptx_encoder/aptx_encoder.kap \
  18.         image/aptx_acl_sprint_encoder/aptx_acl_sprint_encoder.kap



  19. LIBS += -la2dp -laudio_no_ap -laudio_plugin_common -lavrcp -lbdaddr -lcodec
  20. LIBS += -lcsr_a2dp_encoder_common_plugin -lcsr_tone_plugin
  21. LIBS += -lpio_common -lpower -lregion -lsdp_parse -lservice -lusb_device_class_no_mass_storage -lwbs
  22. LIBS += -lcsr_i2s_audio_plugin

  23. LIBS += -laghfp
  24. LIBS += -lcsr_ag_audio_plugin -LLibs/Libs/assisted

  25. LIBS += -lgatt
  26. #, fm_rx_plugin, fm_rx_api,  swat, csr_i2s_audio_plugin
  27. #display_plugin_cns10010_scroll, display_example_plugin, display, avrcp ,power ,connection,bdaddr ,hfp_min_cfm ,region ,service ,codec ,csr_tone_plugin ,audio,csr_cvc_common_plugin_all ,csr_voice_prompts_plugin ,csr_a2dp_decoder_common_plugin_stereo_bidir ,a2dp ,csr_common_example_plugin ,obex ,sdp_parse ,md5 ,usb_device_class ,spp_common ,spps ,sppc ,pblock ,audio_plugin_common ,csr_dut_audio_plugin ,pio_common, pbapc, mapc, gatt, fm_rx_plugin, fm_rx_api,  swat, csr_i2s_audio_plugin



  28. ifneq (,$(findstring -DBLE_ENABLED,$(DEFS)))
  29. $(info ble enable)
  30. LIBS += -lconnection
  31. INPUTS += sink_input_manager.c sink_input_manager.h
  32. else
  33. LIBS += -lconnection_no_ble
  34. endif


  35. INPUTS += sink_ble_advertising.c sink_ble_advertising.h
  36. INPUTS += sink_ble_remote_control.c sink_ble_remote_control.h
  37. INPUTS += sink_ble_scanning.c sink_ble_scanning.h

  38. INPUTS += sink_gatt.c sink_gatt.h
  39. INPUTS += sink_gatt_server.c sink_gatt_server.h
  40. INPUTS += sink_gatt_client.c sink_gatt_client.h
  41. INPUTS += sink_events.h
  42. INPUTS += sink_utils.c sink_utils.h
  43. INPUTS += sink_gap_ad_types.h

  44.         
  45. # Include SBC encoder
  46. #image/sbc_encoder/sbc_encoder.kap :
  47. #        $(mkdir) image/sbc_encoder
  48. #        $(copyfile) ..\..\kalimba\apps\a2dp_source\image\sbc_encoder\sbc_encoder.kap $@
  49.        
  50. #image.fs : image/sbc_encoder/sbc_encoder.kap
  51.    
  52. # Include 48kHz to 16kHz speech for Wide Band HFP and USB configured at 48kHz sample rate
  53. #image/usb_dongle_48_to_16k_stereo/usb_dongle_48_to_16k_stereo.kap :
  54. #        $(mkdir) image/usb_dongle_48_to_16k_stereo
  55. #        $(copyfile) ..\..\kalimba\apps\one_mic_example\image\usb_dongle_48_to_16k_stereo\usb_dongle_48_to_16k_stereo.kap $@
  56.        
  57. #image.fs : image/usb_dongle_48_to_16k_stereo/usb_dongle_48_to_16k_stereo.kap

  58. # Include 48kHz to 8kHz speech for Narrow Band HFP and USB configured at 48kHz sample rate
  59. #image/usb_dongle_48_to_8k_stereo/usb_dongle_48_to_8k_stereo.kap :
  60. #        $(mkdir) image/usb_dongle_48_to_8k_stereo
  61. #        $(copyfile) ..\..\kalimba\apps\one_mic_example\image\usb_dongle_48_to_8k_stereo\usb_dongle_48_to_8k_stereo.kap $@
  62.        
  63. #image.fs : image/usb_dongle_48_to_8k_stereo/usb_dongle_48_to_8k_stereo.kap

  64. # Include 16kHz speech for Wide Band HFP and USB configured at 16kHz sample rate
  65. #image/usb_dongle_16k_mono/usb_dongle_16k_mono.kap :
  66. #        $(mkdir) image/usb_dongle_16k_mono
  67. #        $(copyfile) ..\..\kalimba\apps\one_mic_example\image\usb_dongle_16k_mono\usb_dongle_16k_mono.kap $@
  68.        
  69. #image.fs : image/usb_dongle_16k_mono/usb_dongle_16k_mono.kap

  70. # Include 8kHz speech for Narrow Band HFP and USB configured at 8kHz sample rate
  71. #image/usb_dongle_8k_mono/usb_dongle_8k_mono.kap :
  72. #        $(mkdir) image/usb_dongle_8k_mono
  73. #        $(copyfile) ..\..\kalimba\apps\one_mic_example\image\usb_dongle_8k_mono\usb_dongle_8k_mono.kap $@

  74. #image.fs : image/usb_dongle_8k_mono/usb_dongle_8k_mono.kap

  75. ## Include Classic aptX encoder - uncomment the following lines when enabling Classic aptX
  76. #image/aptx_encoder/aptx_encoder.kap :
  77. #        $(mkdir) image/aptx_encoder
  78. #        $(copyfile) ..\..\kalimba\apps\a2dp_source\image\aptx_encoder\aptx_encoder.kap $@
  79. #
  80. #image.fs : image/aptx_encoder/aptx_encoder.kap
  81. #
  82. ## Include aptX Low Latency encoder - uncomment the following lines when enabling aptX Low Latency
  83. #image/aptx_acl_sprint_encoder/aptx_acl_sprint_encoder.kap :
  84. #        $(mkdir) image/aptx_acl_sprint_encoder
  85. #        $(copyfile) ..\..\kalimba\apps\a2dp_source\image\aptx_acl_sprint_encoder\aptx_acl_sprint_encoder.kap $@
  86. #
  87. #image.fs : image/aptx_acl_sprint_encoder/aptx_acl_sprint_encoder.kap
复制代码

积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:13天
签到总奖励:86金币
发表于 2017-7-5 09:06:44 | 显示全部楼层
请问楼主,问题解决了吗?
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1天
签到总奖励:4金币
发表于 2017-9-3 22:01:14 | 显示全部楼层
楼主,现在可以了吗,sink还会返回NULL吗
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1023天
签到总奖励:12600金币
 楼主| 发表于 2017-9-5 14:04:48 | 显示全部楼层
Focus 发表于 2017-9-3 22:01
楼主,现在可以了吗,sink还会返回NULL吗

&04f8 = 0004
pskey加一项这样的设置就可以了
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册  

本版积分规则

小黑屋|手机版|我爱蓝牙网 - 52Bluetooth

GMT+8, 2024-4-26 14:36 , Processed in 0.300484 second(s), 23 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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