• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF Proprietary Software & SimpliciTI Forum » Address recognition (problem - doesn't seem to work)
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

Address recognition (problem - doesn't seem to work)

This question is not answered
Mario12440
Posted by Mario12440
on Jun 19 2009 14:35 PM
Prodigy210 points

Hello TI-Team and community!

I'm trying to transmitt data without the TI-MAC. Broadcast works perfect - with address recognition disabled. But with address recognition enabled, nothing changes. No single frame is rejected. What am I doing wrong?

Here is my code:

The receiver ISR:

#pragma vector=RF_VECTOR
__interrupt void Radio_ISR(void) {
  if (RFIF & 0x10) {                             // Start of frame delimiter (SFD) has been detected
    RFIF &= ~0x10;                             // delete flag
    P1 ^= 0x08;                                    // invert the LED at every SFD-detection
    while (!(RFSTATUS & 0x04));    // wait until the whole frame has been received (RFSTATUS.FIFO)
    if (RFSTATUS & 0x08) {              // if data is in the FIFO
      temp = RFD;                               // read the length flied
      T1Ch0Low = RFD;                    // |
      T1Ch0High = RFD;                   // | read data
      RFST = ISFLUSHRX; // flush the FIFO (FCS)
    }
  }
  S1CON &= ~0x03; // delete general RF-flags
}

And here is the transmitter code:

#pragma vector=T1_VECTOR
__interrupt void Timer1_ISR(void) {
  T1CTL &= ~0x10;                      // delete general T1 flag
  if (T1CTL & 0x80) {                    // T1CH2 Interrupt every 100 ms
    T1CTL &= ~0x80;                    // delete flag
    ADCCON1 |= 0x40;                 // ADC Start
    while(!(ADCCON1 & 0x80)); // wait till conversion is done
    RFST = ISRFOFF;                   // turn radio into Idle [1]
    RFST = ISFLUSHTX;              // flush Tx FIFO
    RFD = 8 + 2 + 2;                      // write frame length (8 address + 2 data + 2 FCS)
    RFD = 0x00;
    RFD = 0x00;
    RFD = 0x00;
    RFD = 0x00;
    RFD = 0x00;
    RFD = 0x00;
    RFD = 0x00;
    RFD = 0x00;                   // write wrong IEEE destination address (is it MSB first?)
    RFD = ADCL;                 // write data
    RFD = ADCH;                // write data
    RFST = ISTXON;           // transmitt FIFO
    while (!(RFIF & 0x40)); // wait until Tx is done
    RFIF &= ~0x40;             // delete Tx done flag
    P1 ^= 0x08;                    // invert the LED at every transmitted frame
  }
}

If address recognition fails, RFSTATUS.FIFOP should remain low (Figure 35 in the datasheet) and the program couldn't leave the line

    while (!(RFSTATUS & 0x04));    // wait until the whole frame has been received (RFSTATUS.FIFO)

but it does! Why? Could anybody help me?

 

Thanks a lot

mario

 

CC2430 SmartRF04EB
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Mario12440
    Posted by Mario12440
    on Jun 21 2009 04:37 AM
    Prodigy210 points

    Should I include a Frame Control Field and a Data Sequence Number on my own, to get the address recognition to work? (The first byte of the address has to be the fourth within the MPDU???)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Mario12440
    Posted by Mario12440
    on Jun 23 2009 04:57 AM
    Prodigy210 points

    Hi,

    I'm building now my own IEEE802.15.4 compatible frame structure. But now every single frame is rejected even when I send broadcast messages. Here ist my frame:

    0B       length field (11 byte)
    20 20  frame control field (data frame, no frame pending, no ack, not intra-PAN, short dest. address, no source address)
    00        sequence number
    FF FF  destination PAN (broadcast)
    FF FF  destination short address (broardcast)
    78 0E  data
    14 EA  frame check sequence

    This frame is rejected even though it's a broadcast frame. What am I doing wrong? Could somebody help me?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ekawahyu
    Posted by ekawahyu
    on Mar 14 2010 13:57 PM
    Prodigy50 points

    Mario,

     

    Did you solve your porblem? Because it seems that I have the same problem too. Please let me know.

     

    Eka

    address recognition CC2430
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Mario12440
    Posted by Mario12440
    on Mar 14 2010 15:26 PM
    Prodigy210 points

    Yes, I solved it.

    The byte-order in the frame-control-field has to be little endian and the bit-order MSB first. In the 802.15.4-standard is figured the whole FCF-word in LSB-first. The right field-order for the TI-SoCs has to be:

    byte1: length (including FCF, SN, Addresses, data-length, FCS)

    byte2: FCF1 (reserved(7), PAN ID Compression(6), Ack. Request(5), Frame Pending(4), Security Enabled(3), Frame Type(0-2))

    byte3: FCF2 (Source Adressing Mode(6-7), Frame Version(4-5), Dest. Addressing Mode(2-3), reserved(0-1))

    ...followed by Sequence-Number, Addresses, Data

    My old and wrong frame:

    0B       length field (11 byte)
    20 20  frame control field (data frame, no frame pending, no ack, not intra-PAN, short dest. address, no source address)
    00        sequence number
    FF FF  destination PAN (broadcast)
    FF FF  destination short address (broardcast)
    78 0E  data
    14 EA  frame check sequence

    The corrected frame:

    0B       length field (11 byte)
    01 08  frame control field (data frame, no frame pending, no ack, not intra-PAN, short dest. address, no source address)
    00        sequence number
    FF FF  destination PAN (broadcast)
    FF FF  destination short address (broardcast)
    78 0E  data
    (14 EA  frame check sequence) not to do on your own.

     

    Hope this helps. ...if not, feel free to ask here. My system is running meanwhile.

     

    mario

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ekawahyu
    Posted by ekawahyu
    on Mar 14 2010 19:08 PM
    Prodigy50 points

    What a strange way to document this FCF! I still don't get the point why they did it in thisway, do you?

     

    Anyway, I will try it your way and let see what I can come up with. But I have one question, PANID consists of  2 bytes, so does short address. Which formatting is correct for them in the 802.15.4 frame?

     

    PANID[15...0] = PANIDH {7..0} + PANIDL [7..0]

    or

    PANID[15..0] = PANIDL [7..0] + PANIDH [7..0]

    or what?

     

     

    Eka

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Mario12440
    Posted by Mario12440
    on Mar 15 2010 10:37 AM
    Prodigy210 points

    Both are wrong. You have to leftshift the high-byte.

    int PANID = (int)PANIDH << 8 | PANIDL;

    PANID := PANIDH7, PANIDH6, PANIDH5, PANIDH4, PANIDH3, PANIDH2, PANIDH1, PANIDH0, PANIDL7, PANIDL6, PANIDL5, PANIDL4, PANIDL3, PANIDL2, PANIDL1, PANIDL0;

    When PANIDH = 0xBE and PANIDL = 0xEF the PANID = 0xBEEF.

    When you send the PANID (or all other addresses), you have to do it in little endian byte order:

    RFD = length;
    RFD = FCF1;
    RFD = FCF2;
    RFD = SN;
    RFD = Destination PANIDL;
    RFD = Destination PANIDH;
    RFD = Destination SHORTADDRL;
    RFD = Destination SHORTADDRH;
    RFD = Source PANIDL;
    RFD = Source PANIDH;
    RFD = Source IEEEADDR0;
    RFD = Source IEEEADDR1;
    RFD = Source IEEEADDR2;
    RFD = Source IEEEADDR3;
    RFD = Source IEEEADDR4;
    RFD = Source IEEEADDR5;
    RFD = Source IEEEADDR6;
    RFD = Source IEEEADDR7;
    ...
    .
    .

     

    mario

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ekawahyu
    Posted by ekawahyu
    on Mar 15 2010 13:03 PM
    Prodigy50 points

    OK, got it Mario! It seems to work fine right now. Do you use the AUTOACK feature within your radio stack?

     

    Eka

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Mario12440
    Posted by Mario12440
    on Mar 15 2010 13:33 PM
    Prodigy210 points

    Fine! :)

    Yes, I'm using it. It saves some developing and cpu time.

    mario

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ekawahyu
    Posted by ekawahyu
    on Mar 15 2010 15:07 PM
    Prodigy50 points

    I agree with you that it saves a lot of cpu cycle, but I wonder how you manage retries if somehow the destination is out of range. How many microseconds is your (safe) waiting time, considering backoffs time, collision avoidance, etc.

     

    Thanks,

     

    Eka

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use