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.

MSP430F5529: Execute mcu self-test (IEC60730 lib) fail on TI-RTOS

Other Parts Discussed in Thread: MSP430F5529

I use MSP430F5529LP, CCSv7 and TI-RTOS version 2.20.0.06.

when I use IEC60730 lib and call IEC60730_OSCILLATOR_TEST_testOsc() function, this function always return TEST_FAILURE.

I found the freqCounter not between FREQUENCY_COUNT_MIN and FREQUENCY_COUNT_MAX.

My execute result:

FREQUENCY_COUNT_MIN:12925

FREQUENCY_COUNT_MAX:13724

freqCounter:11733

 >>> OSCILLATOR_TEST FAILURE.

My setting:

#define MAIN_CLOCK_FREQUENCY_8MHz

#define LFXT1_FREQUENCY 32768

#define LFXT1_FREQUENCY_DIVIDER 1

#define PERCENT_FREQUENCY_DRIFT 3

But, when I run on non-RTOS project, the function(IEC60730_OSCILLATOR_TEST_testOsc() ) will return Pass.

Anyone can tell those different? And tell me how to setting can run on TI-RTOS?

Thanks.

  • Hi Zheng,

    Thanks for your detailed post. Based on your description, it sounds like the main clock (MCLK) may be configured differently in your TI-RTOS project than the non-RTOS project. I would recommend comparing the settings between the projects. The Clock Fail Test section in the MSP430-IEC60730 user’s guide mentions how FREQUENCY_COUNT_MIN and FREQUENCY_COUNT_MAX are used to check if MCLK is oscillating at the specified frequency. Timer A is also used, so check its clock source and if using an external crystal for XT1, make sure the integrated load capacitors use the same settings in both projects.

  • Hi James,

    I study  MSP430-IEC60730 user’s guide. In section 7, it say TA0 must be sourced by ACLK with a high precision clock source. Note: The test requires TA0 to be source by ACLK, and configured in Up mode. Also, TAIE will be disabled. Therefore, if the application requires TAIE to be enabled the user must set TAIE upon test completion.

    And I found MSP430F5529 TI-RTOS Kernel (SYS/BIOS) also use  Timer0_A0 to  Kernel manages.

    It a reason that IEC60730_OSCILLATOR_TEST_testOsc()  return FAIL on TI-RTOS?

  • Did you check if the source clock for ACLK is different? For example, is your non-RTOS project using the external XT1 crystal for ACLK and is your RTOS project using the internal REFO? Also, check the DCO frequency settings between the projects.

**Attention** This is a public forum