hello all:
   Recently, I spend some time reading codes about cc2420 and meet some
questions to ask you.
   some codes in file CC2420ControlM.nc:


  async command result_t CC2420Control.OscillatorOn() {
    uint16_t i;
    uint8_t status;

    i = 0;

    // uncomment to measure the startup time from
    // high to low to high transitions
    // output "1" on the CCA pin
#ifdef CC2420_MEASURE_OSCILLATOR_STARTUP
      call HPLChipcon.write(CC2420_IOCFG1, 31);
      // output oscillator stable on CCA pin
      // error in CC2420 datasheet 1.2: SFDMUX and CCAMUX incorrectly
labelled
      TOSH_uwait(50);
#endif

    call HPLChipcon.write(CC2420_IOCFG1, 24);

    // have an event/interrupt triggered when it starts up
    call CCA.startWait(TRUE);

    // start the oscillator
    status = call HPLChipcon.cmd(CC2420_SXOSCON);   //turn-on crystal

    return SUCCESS;
  }

I want to kown : if we want to turn on crystal, one code "call
HPLChipcon.cmd(CC2420_SXOSCON)" is enough. why we use " call
HPLChipcon.write(CC2420_IOCFG1, 31)     call HPLChipcon.write(CC2420_IOCFG1,
24)      call CCA.startWait(TRUE)"  before it? what are the functions of
them? can you explain them detailedly?? thank you very much!!!
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to