Hi all:
When I initialize ten buttons, I get a stack error. And when I use the bsp.c to init the ten buttons, It seems not to enter the event handle, but I init four buttons, It can enter the event handle.
What should I fix?
Thanks.
Hi all:
When I initialize ten buttons, I get a stack error. And when I use the bsp.c to init the ten buttons, It seems not to enter the event handle, but I init four buttons, It can enter the event handle.
What should I fix?
Thanks.
Hi Yang,
Thank you for contacting DevZone at NordicSemi.
When I initialize ten buttons, I get a stack error.
How are you initializing these buttons?
I think it is due to the hardware limitation.
From the specifications, we see that a pin should only be assigned to one GPIOTE channel at a time. Otherwise, it will result into unpredictable behavior.
Moreover, we can have only 8 different GPIOTE channels configured.
You may look at this ticket that explains this more.
Also, bsp package and board files define 4 buttons:
And therefore, the source code for initialization etc. uses loop to check and set up to four buttons.
Regards,
Naeem
Hi Yang,
Thank you for contacting DevZone at NordicSemi.
When I initialize ten buttons, I get a stack error.
How are you initializing these buttons?
I think it is due to the hardware limitation.
From the specifications, we see that a pin should only be assigned to one GPIOTE channel at a time. Otherwise, it will result into unpredictable behavior.
Moreover, we can have only 8 different GPIOTE channels configured.
You may look at this ticket that explains this more.
Also, bsp package and board files define 4 buttons:
And therefore, the source code for initialization etc. uses loop to check and set up to four buttons.
Regards,
Naeem
Oh, Thanks!