<?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>MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70255/mpu6050-sensor-for-nrf5340pdk-board</link><description>Hi, 
 I wanted to use my nrf5340pdk board with a MPU6050 sensor. 
 I am using the zephyr os and they provide an example project for this sensor. The example project provides: 
 
 main.c 
 CMakeList.txt 
 prj.conf 
 sample.yaml 
 and also a folder called</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Jun 2021 05:31:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70255/mpu6050-sensor-for-nrf5340pdk-board" /><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/315996?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2021 05:31:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6376505c-519d-4baa-8fce-b455c01cdc7e</guid><dc:creator>Satya</dc:creator><description>&lt;p&gt;Can you please share the working project files?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/289721?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 12:45:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e46ec01-6ea6-4894-9430-c514c0b29604</guid><dc:creator>zephyros_user</dc:creator><description>&lt;p&gt;okay thank you, yes I received your file!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/289644?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 08:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:009456a9-10f2-4fbf-8b6d-bb628aedb3f1</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Did the sample you received in&amp;nbsp;&lt;span&gt;#262880 work?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I did no other changes&amp;nbsp;other than&amp;nbsp;nrf5340dk_nrf5340_cpuapp.overlay I pasted in my last response.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/289488?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 15:36:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d5dd53f-6e48-4148-8044-7a81d1f144a4</guid><dc:creator>zephyros_user</dc:creator><description>&lt;p&gt;Is it possible that you provide me your sample? So that I can test, if this configuration is working for me?&lt;/p&gt;
&lt;p&gt;And does it make a difference in nrf5340pdk and nrf5340dk?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/288530?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2021 07:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64b06880-edd6-46c5-9632-f72fa8be2291</guid><dc:creator>zephyros_user</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;okay thank you. Unfortunaltelly, it is still not working... I did not do any changes to the code so far.&lt;/p&gt;
&lt;p&gt;How does your prj.conf and the sample.yaml file look like?&lt;/p&gt;
&lt;p&gt;And did you do the adjusting settings to the board to enable I2C? In the User Guide of the nrf5340pdk board it says that you need to shorten SB32 in order to permanentely enable I2C, do I need to do that?&lt;/p&gt;
&lt;p&gt;Best Regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/288391?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 13:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36380c95-7538-4702-84f8-92813d20ae56</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I had no issues building the MPU6050 sensor sample with the overlay file. I removed the nrf52 overlay file and added:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;NCS root&amp;gt;\zephyr\samples\sensor\mpu6050\nrf5340dk_nrf5340_cpuapp.overlay&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;amp;i2c1 {
	mpu6050@68 {
		compatible = &amp;quot;invensense,mpu6050&amp;quot;;
		reg = &amp;lt;0x68&amp;gt;;
		status = &amp;quot;okay&amp;quot;;
		label = &amp;quot;MPU6050&amp;quot;;
		int-gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_HIGH&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;MINGW64 /c/NordicSemi/NCS/zephyr/samples/sensor/mpu6050 ((v2.4.0-ncs1))
$ west build -b nrf5340dk_nrf5340_cpuapp
-- west build: generating a build system
Including boilerplate (Zephyr base): C:/NordicSemi/NCS/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/NordicSemi/NCS/zephyr/samples/sensor/mpu6050
-- Zephyr version: 2.4.0 (C:/NordicSemi/NCS/zephyr)
-- Found Python3: C:/Python37/python.exe (found suitable exact version &amp;quot;3.7.2&amp;quot;) found components:  Interpreter 
-- Found west (found suitable version &amp;quot;0.7.2&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: nrf5340dk_nrf5340_cpuapp
-- Cache files will be written to: C:\Users\oysa\AppData\Local/.cache/zephyr
-- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)
CMake Warning at C:/NordicSemi/NCS/zephyr/cmake/toolchain/gnuarmemb/generic.cmake:6 (message):
  GCCARMEMB_TOOLCHAIN_PATH is deprecated, please use GNUARMEMB_TOOLCHAIN_PATH
  instead
Call Stack (most recent call first):
  C:/NordicSemi/NCS/zephyr/cmake/generic_toolchain.cmake:65 (include)
  C:/NordicSemi/NCS/zephyr/cmake/app/boilerplate.cmake:589 (include)
  C:/NordicSemi/NCS/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  C:/NordicSemi/NCS/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:8 (find_package)


-- Found toolchain: gnuarmemb (C:/gnuarmemb)
-- Found BOARD.dts: C:/NordicSemi/NCS/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: C:/NordicSemi/NCS/zephyr/samples/sensor/mpu6050/nrf5340dk_nrf5340_cpuapp.overlay
-- Generated zephyr.dts: C:/NordicSemi/NCS/zephyr/samples/sensor/mpu6050/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/NordicSemi/NCS/zephyr/samples/sensor/mpu6050/build/zephyr/include/generated/devicetree_unfixed.h
Parsing C:/NordicSemi/NCS/zephyr/Kconfig
Loaded configuration &amp;#39;C:/NordicSemi/NCS/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig&amp;#39;
Merged configuration &amp;#39;C:/NordicSemi/NCS/zephyr/samples/sensor/mpu6050/prj.conf&amp;#39;
Configuration saved to &amp;#39;C:/NordicSemi/NCS/zephyr/samples/sensor/mpu6050/build/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;C:/NordicSemi/NCS/zephyr/samples/sensor/mpu6050/build/zephyr/include/generated/autoconf.h&amp;#39;
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/NordicSemi/NCS/zephyr/samples/sensor/mpu6050/build
-- west build: building application
[138/143] Linking C executable zephyr\zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       26700 B         1 MB      2.55%
            SRAM:        5824 B       448 KB      1.27%
        IDT_LIST:          72 B         2 KB      3.52%
[143/143] Linking C executable zephyr\zephyr.elf&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As I do not have the sensor here, I am not able to test this. Have you done other changes to the code?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/288305?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 07:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:876bf74c-094a-4571-a827-167a340635e7</guid><dc:creator>zephyros_user</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;thank you for your very good tips! I am using the correct pins now and the address of the MPU6050 is also correct.&lt;/p&gt;
&lt;p&gt;Unfortunatelly, it seem that I have some problems with the driver. When building the example I always get the following problem:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/error_5F00_MPU6050_5F00_sensor.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Do you know that may be the solution to this problem?&lt;/p&gt;
&lt;p&gt;If I build the example for the nrf52 board, there is no problem. So I guess the problem is related to the adjusted .overlay file...My overlay file is this at the moment:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c1 {
	mpu6050@68 {
		compatible = &amp;quot;invensense,mpu6050&amp;quot;;
		reg = &amp;lt;0x68&amp;gt;;
		status = &amp;quot;okay&amp;quot;;
		label = &amp;quot;MPU6050&amp;quot;;
		int-gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_HIGH&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/288219?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2021 15:47:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18f2bf96-5744-4d60-a0ea-9b50998df198</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;According to the bottom silk screen on my nRF5340PDK it should be P0.02 (SDA) and P0.03 (SCL), however the initial settings are set in&amp;nbsp;zephyr\boards\arm\nrf5340dk_nrf5340\nrf5340_cpuapp_common.dts. Here the I&lt;sup&gt;2&lt;/sup&gt;C is configured to:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;amp;i2c1 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	sda-pin = &amp;lt;34&amp;gt;;
	scl-pin = &amp;lt;35&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the overlay file, you must also set the correct i2c instance: &amp;amp;i2c1.&lt;br /&gt;&lt;br /&gt;Note that the address of the device is set in the overlay by:&amp;nbsp;mpu6050@68 and&amp;nbsp;reg = &amp;lt;0x68&amp;gt;, where 68 indicates address.&lt;br /&gt;&lt;br /&gt;If you have a logic analyzer I would recommend using this to verify the&amp;nbsp;&lt;span&gt;I&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span&gt;C configuration.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let me know how that works for you.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/288197?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2021 13:51:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bae4fc9-bebb-4224-9a3f-3eb1c7714d67</guid><dc:creator>zephyros_user</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;thank you for your quick response!&lt;/p&gt;
&lt;p&gt;I renamed the nrf52dk_nrf52832.overlay to&amp;nbsp; nrf5340dk_nrf5340_cpuapp.overlay but unfortunatelly it is still not working.&lt;/p&gt;
&lt;p&gt;I read different information about the connection of the sensor with the I2C pins... Here in the forum, it was said to connect SCL and SDA with P1.02 and P1.03, but in the user guide here (&lt;a href="https://infocenter.nordicsemi.com/pdf/nRF5340_PDK_User_Guide_v1.0.pdf)"&gt;https://infocenter.nordicsemi.com/pdf/nRF5340_PDK_User_Guide_v1.0.pdf)&lt;/a&gt; I can not find these pins. Can you tell me which pins are the correct ones for connection with I2C?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU6050 sensor for nrf5340pdk board?</title><link>https://devzone.nordicsemi.com/thread/288181?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2021 13:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6fa38eb-e073-4675-b7f7-3de61e1fda6b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You should be able to use this sample with your nRF5340. Make sure to connect the MPU6050 sensor to the correct I2C pins, and rename the nrf52dk_nrf52832.overlay to&amp;nbsp; &lt;strong&gt;nrf5340dk_nrf5340_cpuapp.overlay&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Also, make sure to read the nRF5340PDK User Guide to ensure correct pinout, and we also &lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial"&gt;recommend going through the nRF Connect SDK tutorial&lt;/a&gt;&amp;nbsp;if you are new to NCS and &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.1/nrf/ug_nrf5340.html"&gt;&amp;quot;Working with nRF5350&amp;quot; from our NCS documentation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>