Hi, I wrote some transmit code that opens ADC, samples 4 temp probes, then transmits data. I did this using the rfPacketTx and rfPacketRx drivers as baseline. After checking power, the lowest current measurement I could get was 7mA on the receiver because I could not shut off the RF front end even with RF_yield(rfHandle) command.
So, I decided to move to the rfWakeOnRadioTx and Rx example and see if I can integrate same code there. I first set up both boards with the Wake on Radio RX and TX drivers and results for power were very good. 0mA on my amp meter, it only goes to 0 mA so guessing its really in micro amp range, regardless it was excellent.
So I decided to proceed with integrating my code and finished integration, now in testing phase. The problem is I can not open the ADC. Code hangs in while loop and Error initializing ADC. I code traced it into the ADC_open command and it hangs when trying to enter a HWIdisable routine.
The ADC open code, below, is located the txTaskFunction. When I moved it out and up into the txTaskInit() function, the ADC opened up fine. I can send the modified rfWakeOnRadioTx.c if necessary, but perhaps someone already knows whats going on just by this description. Thanks.
GPIO_init();
ADC_init();
ADC_Handle adc;
ADC_Params adcparams;
ADC_Params_init(&adcparams);
adc = ADC_open(Board_ADC0, &adcparams);
if (adc == NULL) {
//Error initializing ADC channel 0
Display_printf(uartDisplayHandle, 0, 0, "Error initializing ADC0\n");
while (1);
}