думаю, так запросто нельзя.
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено pin 19 мая 2004 г. 20:33
В ответ на: mVision2 real-time отправлено AlexA 19 мая 2004 г. 19:26

Кейл внутри считает циклы процессора, а не секунды.

Растянуть среднее время выполения цикла симулятором можно, если сделать AGSI DLL. Внутренний таймер симулятора заряжаем на 1 цикл, соответственно,в зависимости от скорости ПК, тормозим ход отладки.

Как это сделать, написано в Application Note 154 на сайте Кейла.


BOOL AgsiSetTimer(AGSITIMER hTimer, DWORD dwClock);
Parameter:
hTimer Timer handle
dwClock Number of machine cycles before the timer watch function is called. A
value of –1 (0xffffffff) disables the timer.
Return Value:
TRUE if successful otherwise FALSE.
Description:
This function is used to set the timer expiration time in states. When the specified number of states
are executed, the function that is associated with the timer handle (see AgsiCreateTimer) is called.
This function must set a new timer value with AgsiSetTimer, either a new value or –1 to disable the
timer. A timer does not automatically reload the last value, it must be set every time it expires or
before.
Example:
static void AdcCompleted(void) {
// Timer function implementation
}
AGSITIMER Timer;
Timer = AgsiCreateTimer(AdcCompleted);
AgsiSetTimer(Timer, 10); // set timer (with AdcCompleted handle) to 10 cycles

Могу сделать такую цацку. Действительно нужно? ..

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru