工具/软件:
您好、
据我所知,可以通过 OSC_AdjustXoscHfCapArray () 函数在 CC26X2 芯片上实现电容阵列的运行调整,但是我在 CC2340 的文档中没有找到这个 API ,我可以问 CC2340 如何实现电容阵列的动态变化吗?
感谢您的帮助
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.
工具/软件:
您好、
据我所知,可以通过 OSC_AdjustXoscHfCapArray () 函数在 CC26X2 芯片上实现电容阵列的运行调整,但是我在 CC2340 的文档中没有找到这个 API ,我可以问 CC2340 如何实现电容阵列的动态变化吗?
感谢您的帮助
您好:
您能看一下这些帖子是否有用吗?
我知道这是很多帖子,所以希望其中一个会解决它!
谢谢、
Toby
尊敬的 Toby:
在上面的链接中,我发现了对 CC2340 在程序运行时更改晶体补偿值 Q1 和 Q2 的相同引用,这正是我们需要的,但不幸的是,没有建议的解决方案,只是一个声明不建议这样做。是否有任何方法可以在程序运行时更改它,如 OSC_AdjustXoscHfCapArray () 函数?
它们都是相对于 HF XTAL 调整电容器阵列。
对于 CC26x2、在 osc.h 中介绍了函数:
//***************************************************************************** // //! \brief Adjust the XOSC HF cap array relative to the factory setting //! //! The cap array factory setting (FCFG) can be converted to a number in the range 0 - 63. //! Both this function and the customer configuration (CCFG) setting can apply a delta to the FCFG setting. //! The CCFG setting is automatically applied at boot time (See ../startup_files/ccfg.c). //! Calling this function will discard the CCFG setting and adjust relative to the FCFG setting. //! //! \note Adjusted value will not take effect before XOSC_HF is stopped and restarted //! //! \param capArrDelta specifies number of step to adjust the cap array relative to the factory setting. //! //! \return None // //***************************************************************************** extern void OSC_AdjustXoscHfCapArray( int32_t capArrDelta );
对于 CC2340、ckmd.h 中介绍了函数:
//*****************************************************************************
//
//! \brief Sets target HFXT capacitor ramp trims
//!
//! This function sets the target HFXT capacitor ramp trims. It will
//! overwrite the target HFXT ramp trim values set during startup.
//!
//! This trim value is used when target turning on the HFXT.
//!
//! \note The value for \c capTrim must be found experimentally based on the
//! chosen crystal and desired ramp behaviour.
//!
//! \param q1CapTrim Target Q1 capacitor trim.
//! \param q2CapTrim Target Q2 capacitor trim.
//!
//! \return None
//!
//! \sa CKMD_O_HFXTTARG for trim range
//
//*****************************************************************************
__STATIC_INLINE void CKMDSetTargetCapTrim(uint32_t q1CapTrim, uint32_t q2CapTrim)
{
uint32_t tmp = HWREG(CKMD_BASE + CKMD_O_HFXTTARG) & ~(CKMD_HFXTTARG_Q1CAP_M | CKMD_HFXTTARG_Q2CAP_M);
tmp |= (q1CapTrim << CKMD_HFXTTARG_Q1CAP_S) & CKMD_HFXTTARG_Q1CAP_M;
tmp |= (q2CapTrim << CKMD_HFXTTARG_Q2CAP_S) & CKMD_HFXTTARG_Q2CAP_M;
HWREG(CKMD_BASE + CKMD_O_HFXTTARG) = tmp;
}
除此之外、请注意此处提到的推荐测试: (+) CC2340R5:HFXT 外部电容值 — 蓝牙论坛- Bluetooth︎ — TI E2E 支持论坛