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.

RF430FRL152H infinite sampling mode

Other Parts Discussed in Thread: RF430FRL152H, RF430FRL152HEVM

Hi there,
I would like to use the RF430FRL152H in "Infinite Sampling" mode. Hence, I have set the bit in the interrupt control register. Unfortunately, when setting the Start bit in the firmware control register, the samples do not seem to update. I have tried to play with other settings (e.g. sample frequency, number of passes,...) without effect.

Using the "polled" mode by setting the start bit, waiting for sampling and reading the result works as expected.

So what do I have to consider when using the "Infinite Sampling" mode? I'd like to just read the sample storage periodically, without having to trigger a conversion every time...

Best regards
Benjamin

  • In infinite sampling mode, the samples are stored sequentially as they are completed.  When the end of the memory is reached, the logging location is looped to the beginning.

    In your case, if you were examining the first memory location, that would not change for a while.

    There are several registers that help with decoding where the last sample was stored.

    7.47 Logging Memory Size Register - default 504 but can be increased if no code is stored in FRAM.

    7.48 Total Number of Stores Register - each store increments this by one, resets only on start of sampling process.

    7.49 Last Logged Index Register - points to the index value  (zero based) that the next logging location is.  It is reset to zero when it reaches the end of the logging memory (defined in Logging Memory Size Register).

    These registers are defined in the RF430FRL15xH Firmware User's Guide.

    In your case, if you need the latest result using infinite sampling mode, read the address of (start of logging memory) 0xF8B0 + ((Last Logged Index Register - 1) * 2).  This will need to be converted to block number however to read over RF.

  • That would be the expected result. However, in my case the total number of stores does not increase.

    I have set the Logging Memory Size to 3 (to have all samples (ADC0-2) always at the same location). Number of stores seems to be stuck at 3, and samples do not get overwritten.
  • Couple of things.  First I haven't confirmed this on an RF430FRL152HEVM.

    If you get any failures, please try to read the status register and report the results.

    The infinite sampling will not work with Number of Passes set to 1, it must be higher, a good number would be 2.

    Second, with this change, you must make sure that the Frequency Register is properly set.  If for instance you set it for 2 seconds, and one pass through the three sensors takes 4 seconds, the device will stop sampling with an error code (in status register).

    If you do not like the available timings, you could use custom time which would give you more options.  Note that for custom time of less than 65535 there is millisecond resolution.  Anything higher will use minute resolution.

  • Thanks - Setting Number of Passes to 2 did the trick. That's something I didn't try (just 0 and 1).

    A hint in the Firmware User Manual would be nice though...