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.

Keil smartrf04mon V2.0.1 some radio registers will not be updated during debugging

Hello together,

I use smartrf04mon and CC Debugger for CC1110 development with KEIL Compiler. During debugging session I recognized, that some radio registers will not be updated and can't be written with the Compiler.

I.e. MARCSTATE and RFD and RFST

Config regs in xdata and SFRs I can write.

What's the mistake ?

Thank you very much for an information.

Kind regards

Kai

  • MARCSTATE is read only.

    RFD is protected. If the debugger reads the value of RFD, it will consume a byte in the RF FIFO, thus preventing your application to run as expected.

    RFST can be written, but you will not necessarily read back the value you write. Writing to RFST will send a command to the radio.

  • Thank you for the answer.

    That's all right, but the values never changed.

    MARCSTATE shows every time 0x03 independet of the real radio status. I would expect, when the radio is in idle the register shows 0x01 same behavior with RFST.

    If the programm stopps after a RFST write command I would expect to see the contents of the registers, but the Keil debbuger only shows 0x00 for the RFST register.

    That a read comand of RFD not worked I understand after you explaination. Thanks.

    It would be easier to see the real values of MARCSTATE and RFST register.

    My workaround is to write the values into local variables and watch it.

    Maybe there is a possibility to get the info direkt into the compiler debbuging ?

    Kind regrads Kai

     

  • Hi Kai,

    Unfortunately, I don't have the Keil IDE installed on my PC, so it's a bit difficult to test it here. Nevertheless, a value of 0x03 in MARCSTATE is indeed strange. Can you try to read the same register value by reading directly from XDATA in the memory view? MARCSTATE is located at address 0xDF3B in the XDATA memory space.

    The RFST value will be 0 once the command is executed. The radio is "alive" even though the CPU core is stopped.

  • Hi, find attached the screenshot of this phenomena.

    XDATA window shows sometimes the right value sometimes not, I'm not sure if there is a contninous refresh ?

    The register on the left side normally will be refreshed after a value change. The variable DB_MSTATE shows every time the expected value of MARCSTATE.

    It tooks a long time that I recognized, the radio works well, only the showed register value is wrong.

    Hope you will find the bug ?