I was able to get the char_echo program running on the BF706 even though it says it for the 707.
I have ported this code to a new project but everytime it runs it says the call below failes:
if(adi_pwr_Init(0, CLKIN) != ADI_PWR_SUCCESS)
REPORT_ERROR("Failed to initialize power service \n");
Which calls the adi_pwr_Init from the adi_pwr_v2.c file.
Here is that code and it always returns "ADI_PWR_DEVICE_IN_USE"
uint32_t const nDeviceNum,
uint32_t const clkin)
/* Get pointer to the device information */
ADI_PWR_DEVICE *pDevice = &gPWRDevice[nDeviceNum];
/* Check if the given device number is within the range of number
* devices present in the processor
if(nDeviceNum > ADI_PWR_NUM_INSTANCES)
#endif /* ADI_DEBUG */
/* Check if the device instance is in use */
if(pDevice->bInitialized != false)
pDevice->bInitialized = true;
pDevice->pDevData->clkin = clkin;
Is there something I'm missing here? The documentation is vague so there isn't much to go off of. Remember i'm running a BF706 with the sample char echo code from the BF707.
One thing to note is that the &gPWRDevice variable always seems to be in scope and is set before this method is called making me think its global and already in memory. But what is setting the bInitialized to true?