This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC1125: Switching CC112X_DEV_ADDR value at run-time.

Part Number: CC1125


Tool/software: TI-RTOS

Hello all,

We have recently introduced the "address filtering" feature in our project and we noticed the following issue.

Under certain conditions, we wish to change the value of the register at run-time and then switch back to the initial one.

It seems that the write operation is taking place since every time we read back the CC112X_DEV_ADDR register, it has the right value. 

But, it seems that CC1125 has not registered the change since it is filtering out the incoming messages with the initial value.

Are they any timing or radio state restrictions where this setting/change will not be applied?

Regards

George

  • A number of registers only take effect if set in IDLE or the chip has to go from IDLE to RX for the change to take effect.
  • Which is the case here and how can I check the state of the radio prior attempting to change the specific register?

  • The engineer that most likely have the best overview over which register that can be set on the fly and which you have to set in IDLE is on leave until the start of October which makes it a bit more difficult for me to check.

    You can always check the state of the chip by reading the MARCSTATE (details could be found in the userguide)
  • I am afraid I tried every possible combination of switching the state of radio from IDLE to RX and vice versa but it seems like the new value isn't applied.

    It seems weird since the change/switch before the one I want to re-instate, takes affect without a problem. It is only the second one that is not applied...

    Any ideas?

  • Do you have any code snippets that show how you set the address and in which state?

    If the first address you are using is not set as a static register value, how is this set compared to the second address?
  • Hello,

    The API call is as follows, the address is a macro definition in both cases:

    Comms_WriteRegister(CC112X_DEV_ADDR, RX_FILTER_ADDR_ACTIVE);
    The only difference at the second call, is that it is called within a timer callback but with the exact same API with different macro definition:
    Comms_WriteRegister(CC112X_DEV_ADDR, RX_FILTER_ADDR_DEACTIVE);
    I have tried to change it outside the timer callback but the outcome is the same. I have also confirmed the state of the radio and it is the same prior to both calls.
    And, I have tried to switch states (IDLE to RX and vice versa) during the second call but without luck as well.
    Datasheet and user guide are not mentioning anything related to the restrictions of setting a register in only certain states or after a specific "switch/transition" of states...
    We are really stuck here and any help would be much appreciated!
    Regards
    George
  • Could you confirm that you have tested to go to IDLE, write the address filtering register and after the write is done strobe SRX?
  • I am 99% this is attempted, but I will confirm again. I will come back to you on this...
    But, I have also confirmed that state prior to change the filtering address is the same in both cases hence I don't understand why this will matter.
    Can you provide a simple pseudo code below so I can confirm I am doing the write thing (showing how to set register and strobe).
    Also, do I have to verify that "write" took place and how?
  • "But, I have also confirmed that state prior to change the filtering address is the same in both cases hence I don't understand why this will matter." This is interesting. I start to suspect that this may not be related to state but something else.

    "But, it seems that CC1125 has not registered the change since it is filtering out the incoming messages with the initial value.": How do you know? I would assume that if you have changed address on the RX side you would also change it on the TX side?
  • I think so too...I am not convinced the "state" is the root cause. Regarding your second assumption, you are correct. Tx side is sending always using the same filtering address I am just flicking the Rx side so it listens for a period of time and then it is not listening... and then it listens again.
  • Ok, to see if I understand you, let's say the address on the TX side is set to 0xAB.

    Then with your first command you set the address equal to 0xAB on the RX side to listen and then you set the address to 0x12 (or something) when you don't want the RX side to receive anything. But you receive packets sent with address 0xAB even though you have set the address to 0x12 on the RX side?

    If my understanding is correct, have you tried to do this in SmartRF Studio to control that your settings etc are correct?
  • You almost got it... :-)

    - Tx is set to 0xAB and sends periodically every 5sec.
    - Rx is set to 0xAB and is listening.
    - After a certain msg received, Rx switches to 0xCD and stops listening. All good so far!
    - After 20sec, a timer expires and Rx switches back to 0xAB and should start listennig again, but it doesn't even though the register value has changed since I read it correctly.
    - Worth mentioning that all this time, Tx continues transmitting periodically using 0xAB
  • - Have you tried to send a packet with address 0xCD when the address is set to this in RX to check that you are able to receive in this state?
    - Have you read out MARCSTATE to check that you actually in RX and not in a FIFO error state?
    - If you turn off address filtering on the RX side after you have switched back to 0xAB, do you receive the packet then?
  • "- Have you tried to send a packet with address 0xCD when the address is set to this in RX to check that you are able to receive in this state?"
    -> No, but I will try and come back to you.

    "- Have you read out MARCSTATE to check that you actually in RX and not in a FIFO error state?"
    -> I have and I believe It came back as IDLE state and not RX.

    "- If you turn off address filtering on the RX side after you have switched back to 0xAB, do you receive the packet then?"
    -> By saying "turn-off" you mean set register value to "0x00" right? I have tried this, so instead of going back to "0xAB" I went back to "0x00" but it didn't work either.

    Please send me pseudo code to confirm the read of states and how to strobe/switch states in case I am doing something wrong and I will verify again the actions you asked me...

    Thanks!
  • I was thinking about setting PKT_CFG1.ADDR_CHECK_CFG = 0

    I was also thinking about checking that you actually are in RX after strobing SRX again to ensure that you haven't ended up with a FIFO error.
  • Issue has been resolved by strobing CC112X_SWOR after switching back to the original filter address:

    Comms_WriteRegister(CC112X_DEV_ADDR, RX_FILTER_ADDR_ACTIVE);

    // "Necessary" strobe to reinstate filter address.

    Comms_CommandStrobe(CC112X_SWOR);

    Thanks a lot for the support!