PANIC: failed to take _spi_sem 100 times in a row, in AP_Compass_AK8963::_update

Okay first I presume by “can’t run the compass calibration” you mean the APM/ground control software is reporting an error or did not get enough data?

The usual next step when a sensor appears to be malfunctioning, is to run the sample program to unit test the hardware outside of APM. In this case we want to test the magnetometer inside the MPU9250. If the data is good then it should just be a software issue rather than hardware fault.

http://docs.emlid.com/Navio-dev/mpu9250-imu/

The error appears to be coming from Emlid’s Linux HAL for APM, so one of their guys is best to diagnose that with you. That chip is connected via SPI and the message suggests problems talking to the chip. I haven’t looked at the APM HAL source but a semaphore is commonly used to synchronize access, so I guess this technical message is equivalent to simply “No response from MPU9250 after 100 attempts”.

Emlid will not doubt require copies of all output and errors messages to help you further. Hopefully it’s just a driver initialization problem rather than a permanent fault. I would also do a fresh install/re-write of the SD to rule-out Linux configuration/update issues. Also you should try both the original Emlid APM build (the apm.deb) and the new “latest” DIY Drones build (see APM 3.3-rc9 beta testing - #23 by CodeChief for instructions how to download).