<?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>Using MPU9250 on Thingy52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105766/using-mpu9250-on-thingy52</link><description>Hello all. I got a weird error with MPU9250. 
 I have a driver for MPU6050, which works perfectly on MPU9250, and in fact, it did work with the MPU on the Thingy52 in the past after I created the mpu init function from here: 
 
 
 However, lately, I have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Nov 2023 17:23:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105766/using-mpu9250-on-thingy52" /><item><title>RE: Using MPU9250 on Thingy52</title><link>https://devzone.nordicsemi.com/thread/456528?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 17:23:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8eb682b-16d8-4691-bbd8-82d97b86f9fb</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Suggestion: always start with&amp;nbsp;high drive in TWI/I2C, SPI, UART etc and only when it works consider reducing drive strength. TWI/I2C would actually use H0D1 on both pins, SPI H0H1, Uart Tx H0H1. Note the link referred to in this post as sometimes the drive strength is unexpectedly overwritten:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/105665/thingy-91-spi-driver-for-adxl362"&gt;thingy-91-spi-driver-for-adxl362&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MPU9250 on Thingy52</title><link>https://devzone.nordicsemi.com/thread/456527?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 17:15:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fe9621c-ea53-4aae-a29b-5282d81b67be</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;I solved it by adding CONIG_MPU6050=y and CONFIG_SENSOR=y in addition to your suggestion! Thanks for your help :)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MPU9250 on Thingy52</title><link>https://devzone.nordicsemi.com/thread/456405?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 12:48:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a19b56c-d5e9-4465-851e-784f2fa80739</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you add&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;CONFIG_MPU6050_TRIGGER_NONE=y in your prj.conf file and try to build the program&amp;nbsp;again`?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;&lt;span&gt;I reverted to the initial init on my main code, with 1 i2c function as an example, and this is what I got on RTT:&amp;#39;&amp;#39; Can&amp;nbsp;you show me the main.c file of your application so I can reproduce on our Thingy:52?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MPU9250 on Thingy52</title><link>https://devzone.nordicsemi.com/thread/456225?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 16:44:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6490ef50-b094-4c1e-970f-abe2ca55626d</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;I am using bare thingy52 without any code on the main (besides hardware configuration as an i2c device and trying to write it once). I used i2c0(due to the hardware configuration) - and for your question:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thingy52.dts&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2017 Shawn Nock &amp;lt;shawn@monadnock.ca&amp;gt;
 * Copyright (c) 2017 Linaro Limited
 * Copyright (c) 2018 Aapo Vienamo
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;
#include &amp;lt;nordic/nrf52832_qfaa.dtsi&amp;gt;
#include &amp;quot;thingy52_nrf52832-pinctrl.dtsi&amp;quot;

/ {
	model = &amp;quot;Nordic Thingy52 NRF52832&amp;quot;;
	compatible = &amp;quot;nordic,thingy52-nrf52832&amp;quot;;

	chosen {
		zephyr,console = &amp;amp;uart0;
		zephyr,shell-uart = &amp;amp;uart0;
		zephyr,bt-mon-uart = &amp;amp;uart0;
		zephyr,bt-c2h-uart = &amp;amp;uart0;
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &amp;amp;led0;
		led1 = &amp;amp;led1;
		led2 = &amp;amp;led2;
		sw0 = &amp;amp;button0;
		watchdog0 = &amp;amp;wdt0;
		accel0 = &amp;amp;lis2dh12;
	};

	leds {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		/* Lightwell RGB */
		led0: led_0 {
			gpios = &amp;lt;&amp;amp;sx1509b 7 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Red LED&amp;quot;;
			//vin-supply = &amp;lt;&amp;amp;vdd_pwr&amp;gt;;
		};
		led1: led_1 {
			gpios = &amp;lt;&amp;amp;sx1509b 5 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED&amp;quot;;
			//vin-supply = &amp;lt;&amp;amp;vdd_pwr&amp;gt;;
		};
		led2: led_2 {
			gpios = &amp;lt;&amp;amp;sx1509b 6 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Blue LED&amp;quot;;
			//vin-supply = &amp;lt;&amp;amp;vdd_pwr&amp;gt;;
		};
	};

	buttons {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		button0: button_0 {
			/* gpio flags need validation */
			gpios = &amp;lt;&amp;amp;gpio0 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Button&amp;quot;;
		};
	};

	vbatt {
		compatible = &amp;quot;voltage-divider&amp;quot;;
		io-channels = &amp;lt;&amp;amp;adc 4&amp;gt;;
		output-ohms = &amp;lt;180000&amp;gt;;
		full-ohms = &amp;lt;(1500000 + 180000)&amp;gt;;
		power-gpios = &amp;lt;&amp;amp;sx1509b 4 0&amp;gt;;
	};

	vdd_pwr: vdd-pwr-ctrl {
		compatible = &amp;quot;regulator-fixed&amp;quot;;
		regulator-name = &amp;quot;vdd-pwr-ctrl&amp;quot;;
		enable-gpios = &amp;lt;&amp;amp;gpio0 30 GPIO_ACTIVE_HIGH&amp;gt;;
		regulator-boot-on;
		startup-delay-us = &amp;lt;1000&amp;gt;;
	};

	spk_pwr: spk-pwr-ctrl {
		compatible = &amp;quot;regulator-fixed-sync&amp;quot;, &amp;quot;regulator-fixed&amp;quot;;
		regulator-name = &amp;quot;spk-pwr-ctrl&amp;quot;;
		enable-gpios = &amp;lt;&amp;amp;gpio0 29 GPIO_ACTIVE_HIGH&amp;gt;;
	};

	mpu_pwr: mpu-pwr-ctrl {
		compatible = &amp;quot;regulator-fixed&amp;quot;;
		regulator-name = &amp;quot;mpu-pwr-ctrl&amp;quot;;
		enable-gpios = &amp;lt;&amp;amp;sx1509b 8 GPIO_ACTIVE_HIGH&amp;gt;;
		status = &amp;quot;disabled&amp;quot;;
	};

	mic_pwr: mic-pwr-ctrl {
		compatible = &amp;quot;regulator-fixed&amp;quot;;
		regulator-name = &amp;quot;mic-pwr-ctrl&amp;quot;;
		enable-gpios = &amp;lt;&amp;amp;sx1509b 9 GPIO_ACTIVE_HIGH&amp;gt;;
		status = &amp;quot;disabled&amp;quot;;
	};

	ccs_pwr: ccs-pwr-ctrl {
		compatible = &amp;quot;regulator-fixed&amp;quot;;
		regulator-name = &amp;quot;ccs-pwr-ctrl&amp;quot;;
		enable-gpios = &amp;lt;&amp;amp;sx1509b 10 GPIO_ACTIVE_HIGH&amp;gt;;
		status = &amp;quot;disabled&amp;quot;;
	};
};

&amp;amp;adc {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;uart0 {
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;i2c0 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	clock-frequency = &amp;lt;I2C_BITRATE_FAST&amp;gt;;

	pinctrl-0 = &amp;lt;&amp;amp;i2c0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	sx1509b: sx1509b@3e {
		compatible = &amp;quot;semtech,sx1509b&amp;quot;;
		reg = &amp;lt;0x3e&amp;gt;;
		vin-supply = &amp;lt;&amp;amp;vdd_pwr&amp;gt;;
		gpio-controller;
		#gpio-cells = &amp;lt;2&amp;gt;;
		ngpios = &amp;lt;16&amp;gt;;
		/* Active-low LEDs init high, all else init low */
		init-out-high = &amp;lt;0xe0e0&amp;gt;;
		init-out-low = &amp;lt;0x1f1f&amp;gt;;
	};

	lps22hb_press: lps22hb_press@5c {
		compatible = &amp;quot;st,lps22hb-press&amp;quot;;
		reg = &amp;lt;0x5c&amp;gt;;
		vin-supply = &amp;lt;&amp;amp;vdd_pwr&amp;gt;;
	};

	hts221: hts221@5f {
		compatible = &amp;quot;st,hts221&amp;quot;;
		reg = &amp;lt;0x5f&amp;gt;;
		vin-supply = &amp;lt;&amp;amp;vdd_pwr&amp;gt;;
		drdy-gpios = &amp;lt;&amp;amp;gpio0 24 GPIO_ACTIVE_HIGH&amp;gt;;
	};

	ccs811: ccs811@5a {
		compatible = &amp;quot;ams,ccs811&amp;quot;;
		reg = &amp;lt;0x5a&amp;gt;;
		vin-supply = &amp;lt;&amp;amp;ccs_pwr&amp;gt;;
		irq-gpios = &amp;lt;&amp;amp;gpio0 22 GPIO_ACTIVE_LOW&amp;gt;;
		reset-gpios = &amp;lt;&amp;amp;sx1509b 11 GPIO_ACTIVE_LOW&amp;gt;;
		wake-gpios = &amp;lt;&amp;amp;sx1509b 12 GPIO_ACTIVE_LOW&amp;gt;;
	};
};

&amp;amp;i2c1 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	clock-frequency = &amp;lt;I2C_BITRATE_FAST&amp;gt;;

	pinctrl-0 = &amp;lt;&amp;amp;i2c1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	lis2dh12: lis2dh12@19 {
		compatible = &amp;quot;st,lis2dh12&amp;quot;, &amp;quot;st,lis2dh&amp;quot;;
		reg = &amp;lt;0x19&amp;gt;;
		irq-gpios = &amp;lt;&amp;amp;gpio0 12 GPIO_ACTIVE_HIGH&amp;gt;;
	};
};

&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C000 0x32000&amp;gt;;
		};
		slot1_partition: partition@3e000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x0003E000 0x32000&amp;gt;;
		};
		scratch_partition: partition@70000 {
			label = &amp;quot;image-scratch&amp;quot;;
			reg = &amp;lt;0x00070000 0xa000&amp;gt;;
		};

		/*
		 * The flash starting at 0x0007a000 and ending at
		 * 0x0007ffff (sectors 122-127) is reserved for use
		 * by the application.
		 * Storage partition will be used by FCB/LittleFS/NVS
		 * if enabled.
		 */
		storage_partition: partition@7a000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x0007a000 0x00006000&amp;gt;;
		};
	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Where thingy52_pinctrl.dtsi&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2022 Nordic Semiconductor
 * SPDX-License-Identifier: Apache-2.0
 */

&amp;amp;pinctrl {
	uart0_default: uart0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 3)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 2)&amp;gt;;
		};
	};

	uart0_sleep: uart0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 3)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 2)&amp;gt;;
			low-power-enable;
		};
	};

	i2c0_default: i2c0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 0, 7)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 0, 8)&amp;gt;;
		};
	};

	i2c0_sleep: i2c0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 0, 7)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 0, 8)&amp;gt;;
			low-power-enable;
		};
	};

	i2c1_default: i2c1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 0, 14)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 0, 15)&amp;gt;;
		};
	};

	i2c1_sleep: i2c1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 0, 14)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 0, 15)&amp;gt;;
			low-power-enable;
		};
	};

};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t changed a thing and followed the hardware schematics from the user guide.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MPU9250 on Thingy52</title><link>https://devzone.nordicsemi.com/thread/456205?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 15:04:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da490cbe-08e7-4f4c-a545-433a9332bb6c</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;&lt;span&gt;i2c_nrfx_twi: Error 0x0BAE0001 occurred for message 0&amp;#39;&amp;#39; this error is an address NACK on the TWI bus.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Are you sure the address of your i2c device is correct?&lt;/p&gt;
&lt;p&gt;Have you tried scoping the SCL/SDA lines to see how they behave?&lt;/p&gt;
&lt;p&gt;Also, which application you are observing this? Can you check your &lt;strong&gt;zephyr.dts&lt;/strong&gt; from build folder that i2c pins are assigned properly? You can send this file to me.&lt;/p&gt;
&lt;p&gt;The default should look like this:&lt;/p&gt;
&lt;p&gt;sda-pin = &amp;lt; 0X7 &amp;gt;;&lt;/p&gt;
&lt;p&gt;scl-pin = &amp;lt; 0x8 &amp;gt;;&lt;/p&gt;
&lt;p&gt;If these pins are accidentally assigned to some other peripherals, you may see error. There are also some connectors which you&amp;nbsp;can use for external I2C bus on Thingy:52.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_thingy52/UG/thingy52/hw_description/hw_connectors.html?cp=10_0_6_10_1"&gt;https://infocenter.nordicsemi.com/topic/ug_thingy52/UG/thingy52/hw_description/hw_connectors.html?cp=10_0_6_10_1&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>