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.

MSP430FR2433: Suggestion for missing functions in DriverLib rtc module

Part Number: MSP430FR2433

There exists  RTC_setModulo but no getter.  If there is a getter, you don't need to remember what you set in another variable, you can read the peripheral register.  One principle is: if there is a setter, there should be a getter.  There are other modules where I needed to supplement DriverLib with a getter function, which means dropping down into a lower abstraction layer, prone to errors, and no longer device independent.

There is no function to read the counter register.  To use the counter to time some other interrupt, you need to read the counter.

  • Lloyd,

    Thank you for sharing your concerns and I will go ahead and file a feature request for a future version of Driverlib to incorporate the functions you are asking for.

    In the meantime, you can go into the driverlib source code and add the "getter" functions yourself for your local copy of driverlib. All you have to do is declare the functions you want to make in rtc.h and write the code to implement it in rtc.c.

    You can use the same syntax as the RTC_setModulo function, except in your case you'd be reading from the 16 bit register RTCMOD and returning the value. The same concept applies if you want to make an RTC_readCounter function.

    Best regards,

    Matt
  • Yes, thanks, that is a workaround. But every time I upgrade MSPWare, I will need to patch the library again.
  • Lloyd,

    I have submitted the feature request to be considered for future Driverlib releases per your recommendations. Thank you again for the feedback.

    Best regards,

    Matt

**Attention** This is a public forum