详细描述:
1.当前FSP信息如下;
2.CPU使用率实现方法:
{/* CPU利用率统计 */
if(++CpuCount >= pdMS_TO_TICKS(200)){//200ms周期计算
deltaIdleTime = _tx_execution_idle_time_total - IdleTime;
deltaTolTime = _tx_execution_thread_time_total + _tx_execution_isr_time_total + _tx_execution_idle_time_total - TolTime;
OsCpuUsage = (f32)((f64)deltaIdleTime/(f64)deltaTolTime);
OsCpuUsage = 100.0f * (1.0f - OsCpuUsage);
Float_to_DHR(OsCpuUsage, &APP.DHR[RW_CpuUsage]);
IdleTime = _tx_execution_idle_time_total;
TolTime = _tx_execution_thread_time_total + _tx_execution_isr_time_total + _tx_execution_idle_time_total;
CpuCount = 0;
}