This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

interrupt usage for reading limit switch data

Dear Team,

i hope you are doing good,

I am working on nrf51822 controller, using SDK is 12.3.0 on windows environment. Soft-device is s130

i am planning interface limit switches with interrupt  based , so  please help how can i implement  interrupt  BLE_PERIPHERAL /BLE_APP_UART?

how we enable and disable interrupt in the  my application.

Parents
  • Hello,

    Do you mean that you want to have an interrupt on a pin, and then send an UART message, or do you want interrupts on UART messages?

    Either way, look at how the peripheral\pin_change_int example (note, not ble_peripheral) for a simple interrupt setup. If you need button debounce, you can also look into the app_button library (app_button.c/h).

    Note that there is also an example called bsp, located in peripheral\bsp, but this library is quite heavily stripped, so you can't see when a button is released. You can do this if you use the app_button.c library.

    So can you describe a bit more in detail what you need for your application?

    Best regards,

    Edvin

Reply
  • Hello,

    Do you mean that you want to have an interrupt on a pin, and then send an UART message, or do you want interrupts on UART messages?

    Either way, look at how the peripheral\pin_change_int example (note, not ble_peripheral) for a simple interrupt setup. If you need button debounce, you can also look into the app_button library (app_button.c/h).

    Note that there is also an example called bsp, located in peripheral\bsp, but this library is quite heavily stripped, so you can't see when a button is released. You can do this if you use the app_button.c library.

    So can you describe a bit more in detail what you need for your application?

    Best regards,

    Edvin

Children
No Data
Related