If you suspect that your flight controller has a bad gyro (this is usually noticed could be due to bad flight performance) most of the time we find that it is not the gyro itself that has a fault. Most commonly the issue is caused by and not limited to the following:
In betaflight go to the Sensors view (expert mode needs to be enabled), and adjust the scale to 100, With the flight controller resting in a motionless state, the graph should be smooth. If the gyro was faulty you would notice some noise on one or all of the gyros even though the FC itself as not moving.
If this graph looks ok, as shown in the image above, then the next step would be to move onto viewing the raw IMU readings,
Now when you go back to the sensors view you will notice some extra graphs under Debug 0, 1, 2.. this is the raw IMU output.
Here the graphs will look more noisy, so it is very important to make sure the flight controller is not moving at all. Even putting it on a desk and you moving your mouse, or keyboard may pick up some motion.
The main thing to check here is that a normal working gyro will have a reading that does not fluctuate +-15, if your FC is within this range then any of the bad flight performance is not caused by a faulty gyro. So please check other factors on your drone that could be causing vibrations, or PID tuning.
Dead Gyro
If you have a dead gyro the graphs will not show any motion, or one direction will be stuck on 0. If this is the case, try to move the board and see if you see any changes. If it does not move then its likely that either the gyro/IMU did not initialise properly or it has a dead axis. The graph below shows what it looks like when the z gyro is not working.
The issue of a single axis of a gyro not working may mean the IMU is faulty, or it did not initialise properly, before we can confirm the IMU/Gyro is dead you need to fully power cycle the board (ie disconnect all power/usb cable and turn it back on) and run the test again. If this does not work the last thing to check is to try to change the gyro update rate to "force" it to reinitialise on the next power up. To do this see the section below.
Change Gyro Update Rate in BetaFlight
On the betalight system configuration page, there is an option to change the gyro update rate, change this to something else (like 1Khz) and click the save button. Your FC will reboot, but in order for this to work properly you need to fully power cycle your flight controller. Once done go back to view the Gyro data again to see if you still have a problem. If not, then it was a configuration issue, and you can set it back to the previous update date and everything should work as it should.
Reporting Issues to Support
If you do have a noisy or faulty gyro, then please can you make a video showing the gyro log and the FC so that our support team can help get this replaced for you as per our return/warranty policy assuming the FC has not been involved in any crashes. Also if you just need to general advice we will also be happy to help (assuming you purchased the FC from us)