<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to get nRF52 to act as a central and a peripheral with FreeRTOS?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54721/how-to-get-nrf52-to-act-as-a-central-and-a-peripheral-with-freertos</link><description>Hi Nordic DevZone, 
 
 I am currently trying to implement a system whereby a nordic nRF52 board scans and broadcasts in alternation, using freeRTOS tasks. 
 
 I have yet to find any example code that could lead me in the right direction. I was trying</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Nov 2019 12:25:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54721/how-to-get-nrf52-to-act-as-a-central-and-a-peripheral-with-freertos" /><item><title>RE: How to get nRF52 to act as a central and a peripheral with FreeRTOS?</title><link>https://devzone.nordicsemi.com/thread/221833?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 12:25:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1718014-e7f9-4f4d-9b35-de415ff0e3da</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I haven&amp;#39;t tried this myself, but thinking out loud.&lt;/p&gt;
&lt;p&gt;It does not look like this is a difficult functionality to achieve. The initialization of both roles(peripheral and central) can be done in main function without any threads stated.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can have two threads, one purely handling peripheral BLE events and the other purely handling central events.&lt;/li&gt;
&lt;li&gt;The events&amp;nbsp;that are received n the BLE event handler and can be forwarded to corresponding threads using message queues&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Apart from that, there should not be any architectural challenges you should see related to FreeRTOS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get nRF52 to act as a central and a peripheral with FreeRTOS?</title><link>https://devzone.nordicsemi.com/thread/221664?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2019 20:42:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b4b0f80-15ea-474d-8b8f-0e9e33634bd5</guid><dc:creator>danielco68</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I already saw this post and it wasn&amp;#39;t as detailed as I was hoping for.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Currently, I have two code bases where one acts as a peripheral and one acts as a central. I would like to create tasks to have the board act as both, and I would like to use a counting semaphore do to some inter-task communication, which directly controls components on the board such as an LED.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In short, the final goal is to have some scanner that listens to a signal (a BLE advertisment from an external source), as well as be advertising itself and allowing a characteristic in a custom service to be written to.&lt;/p&gt;
&lt;p&gt;I am looking for FreeRTOS compatible code that could achieve the above specifications.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get nRF52 to act as a central and a peripheral with FreeRTOS?</title><link>https://devzone.nordicsemi.com/thread/221644?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2019 16:19:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96f602ab-c8f3-47f5-808e-3e4e1cafd957</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;All I could find, was this example:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41508/sdk15-2-freertos-ble-central-and-peripheral"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/41508/sdk15-2-freertos-ble-central-and-peripheral&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If this is not sufficient, or if you would like to get a more detailed answer, please tell me and I will ask for a comment from the freeRTOS expert on the support team.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>