SDK_2.9.0 LPCXpresso51U68 has new CTIMER Assertion Fault

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

SDK_2.9.0 LPCXpresso51U68 has new CTIMER Assertion Fault

ソリューションへジャンプ
830件の閲覧回数
frank5
Contributor II

The new 2.9.0 version of the SDK has an issue with CTIMER3 which will cause an assertion fault if the CTIMER_Init() function is called. The problem occurs in line 110 of fsl_ctimer.c, when the RESET_PeripheralReset(s_ctimerReset[CTIMER_GetInstance(base)]);) is called. The new library has a change in LPC51U68.h in line 1730:
#define CTIMER_BASE_PTRS { CTIMER0, CTIMER1, (CTIMER_Type *)0u, CTIMER3 }
Essentially this adds a new, dummy entry for CTIMER2. This change makes the CTIMER_GetInstance(base) return array position 3, which does not exist in s_ctimerReset[], which contains no entry for CTIMER2. 
As a result, the Reset operation fails to find a valid bit number and generates an assert crash.
Temporary workaround is to add a dummy value in the CTIMER_RSTS array in fsl_reset.h, at line 125:

#define CTIMER_RSTS \
{ \
kCTIMER0_RST_SHIFT_RSTn, kCTIMER1_RST_SHIFT_RSTn, (SYSCON_RSTn_t)0, kCTIMER3_RST_SHIFT_RSTn \
} /* Reset bits for TIMER peripheral */

This will align the two arrays to both have 4 entries, and allow CTIMER_Init() to work with Timer3.

 

0 件の賞賛
返信
1 解決策
813件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello frank5,

 

Thanks for your sharing, I will take a ticket to SDK team.

 

Regards,

Alice

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
814件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello frank5,

 

Thanks for your sharing, I will take a ticket to SDK team.

 

Regards,

Alice

0 件の賞賛
返信