Tweak/fix P9813 code according to data sheet