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

Power-cycling reset vs JLink reset

We've developed a custom board based on the nRF51822-QFAA and an MPU-6050 IMU. It runs on a li-pol battery and uses S110.

I've encountered a strange problem when power-cycling the device (taking the battery out and putting it back it) that doesn't happen when I reset the device using Jlink for example.

Link to the code.

The problem is the following:

We initialize the MPU (set acceleration range, interrupts, etc) once at the beginning of the execution and when the initialization it's done, we set a global variable to "true" (that variable is initialized as false). The reason for that is to prevent more than one initialization.

When the device is reset using Jlink, the MPU is correctly initialized and the global variable set to 1. But when we power cycle the device, it looks like the global variable is not set back to it's default value (false) so the MPU is not initialized. That problem is solved if we reset the device using Jlink again.

The problem consistently appears every time we power-cycle the device and goes away when we reset it using Jlink.

I've found this other post and it seems to be the same problem.

Is there any difference between the Jlink reset and a power-cycle? I've been trying to figure this out for days.

Thanks!

Parents
  • I am facing the same issue as above. I have a custom made board with nRF51822 QFAA, MPU6050 and CP2104 (USB to Serial converter). If I reset the board through JLink, I'm able to receive the accelerometer and gyroscope values through serial communication. If I hard reset the device, the accelerometer and gyroscope just gives me zeros.

    I already tried the above solution and increased the initial delay to 10 seconds before MPU6050 is initialised. But even then, I get only zeros. Any help on this issue would be appreciated.

    Thanks!

Reply
  • I am facing the same issue as above. I have a custom made board with nRF51822 QFAA, MPU6050 and CP2104 (USB to Serial converter). If I reset the board through JLink, I'm able to receive the accelerometer and gyroscope values through serial communication. If I hard reset the device, the accelerometer and gyroscope just gives me zeros.

    I already tried the above solution and increased the initial delay to 10 seconds before MPU6050 is initialised. But even then, I get only zeros. Any help on this issue would be appreciated.

    Thanks!

Children
Related