In the function S2LPRadioSetPALeveldBm from S2LP_Radio.c this
if(lPowerdBm> 14)
{
paLevelValue = 1;
}
else {
paLevelValue = (uint8_t)((int32_t)25-2*lPowerdBm);
}
does not guard against overflow and for the values of 13, 14 resulting in paLevelValue = 1 for 12dBm, paLevelValue = 255 for 13dBm and paLevelValue = 253 for 14dBm which does not make sense, especially since the highest bit of PA_POWER[1-8] is marked as reserved.
I could not find any documentation for how those register values correlate to the output power not how the chip needs to be configured in order to achieve output power above 12dBm while the chips datasheet states that a maximum of 16dBm should be achivable.
In the function
S2LPRadioSetPALeveldBmfromS2LP_Radio.cthisdoes not guard against overflow and for the values of
13, 14resulting inpaLevelValue = 1for12dBm,paLevelValue = 255for13dBmandpaLevelValue = 253for14dBmwhich does not make sense, especially since the highest bit ofPA_POWER[1-8]is marked as reserved.I could not find any documentation for how those register values correlate to the output power not how the chip needs to be configured in order to achieve output power above
12dBmwhile the chips datasheet states that a maximum of16dBmshould be achivable.