Hi, guys,
I didn`t know where can I post this question, but i think this is the most relevant forum for it. If anyone will suggest better place, it would be great.
I am using µC/OS-III V3.02.0, MSP-EXP430F5438, IAR for MSP430 5.52.1
I want to configure timer interrupts supplied from MCLK 23 MHz. I downloaded example from http://micrium.com/downloadcenter/download-results/?searchterm=hm-texas-instruments&supported=true
Now that`s, what I have changed in the example for my proposes:
************************************************************************************************
bsp.c file:
slightly changed the TMR_TickInit function.
- Init_FLL_Settle(23000, 726); // MCLK_FREQ / 1000, MCLK_FREQ / 32768);
- WDTCTL = WDT_MDLY_0_064; // Watchdog clock source /(2^6)
************************************************************************************************
os_cfg_app.h file:
/* TICKS */
#define OS_CFG_TICK_RATE_HZ 10u // Tick rate in Hertz (10 to 1000 Hz)
#define OS_CFG_TICK_TASK_PRIO 10u // Priority
/* TIMERS */
#define OS_CFG_TMR_TASK_PRIO 2u // Priority of 'Timer Task'
#define OS_CFG_TMR_TASK_RATE_HZ 10u // Rate for timers (10 Hz Typ.)
************************************************************************************************
created timer in the app.c file
insigned short period_of_created_timer = 100;
OSTmrCreate ((OS_TMR *) &TimerFxnTMR, //pointer to timer
(CPU_CHAR *) "TimerFxn", //name of timer, ASCII
(OS_TICK ) 0u, //initial delay
(OS_TICK ) period_of_created_timer, //period
(OS_OPT ) OS_OPT_TMR_PERIODIC, // options
(OS_TMR_CALLBACK_PTR ) TimerFxn, //Fnct to call at 0
(void *) 0, // Arg. to callback
(OS_ERR *) &err);
************************************************************************************************
So now, if I understood the micrium datasheet properly, i am expecting following frequency of my interrupt:
f = (MCLK_FREQ / (2^6)) * (OS_CFG_TICK_RATE_HZ / OS_CFG_TMR_TASK_RATE_HZ) * period_of_created_timer
But the problem is, I don`t get an interrupt at all. And when I am changing watchdog clock source divider to (2^31) the program does work fine, and I am getting the interrupts with the frequency I am expecting.
Can anyone give me some advice, or suggest some source of information? The Micrium data sheet doesn`t describe such behavior. After I used google I found only some Russian forums (thanks god i can understand them), they had similar problem as I, but didn`t have a solution.
Sorry, for my English, I am trying to improve my skills.