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

Examples using the scheduler

I am trying to use the Scheduler to create my own event handler system (similar to a Ti 8051 OSAL system). I'm writing separate classes that can push data/trigger handlers between classes via put/scheduled events. Sort of like a soft interrupt. For example I want a timer timeout handler of a Button_timer.c class to send an event to Main.c, to trigger enable/disable some LEDs. This way Main.c acts as the main dispatch and controller for all peripheral events. However I cannot find any examples of the Scheduler where the application created its own events and event handlers. Thus I'm still a little in the dark with exactly how to implement a Scheduler into my application. Can anyone point me to some examples that use the scheduler?

p.s. Tried looking into the HID examples, but the app_sched_init and app_sched_event_put calls are not coded in the application.

Thanks guys.

Parents
  • Values of this macro can be found in any examples in SDK:

    //Maximum size of scheduler events. Note that scheduler BLE stack events do not contain any data, as the events are being pulled from the stack in the event handler

    #define SCHED_MAX_EVENT_DATA_SIZE sizeof(app_timer_event_t)
    

    //Maximum number of events in the scheduler queue

    #define SCHED_QUEUE_SIZE    20
    
  • Hi ,

    I want to implement scheduler in my application which has SAADC, BLE streaming at 1000 samples per second and SD card writing. I am facing the problem that as soon as I start BLE streaming Complete code gets stopped. Without BLE streaming , I can write into SD card. The details about the issue is mentioned in this thread Here

    I have suggested to use app_scheduler. I have gone through scheduler tutorial. But how can I implement it with BLE, SAADC and SPI events.

    Can anyone suggest me anything about this?

Reply
  • Hi ,

    I want to implement scheduler in my application which has SAADC, BLE streaming at 1000 samples per second and SD card writing. I am facing the problem that as soon as I start BLE streaming Complete code gets stopped. Without BLE streaming , I can write into SD card. The details about the issue is mentioned in this thread Here

    I have suggested to use app_scheduler. I have gone through scheduler tutorial. But how can I implement it with BLE, SAADC and SPI events.

    Can anyone suggest me anything about this?

Children
No Data