# Integrating bare-metal code with RTOS task

**URL:** <https://forums.freertos.org/t/integrating-bare-metal-code-with-rtos-task/7790>\
**Category:** Kernel\
**Created:** [April 16, 2019, 7:04pm UTC](https://forums.freertos.org/t/integrating-bare-metal-code-with-rtos-task/7790 "2019-04-16T19:04:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 16, 2019, 7:04pm UTC](https://forums.freertos.org/t/integrating-bare-metal-code-with-rtos-task/7790/1 "2019-04-16T19:04:26Z")

</div>

**[query1920](https://sourceforge.net/u/query1920/)** wrote on [Tuesday, April 16, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/33cdde3219/#08bd):

Hello,

I am new to FreeRTOS, and have some question with respect to integrating FreeRTOS tasks with bare-metal program. I have application where i would like to acquire data from sensor outside freeRtos everytime interrupt occurs from hardware.

1. Is it possible to switch between FreeRTos task and bare-metal application based on interrupt frequency once scheduler is started ?
2. If so, then can i populate queues and give semaphore when the required amount of data is collected in bare metal code to wake up a task to process acquired data ?

Any suggestion is much appreciated,

Regards  
Query1920
