Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Bug: ADC Sequence not possible under z-stack lighting.

$
0
0

Hi,

It is imposible to do a simple ADC sequence when the RF stack is running. Well, the ADC sequence works, but Z_Stack does not anymore (device does not join network). Reproduce it by:

HalADCInit

 APCFG |= 0xC1;    // 0b 1100 0001 - activate analog input pins   
 TR0 |= 0x01;      // temp sensor connect to ch 14
 ATEST |= 0x01;

 ADCCON2 = 0x27;   // 0b 0010 0111 - internal reference (1.15V), 10-bits, sequence end ch 7
 ADCCON1 |= 0x30;   // - start by ST bit

and I'm using timer3 isr to set the ST bit every millisecond:

  // set-up timer 3 for 1ms sample timebase
  T3CTL = 0xE2;     // modulo count with psc = 128
  T3CC0 = 249;      // 1ms period
  T3CCTL0 |= 0x44;  // enable cc interrupt, compare mode
  T3IE = 1;         // enable t3 interrupts
  T3CTL |= 0x10;    // start 


Now not even using DMA or anything, in timer3 isr just do:

HAL_ISR_FUNCTION(isrTimer3, T3_VECTOR) {
  // Timer 3 compare interrupt triggers the ADC sequence every 1ms  
  HAL_ENTER_ISR();

  P1_3 = ~P1_3;
  ADCCON1 |= 0x40;
 
  HAL_EXIT_ISR();
  }

With the ADCCON1 setting, nothing works except the ADC. When leaving it out (but still using the interrupt to toggle the pin), the Z-stack works again. This bug makes application development on z-stack increasingly useless  so I hope there will be a fix soon. Thank you.


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>