RE: Pre-Amp (Radio's Transmit Power) Level
Using Freescale MC13213 with BeeStack 1.04 I am able to adjust the PA level "on-the-fly" with my coord device that does NOT go to sleep.
Code:
MC1319xDrv_ReadSpi(ABEL_reg12, &abel_reg_val); abel_reg_val &= 0xFF00; abel_reg_val |= pa_lvl; // <------------- new value of PA Level MC1319xDrv_WriteSpi(ABEL_reg12, abel_reg_val);
But when I try to use the same code to adjust the PA level "on the fly" with a my end device that is going to sleep, it doesn't work... I believe what is happening is that the Phy_InitOnStartup() function (called by PWR_RunAgain() every time the device wakes up) is setting ABEL_reg12 to a hardcoded PA Level in setupValueTable[].
But even when I force ABEL_reg12 back to the variable PA Level inside Phy_InitOnStartup(), it seems to remain at the hardcoded value.
By-the-way, this is all an assumption based on SNA/Sniffer "LQI readings", since I cannot use the BDM to debug this, since I would have to turn off the sleep mode to use BDM interface.
Any ideas on how to force the PA Level (in the ABEL_reg12) on a device that goes to sleep?
Thanks,
- Ware