This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2642R: 调用GapScan_Enable()后程序跑飞了

Part Number: CC2642R
Other Parts Discussed in Thread: CC2640

如果不调用GapScan_Enable()程序一切正常,如果调用GapScan_Enable(),程序在退出ScanCallback()之后会进入RF_swiHw(),在运行到该函数的最后一句SwiP_or()之后就无法继续跟踪,应该是跑飞了,之后陷入死机。

Scanner的参数是GapScan_Enable(0,100, 20),GapScan_setPhyParams(DEFAULT_SCAN_PHY, SCAN_TYPE_ACTIVE, 500, 100)。

  • 您好,

    您这边在使用cc2642r做什么应用的开发,在使用的SDK是什么,我们希望要有更多的图文细节,有比较完整的程序也可以一并贴上来方便我们工程师查找问题(插入代码)。

    感谢您的支持。

  • SDK是simplelink_cc13x2_26x2_sdk_5_10_00_48,编译软件是CCS,目前想用CC2642作为主机连接从机CC2640,这是simple_central的代码,我目前想要启动扫描并且连接我想要的那个设备。但是扫描启动之后程序容易跑飞

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /******************************************************************************
    @file simple_central.c
    @brief This file contains the Simple Central sample application for use
    with the CC2650 Bluetooth Low Energy Protocol Stack.
    Group: WCS, BTS
    Target Device: cc13x2_26x2
    ******************************************************************************
    Copyright (c) 2013-2021, Texas Instruments Incorporated
    All rights reserved.
    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:
    * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 您好,

    收到您的问题了,我们升级到英文论坛给工程师看下,有答复尽快给到您。

  • 似乎陷入了死循环,但是不知道这部分汇编代码对应哪里

  • 您好,

    帮您同步问题,感谢您的支持。

  • 您好,

    我们工程师建议您删除 SimpleCentral_scanCb() 函数中添加的代码,以方便我们去查找问题。

  • 尝试过 SimpleCentral_scanCb() 第一行就return,还是会跑飞。似乎不管这个函数里面写了什么,只要进入这个函数就会跑飞

  • 您好,

    帮您同步工程师,感谢您的支持。

  • 您好,

    因为很多程序都在背后运行,所以有可能是正常现象,所以我们工程师建议您编译一下一个未修改的simple_central的示例,看看SimpleCentral_scanCb()话会不会跑飞。我们也会持续跟进您的问题。

    您也可以参考一下https://dev.ti.com/tirex/content/simplelink_cc13xx_cc26xx_sdk_6_20_00_29/docs/ble5stack/ble_user_guide/html/ble-stack-5.x-guide/debugging-index.htm

  • 编译过了,未修改的simple_central示例里面没有调用GapScanner_enable()不会进入SimpleCentral_scanCb(),只要不开启扫描就是正常的

  • 您好,

    帮您同步工程师,请稍等,感谢您的支持。

  • 请问有调试方法了吗

  • 您好,

    这是在英文论坛帖子链接

    您可以看一下Clément的相关回复是否能够帮助到您。

    后续有什么需要直接回复的您可以和我说,可以帮您回复。

  • 只要调用GapScan_enable()程序就会陷入无响应的状态,如果不调用GapScan_enable()程序就可以正常运行

  • 您好,已帮您同步消息。

    感谢您的等待。

  • 您好,

    我们工程师表示无法在未修改的示例上重现您的问题,所以无法具体展开研究您的问题。如果您有更多信息或者是对the out of the box examples存在问题的更多证明,您可以新开一个帖子,此帖将被关闭。

    在所有情况下,都请避免在程序中回调潜在的阻塞函数(please avoid executing potentially blocking function calls in callback contexts)。

    感谢您的理解。