<?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>Combining UART and MPU6050</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61913/combining-uart-and-mpu6050</link><description>Hello, 
 I was able to build the example project MPU6050 from Github with SDK 16. However, I used Putty to connect to the board (PCA10056) with baudrate of 115200 on COM3 (the COM Port it is connected to) but I didn&amp;#39;t get any debug string. The sdk_config</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Jun 2020 11:13:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61913/combining-uart-and-mpu6050" /><item><title>RE: Combining UART and MPU6050</title><link>https://devzone.nordicsemi.com/thread/252687?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 11:13:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68628426-d9d7-4bae-a91d-cfa18181b0b2</guid><dc:creator>Guojun Wang</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I recommend you open another ticket for this question, to keep this ticket specific for logging related discussions and easy for others to follow as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining UART and MPU6050</title><link>https://devzone.nordicsemi.com/thread/252499?ContentTypeID=1</link><pubDate>Sat, 30 May 2020 02:18:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:204c78ee-4bf6-4eec-bb50-5ec257de7240</guid><dc:creator>ThienVu</dc:creator><description>&lt;p&gt;Just a quick question. I would like to: On first power on, wait for a button push. Then after it is pushed, go to a &amp;quot;calibration&amp;quot; period and then go to main loop. Also if the button is pushed again, the system goes to &amp;quot;calibration&amp;quot; period and then back to main loop. How can I structure that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining UART and MPU6050</title><link>https://devzone.nordicsemi.com/thread/252497?ContentTypeID=1</link><pubDate>Sat, 30 May 2020 02:13:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:299619da-91ba-4528-b391-6aade393a2cd</guid><dc:creator>ThienVu</dc:creator><description>&lt;p&gt;Thank you very much. I got it working now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining UART and MPU6050</title><link>https://devzone.nordicsemi.com/thread/252472?ContentTypeID=1</link><pubDate>Fri, 29 May 2020 16:21:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53973fdd-7463-4cd4-aab5-8158ea488ff3</guid><dc:creator>Guojun Wang</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The example you taken was from SDK 14.2. And there&amp;nbsp;were&amp;nbsp;some changes to logging since then.&lt;/p&gt;
&lt;p&gt;There are two approaches you can take:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Update based on your current sdk_config&lt;/li&gt;
&lt;li&gt;Port your project based on SDK 16 examples&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Regarding to option 1, basically you need to set the following defines to get the uart logging&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Set NRF_LOG_ENABLED = 1 in sdk_config.h&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Copy in the NRF_LOG_BACKEND configuration from an example using UART backend, such as examples/ble_peripheral/ble_app_hrs&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_UART_ENABLED - nrf_log_backend_uart - Log UART backend
//==========================================================
#ifndef NRF_LOG_BACKEND_UART_ENABLED
#define NRF_LOG_BACKEND_UART_ENABLED 1
#endif
// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_UART_TX_PIN - UART TX pin 
#ifndef NRF_LOG_BACKEND_UART_TX_PIN
#define NRF_LOG_BACKEND_UART_TX_PIN 6
#endif

// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_UART_BAUDRATE  - Default Baudrate
 
// &amp;lt;323584=&amp;gt; 1200 baud 
// &amp;lt;643072=&amp;gt; 2400 baud 
// &amp;lt;1290240=&amp;gt; 4800 baud 
// &amp;lt;2576384=&amp;gt; 9600 baud 
// &amp;lt;3862528=&amp;gt; 14400 baud 
// &amp;lt;5152768=&amp;gt; 19200 baud 
// &amp;lt;7716864=&amp;gt; 28800 baud 
// &amp;lt;10289152=&amp;gt; 38400 baud 
// &amp;lt;15400960=&amp;gt; 57600 baud 
// &amp;lt;20615168=&amp;gt; 76800 baud 
// &amp;lt;30801920=&amp;gt; 115200 baud 
// &amp;lt;61865984=&amp;gt; 230400 baud 
// &amp;lt;67108864=&amp;gt; 250000 baud 
// &amp;lt;121634816=&amp;gt; 460800 baud 
// &amp;lt;251658240=&amp;gt; 921600 baud 
// &amp;lt;268435456=&amp;gt; 1000000 baud 

#ifndef NRF_LOG_BACKEND_UART_BAUDRATE
#define NRF_LOG_BACKEND_UART_BAUDRATE 30801920
#endif

// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE - Size of buffer for partially processed strings. 
// &amp;lt;i&amp;gt; Size of the buffer is a trade-off between RAM usage and processing.
// &amp;lt;i&amp;gt; if buffer is smaller then strings will often be fragmented.
// &amp;lt;i&amp;gt; It is recommended to use size which will fit typical log and only the
// &amp;lt;i&amp;gt; longer one will be fragmented.

#ifndef NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE
#define NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE 64
#endif

// &amp;lt;/e&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Optionally, change NRF_LOG_DEFERRED to 0 if you don&amp;#39;t need deferred logging (when using deferred logging you need to run NRF_LOG_FLUSH() in the main loop to get any log output).&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Use&amp;nbsp;NRF_LOG_XXX for logging purpose.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;I am able to get logging work with above changes.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining UART and MPU6050</title><link>https://devzone.nordicsemi.com/thread/252294?ContentTypeID=1</link><pubDate>Fri, 29 May 2020 03:47:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dfee33a-9f39-401d-be68-d735d37bb408</guid><dc:creator>ThienVu</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mpu_5F00_project.zip"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/mpu_5F00_project.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for replying. I&amp;#39;m uploading the zip of my project. Currently I have to comment out all the printf() because for some reason they interfere with the GPIO.&lt;/p&gt;
&lt;p&gt;This project is based on the peripheral template project from the SDK. I just modified the main.c and add the custom source files for MPU&lt;/p&gt;
&lt;p&gt;The sdk_config.h is the one came with the example from Github here&amp;nbsp;&lt;a href="https://github.com/Martinsbl/nrf5-mpu-examples"&gt;Github Example&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please unzip it in SDKFolder/examples/peripherals.&lt;/p&gt;
&lt;p&gt;Thank you very much for helping.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining UART and MPU6050</title><link>https://devzone.nordicsemi.com/thread/252285?ContentTypeID=1</link><pubDate>Thu, 28 May 2020 20:48:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cff641be-74c1-4753-98ca-bd24dc983595</guid><dc:creator>Guojun Wang</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can take&amp;nbsp;&lt;span&gt;&lt;em&gt;sdk_config.h&lt;/em&gt; in&lt;/span&gt; example &amp;quot;&lt;em&gt;nRF5_SDK_16.0.0_98a08e2\examples\ble_peripheral\ble_app_blinky\pca10056\s140\&lt;/em&gt;&amp;quot; as reference and I am able to get uart logging after flashing both the softdevice hex and the application hex.&lt;/p&gt;
&lt;p&gt;In the sdk_config.h, you need to make sure at least&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define NRF_LOG_BACKEND_UART_ENABLED 1
#define NRF_LOG_BACKEND_RTT_ENABLED  0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regarding to the files needed, you can take a look of the above mentioned example. And please let us know if it still doesn&amp;#39;t work. And it would be nice to upload your configuration for us to reproduce as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>