On Sun, Sep 18, 2011 at 09:52:59PM -0700, George Nychis wrote:
> I am trying to understand the CCA code a bit, and this code seems extremely
> relevant:
> 
>    if((last_post == CCA_POST)
>        && (*MACA_CLK > last_post_time + 4))
>     {
>       GPIO->DATA_RESET.GPIO_43 = 1;
>       if(bit_is_set(*MACA_STATUS, maca_status_busy)) {
>         GPIO->DATA_SET.GPIO_06 = 1;
>         maca_busy = 1;
>         last_post = NO_POST;
>       } else {
>         GPIO->DATA_RESET.GPIO_06 = 1;
>         maca_busy = 0;
>         last_post = NO_POST;
>       }
> 
>       last_post = NO_POST;
>       last_post_time = *MACA_CLK;
>     }
> 
> So, it looks like a clock periodically drives MACA status updates.  On a 
> status
> update, a bit is checked to see if the channel is busy or not? (if(bit_is_set
> (*MACA_STATUS, maca_status_busy))).  If it is busy, the relevant variables are
> set.  

The MACA works through sequences. These can be started or stopped by
scheduling maca clocks, but they mostly stop on there own (or generate
an interrupt).

post_cca() actually sets the CCA sequence. Then the above code is runs
4 maca clocks later (determined empirically).

> 
> What's the significance of "4" here? (last_post_time+4).  Also, is the sensing
> tunable?  

The CCA sequence runs on the current channel as selected with the call
to set_channel.

Can I adjust the threshold which determines whether the channel is
> busy or not within MACA?  Making it more or less sensitive, basically?

I believe this is listed somewhere in the r0 datasheet:

    http://mc1322x.devl.org/files/MC1322xRM-r0.pdf

-Mar.

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to