This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MPU9250 is not showing output

i am working with mpu xx example given in nordic website. it seems code is working fine i.e. compiling and dumping into nrf52 DK, But not showing any output values.

i was trying to run nrf5-mpu-simple example but not getting any output. i have using SDK11.0.0 softdevice

there is problem with mpu setup() function. after printf function is not going to next line.

int main(void)
{    
	uint32_t err_code;
	LEDS_CONFIGURE(LEDS_MASK);
	LEDS_OFF(LEDS_MASK);
	uart_config();

	printf("Rahul Patel");  

	mpu_setup();

	accel_values_t acc_values;
	uint32_t sample_number = 0;
	while(1)
	{

		// Read accelerometer sensor values
		err_code = mpu_read_accel(&acc_values);
		APP_ERROR_CHECK(err_code);
		// Clear terminal and print values
		printf("\033[3;1HSample # %d\r\nX: %06d\r\nY: %06d\r\nZ: %06d", ++sample_number, acc_values.x, acc_values.y, acc_values.z);
		nrf_gpio_pin_toggle(LED_1);
		nrf_delay_ms(250);
	}
	
}

please anyone can correct me that what mistake i am doing in this.

Related