Announcements

Robots are revolutionizing our lives in many ways. Join our webinar to learn about Infineon’s broad portfolio of robot building blocks.
Click here to register.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AIROC™ Bluetooth Forum Discussions

dheeraj20231
Level 1
Level 1
10 replies posted 10 sign-ins 5 replies posted

I am using custom hardware and I perfectly run HID LE Remote example from CYBLE 303472 EVAL M2B BSP.

I also get input from keypad and send to the HID over BLE.

Now I want to disable keypad scanning in runtime for low power consumption and when I get GPIO interrupt  that I want to enable keypad scanning.

 I Try call below function in runtime (one by one and together)

wiced_hal_keyscan_turnOff();
kscan_shutdown();

But keypad scanning is still running.

 

 

 

0 Likes
4 Replies
Sven_Wang
Moderator
Moderator
Moderator
50 replies posted 10 solutions authored 50 sign-ins

Hi @dheeraj20231 

 

Could you reproduce it in the CYBLE 303472 EVAL M2B rather than custom hardware?

 

Thanks

Sven

0 Likes
dheeraj20231
Level 1
Level 1
10 replies posted 10 sign-ins 5 replies posted

Hi, I also test same thing by CYBLE 303472 EVAL M2B evalution kit and this is not working.

I Tried with GPIO pull up disable and enable in runtime.

After Disable pull by following line, my keypad is not send data om terminal, that means it was disable. and than enable it was working again.

Disable :wiced_hal_gpio_configure_pin(WICED_P00, GPIO_PULL_UP_DOWN_NONE, GPIO_PIN_OUTPUT_LOW);

Enable: wiced_hal_gpio_configure_pin(WICED_P00, GPIO_PULL_UP, GPIO_PIN_OUTPUT_HIGH);

But I don't  know why below pre defined function is not working

wiced_hal_keyscan_turnOff();
kscan_shutdown();

0 Likes
Sven_Wang
Moderator
Moderator
Moderator
50 replies posted 10 solutions authored 50 sign-ins

Hi @dheeraj20231 

 

You need to disable interrupts at the same time. 

 

    kscan_shutdown();
        // Disable Interrupts
    wiced_hal_mia_enable_mia_interrupt(FALSE);
    wiced_hal_mia_enable_lhl_interrupt(FALSE);
 
Like the APP_shutdown.
Even so, I was confused why you want to save energy at the runtime. The electric current cost should be lower than MCU and RF parts.
 
Thanks
Sven

 

0 Likes

Hi Sven,

Thanks for the reply. I tried above solution.

--------------For disable keypad  -------------------------

    kscan_shutdown();
        // Disable Interrupts
    wiced_hal_mia_enable_mia_interrupt(FALSE);
    wiced_hal_mia_enable_lhl_interrupt(FALSE);
 
--------------For Enable keypad  -------------------------
    wiced_hal_mia_enable_mia_interrupt(TRUE);
    wiced_hal_mia_enable_lhl_interrupt(TRUE);
 
But my keypad is not disable , it was send data to HID.
0 Likes
This widget could not be displayed.