Hi,
I'm using OMAP137 with a Linux kernel in the GPP and DSP/BIOS in the C6747. (CCS 3.3.81.11, BIOS 5.33.05, CGT 6.1.10)
I have tried to use the following code (below) in the C6747 to "change" the CPU-frequency in my system but it will only change the timerinterrup "lengths" once even though I call this function every second. I would like to change it more than once because my system syncronize on the received radio messages.
The function change_DSP_freq is called within a function that is called after a PRD-interrupt. The "Change_Ok"-parameter indicates that everything is ok every iteration but nothing happens.
What do I miss? Any suggestions?
#include <std.h>
#include <c64.h>
#include <hwi.h>
#include <gbl.h>
#include <log.h>
#include <clk.h>
#include <tsk.h>
#include <prd.h>
void Change_DSP_Freq(Uint32 cpuFreqInKhz)
{
Uint8 change_Ok;
Uint32 oldmask;
oldmask = HWI_disable();
GBL_setFrequency(cpuFreqInKhz * 0.9); // Decrease the frequency 10%...
CLK_stop();
change_Ok = CLK_reconfig();
CLK_start();
HWI_restore(oldmask);
LOG_printf(&Trace, "status: %d", change_Ok);
}