<?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>BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69775/ble_uart-example-and-uart-driver</link><description>Hi good evening, 
 i am working on a project that requires ble transmission between 2NRF52dks and one of them is connected to a PC and apart from receiving data from another nrf52 and outputting the data serially, I require PWM and UART (using drivers</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 May 2021 06:51:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69775/ble_uart-example-and-uart-driver" /><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/311646?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 06:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6425bdf-1b7a-4faa-921f-bff7fdb937e9</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Nikolai.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the slow reply, I have been on leave for the last 4 months. If you are still having issues with this I suggest you open a new case, since this one is getting old and fragmented. You can point to this one if you like, and it will most likely be assigned to me.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/296376?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 18:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dad3aaa-cd39-4797-ba31-76725f4afa93</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;Hi , i finally finished my examinations and had time to continue back working on this project.. firstly wanted to thank you for your reply.. secondly I was thinking of changing to timers as u insisted however looking at your example provided I was a bit confused. &amp;#39;in my application I basically require a timer to be on for a certain period depending on the value entered into the uart terminal of the client development board.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As an example&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if I enter the word RPM300 in the uart terminal I need to extract the 300 into an integer and then look into the 300th position in an array where I have all the appropriate periods ranging from RPM of 0 - 300 where in the case of 300 it translates into 5 micro seconds which then I need to switch a timer on with a period of 5us (square wave) and keep it on until i receive another command&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288570?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2021 09:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc6c6ee9-d689-4fb9-a1c0-0d9ad28c65f1</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;ok understood thank you ill use timers&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288531?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2021 07:35:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ac7395-e8b9-4b79-97f8-6a4d322c3c38</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Good luck. If you have any questions or comments just let me know &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288348?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 10:56:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a5504ad-c5b2-4024-b2d7-69e4ddb2bce1</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;So it&amp;#39;s not PWM at all, then - it is Frequency Modulation (FM).&lt;/p&gt;
&lt;p&gt;So a PWM driver is not what you&amp;#39;re looking for.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288347?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 10:52:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:631789ea-413b-4268-9c20-0dc8d6dd5c44</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;ill take a look and let you know than you for ur suggestions &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288346?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 10:51:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f853438-ed21-4636-a11a-ef25444c4ba7</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;because the change in freuqency is wat changes the speed of the motor controller. It does not behave like other motor controller that requires a constant frequency but a duty change from 1-2us.&amp;nbsp; The motor changes speed by keeping constant duty cycle but change in frequency from 0Hz up to a max of 200kHz&lt;/p&gt;
&lt;p&gt;i agree its strange but that&amp;#39;s how it is :/&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288342?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 10:45:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb8537d6-c48c-4f14-99ae-b58c5f4a22a5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Nikolai&lt;/p&gt;
&lt;p&gt;In case you end up going down the TIMER/PPI/GPIOTE route, I shared a similar example in an earlier case:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68673/pwm-library-simpler-way-for-on-off-enable-disable-than-the-example-with-sdk"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/68673/pwm-library-simpler-way-for-on-off-enable-disable-than-the-example-with-sdk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you have any issues with it just let me know.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288133?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2021 10:39:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e7a71cb-2d38-4e45-b580-135e42191f42</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;But why do you need to change the PWM &lt;em&gt;&lt;strong&gt;frequency&lt;/strong&gt;&lt;/em&gt; ?&lt;/p&gt;
&lt;p&gt;As the name suggests, PWM is normally just about changing (ie, &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;M&lt;/strong&gt;&lt;/span&gt;odulating) the &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;P&lt;/strong&gt;&lt;/span&gt;ulse &lt;em&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;W&lt;/strong&gt;&lt;/span&gt;idth&lt;/em&gt; - not changing the frequency.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288129?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2021 10:33:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98ab289a-56e2-42f2-b7b7-06ebefe390ce</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;i need to change the PWM around every 1-2min as I am measuring rotational accelaeation and gyro results from an inertial sensor and the point of the project is to ensure that the measured data is equal to the input RPM&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/288009?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 15:22:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:423f6e3b-4258-43be-960c-097352a204ad</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Nikolai&lt;/p&gt;
&lt;p&gt;Approximately how often do you need to change the PWM frequency?&lt;/p&gt;
&lt;p&gt;Do you only need a single output, or multiple?&lt;/p&gt;
&lt;p&gt;The PWM peripheral is not very well suited for applications where you want to change the frequency rather than the duty cycle, since by default the frequency is fixed and only the duty cycle changes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this case it might be better to setup a timer module to generate events at your desired frequency, and connect these events to a pin through the PPI and GPIOTE peripherals.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you simply need to change the compare value of the timer in order to change the frequency of the pin.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/287652?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2021 09:17:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c988323-61da-452a-89f7-54631190ec13</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;Thank you for your reply it is very helpful, my only concern is that I constantly need to update the frequency rather than the dutycycle. In my application the user will need to enter some value like RPM300 (300 rpms for a motor) where the 300 is extracted and depending on the value I change the frequency of the PWM for example RPM300 means PWM of period 5us and the duty cycle Is always on 50% etc.... where the RPM ranges from 0-300 RPM.&lt;/p&gt;
&lt;p&gt;In my case where i had the uarte and pwm i was using the pwm library and i had a lookup table (array with all periods) and depending on the value of RPM it will get the period from that array.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;can this be done n the same manner&lt;/p&gt;
&lt;p&gt;or can the pwm part be changed to using the library rather than driver?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;what do you think please?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/286872?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2020 15:40:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39457e4f-549f-4c7e-b0b6-3fa5661b1680</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Nikolai&lt;/p&gt;
&lt;p&gt;You mentioned you were using the ble_app_uart_c example as reference?&lt;/p&gt;
&lt;p&gt;This example already has the UART enabled, so adding this should not be necessary.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I modified the example to also include PWM, so you can see how this is done.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The example here (just unzip to \nRF5_SDK_17.0.2_d674dde\examples\ble_central):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_uart_5F00_c_5F00_pwm.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_uart_5F00_c_5F00_pwm.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Patch file here, if you just want to see what I changed:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/change.patch"&gt;devzone.nordicsemi.com/.../change.patch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/286770?ContentTypeID=1</link><pubDate>Mon, 28 Dec 2020 19:31:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:074130c7-0668-4440-ba18-848569ccb01d</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;can u hep me ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/286558?ContentTypeID=1</link><pubDate>Thu, 24 Dec 2020 10:25:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13da47a6-7147-475a-bfda-b2d92b0c9f47</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;is it possible to maybe share your code of the Christmas tree ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/286548?ContentTypeID=1</link><pubDate>Thu, 24 Dec 2020 09:31:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb8b0d97-2088-49ab-ae13-2b9226f0ae91</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;hi i tried it and it didnt really work but it could be due to code placement , do I but the uart and pwm functions under the ble ?&lt;/p&gt;
&lt;p&gt;or the other way around&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/286179?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 22:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f5ac196-68cb-486f-b58f-d259a0a4a9ee</guid><dc:creator>NikTheNordicUser</dc:creator><description>&lt;p&gt;Ok thanks for the fast response ill have a go at it&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_UART example and UART Driver</title><link>https://devzone.nordicsemi.com/thread/286176?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 22:15:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:829fe62b-0ecf-4a8b-b8b1-c0db08e91d05</guid><dc:creator>awneil</dc:creator><description>[quote userid="93218" url="~/f/nordic-q-a/69775/ble_uart-example-and-uart-driver"]is it possible to combine them all together[/quote]
&lt;p&gt;Yes:&amp;nbsp;NUS + PWM + UART:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/community/f/wireless-forum/69754/nrf52-ble-christmas-tree"&gt;https://devzone.nordicsemi.com/community/f/wireless-forum/69754/nrf52-ble-christmas-tree&lt;/a&gt;&lt;/p&gt;
[quote userid="93218" url="~/f/nordic-q-a/69775/ble_uart-example-and-uart-driver"]some help on how to properly do it[/quote]
&lt;p&gt;For the BLE, start with the NUS example from the SDK. Get that going, and understand how it works.&lt;/p&gt;
&lt;p&gt;Then merge your PWM &amp;amp; UART into that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>