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.

[参考译文] CC2530:在 SimpliciTI 上使用定时器中断

Guru**** 2837190 points

Other Parts Discussed in Thread: SIMPLICITI, CC2530

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/other-wireless-group/other-wireless/f/other-wireless-technologies-forum/604355/cc2530-using-timer-interrupt-on-simpliciti

器件型号:CC2530
主题中讨论的其他器件:SimpliciTI

你(们)好

我使用 CC2530 SimpliciTI 通过广播建立简单的网络。 我需要计时器中断来在程序上每秒增加我的时间变量、但我没有任何关于在 SimpliciTI 上使用中断和计时器的参考。 哪个计时器在 SimpliciTI 上是免费的? 我应该如何设置它们? SimpliciTI 上的中断函数格式是什么? 在哪里可以看到有关它的一些示例或参考?

此致  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    
    

    纳维德

    SimpliciTI 使用1个定时器、并且使用的定时器是可配置的。 请参阅 bsp_board.def.h 以了解实施方法。

    我在这里添加了供您参考的部分。

    请查看我们为 CC2530发布的示例代码、它将帮助您根据自己的要求开始使用计时器。

    www.ti.com/.../toolssoftware

    此致、
    /TA

    #ifdef MRFI_TIMER_AUSE_ACTIVE
    
    #ifndef BSP_TIMER_USDET
    #if defined MRFI_CC2530 || defined MRFI_CC2531 || defined MRFI_CC2533
    #define BSP_timer_used 1.
    其他
    错误"错误:芯片未知或未定义。"
    #endif
    #else //如果 BSP_timer_used 是用户定义的
    #if bsp_timer_used!= 1 && bsp_timer_used!= 3 && bsp_timer_used!= 4
    错误"错误:所选的定时器无效、必须为1、3或4。"
    #endif
    #bsp_timer_used
    
    = 1.
    #define BSP_timer_vector t1_vector
    #define bsp_timer_size 16
    #elif bsp_timer_used = 3
    #define BSP_timer_vector t3_vector
    #define BSP_timer_size 8
    #elif BSP_timer_used = 4
    #define BSP_timer_vector T4_vector
    #define BSP_TIMER_SIZE 8
    #endif