LPC SDK 2.12 button component bug

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

LPC SDK 2.12 button component bug

818件の閲覧回数
A_M
Contributor III

Hello,

the fsl_component_button have a bug. There is no initialisation of the timer.
Therefore only the double click event is reported no matter how the button is pressed.

The bug seems to be in all LPC54xxx SDKs.

Tested SDK_2_12_0_LPC54005 & SDK_2_12_0_LPC54608J512

0 件の賞賛
5 返答(返信)

774件の閲覧回数
A_M
Contributor III

Hello,

I expect that when I enable the klick functions(one/double/short/long), define the threshold time in fsl_component_button.h and call
BUTTON_Init((button_handle_t)s_buttonHandle, &buttonConfig);
BUTTON_InstallCallback(&s_buttonHandle, button_callback, NULL);.
That then I get result in button_callback.

But the only event that I get is double klick. The timer to measure the threshold time is not initialized.

There must be an initialization call TM_Init(…) in BUTTON_OpenTimer but its not.

My fix is in fsl_component_button.h is in the zip Line 309 – 314.

 

0 件の賞賛

766件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @A_M ,

Could you please try using the following code for fsl_component_button.c in function BUTTON_OpenTimer instead of using your configuration?

RaulRomero_0-1674670636543.png

[button component of LPCXpresso54608]

Checking the button component in LPC54608 and comparing the one in LPCXpresso54608, some lines of the code above are missing. Could you please try your code using the underlined lines?

Please let us know if this actually helps you to work out the button component.

Regards, Raul.

0 件の賞賛

763件の閲覧回数
A_M
Contributor III

Hello Raul,

no it dosn help.

button_callback still post doubleklick only.

0 件の賞賛

744件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @A_M,

Looking at the button component API and seeing the base example to demonstrate how to use the button component; to which you can access through Import SDK example(s)…:

RaulRomero_0-1674842174578.png

The button component is expecting that you do the initialization of the timer TM_Init() by yourself; in the example is at main before BUTTON_Init() and BUTTON_InstallCallback(), but the way that you did it is also right.

Best regards, Raul.

0 件の賞賛

799件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @A_M,

Could you please tell us how are you testing this? What are you expecting to do, or which functions are you expecting to enter with the initialization of the timer?

Best regards, Raul.

0 件の賞賛