ERIS CORE

◆ requestArmSetClock()

bool AppManager::requestArmSetClock ( uint32_t  requested_cpu_frequency)

provides an interface for apps to request cpu freq change note: this is only a request. the actual frequency will vary based on the allowed freq range and current cpu temp

Parameters
requested_cpu_frequency
Returns
true
false

Definition at line 603 of file AppManager.cpp.

603  {
604  //set cpu freq based on thermal performance
605  if(tempmonGetTemp() > CPU_THERMAL_THROTTLE_TEMP){
606  set_arm_clock(CPU_LOW_POWER_MODE_FREQ);//thermal guard (safer but not failsafe)
607  data->update("F_CPU_ACTUAL",(int32_t)F_CPU_ACTUAL);
608  return false;
609  } else {
610  //silently cap the requested freq
611  if(requested_cpu_frequency > CPU_BOOST_MAX_FREQ) requested_cpu_frequency = CPU_BOOST_MAX_FREQ;
612  set_arm_clock(requested_cpu_frequency);
613  data->update("F_CPU_ACTUAL",(int32_t)F_CPU_ACTUAL);
614  return true;
615  }
616 }
uint32_t set_arm_clock(uint32_t frequency)
SvcDataDictionary * data
Definition: AppManager.h:63
bool update(const char *key, int32_t val, uint32_t *owner)
update the value of an owned record creates a new record if one does not exist and initializes its ...

References data, set_arm_clock(), and SvcDataDictionary::update().

Referenced by SvcSerialCommandInterface::sendLZ4Message(), setClockSpeedCallback(), and update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: