LPC54102 - Configuring CTIMER0 Capture Channel 3

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC54102 - Configuring CTIMER0 Capture Channel 3

746件の閲覧回数
BTaylor
Contributor III

SDK Version 2.6.1

The _ctimer_capture_channel value kCTIMER_Capture_3 is only compiled in to the SDK if FSL_FEATURE_CTIMER_HAS_CCR_CAP3 is defined:

/*! @brief List of Timer capture channels */
typedef enum _ctimer_capture_channel
{
kCTIMER_Capture_0 = 0U, /*!< Timer capture channel 0 */
kCTIMER_Capture_1, /*!< Timer capture channel 1 */
kCTIMER_Capture_2, /*!< Timer capture channel 2 */
#if defined(FSL_FEATURE_CTIMER_HAS_CCR_CAP3) && FSL_FEATURE_CTIMER_HAS_CCR_CAP3
kCTIMER_Capture_3 /*!< Timer capture channel 3 */
#endif /* FSL_FEATURE_CTIMER_HAS_IR_CR3INT */
} ctimer_capture_channel_t;

For LPC54102, however, this value is not defined (in LPC54102_cm4_features.h) so kCTIMER_Capture_3 is not provided.

Why is this not the case? There are a number of pins that can be set up via pinmux for capture for ctimer0 input channel 3. So why is FSL_FEATURE_CTIMER_HAS_CCR_CAP3 not defined for LPC54102?

タグ(1)
0 件の賞賛
返信
3 返答(返信)

730件の閲覧回数
BTaylor
Contributor III

Thank you for the respons. The problem is that the compiler option is not dependent on the index of the timer. In other words, if that option is not defined, then input capture channel 3 is made unavailable for ALL timers, irrespective of index. And as I indicated in the original post, FSL_FEATURE_CTIMER_HAS_CCR_CAP3 is NOT defined in LPC54102_cm4_features.h

0 件の賞賛
返信

728件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The capture pins are dependent on the CTimer index, I suppose you can define the FSL_FEATURE_CTIMER_HAS_CCR_CAP3=1 in compiler option, but you remember that only CTimerB0/B1 have the CAP3 pins.

Hope it can help you

BR

XiangJun Rong

0 件の賞賛
返信

732件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As you know that the LPC54102 has 4 CTimer CT32B0,CT32B1,CT32B2 and CT32B3. The CT32B0 has 4 Capture pins CT32B0_CAP0~3, CT32B1 has 4 Capture pins CT32B1_CAP0~3, the CT32B2 has 3 Capture pins CT32B2_CAP0~2, the CT32B3 has 3 Capture pins CT32B3_CAP0~2.

So the CT32Bx_CAP3 is dependent on the the Ctimer index, that is why a compiler option FSL_FEATURE_CTIMER_HAS_CCR_CAP3 is defined.

 

Hope it can help you

BR

XiangJun Rong

0 件の賞賛
返信