реклама на сайте
подробности

 
 
 
Reply to this topicStart new topic
> AVR Studio 4.13 SP1 557, Simulation bug no interrupt called
Alex_Elov
сообщение Nov 9 2007, 00:00
Сообщение #1





Группа: Новичок
Сообщений: 6
Регистрация: 8-10-07
Пользователь №: 31 179



Привет всем!

Вообщем багу нашел в симуляторе AVR Studio. Написал на Atmel. Ответили. Вот эту инфу и привожу может кому поможет, сам день потерял..

> When PWM channel is enabled the overflow interrupt is not called in simulator
> by some reason. Due to this loop runs endless as exit variable is not
> changing in interrupt code.
> (pulses_sent is volatile).
>
> SIGNAL(SIG_OVERFLOW2)
> {
> if(pulse_count == 0)
> {
> pulse_count = 5
> TCCR2 = TCCR2 & (~0x07); /* stop PWM */
>
> pulses_sent = TRUE;
> }
> else
> {
> TCNT2 = 130;
> pulse_count--;
> }
> }
>
>
>
> .
> .
> pulses_sent = FALSE;
>
> /* PWM Output.
> TCCR2 = _BV(WGM20)
> | _BV(CS20)
> | _BV(COM21);
> OCR2 = 50;
>
> TIMSK = _BV(TOIE2);
> sei();
>
>
> /* wait for the pulse */
> while(pulses_sent == FALSE)
> {
> }
>
> so it runs here forever in simulator, there seem there is no flag when timer
> counts to 0 as datasheet says.
>
> Alex


----------------------------------------------------------
Message added by Stian Oroe Moen, 02.11.2007 10:17
Dear Mr ...

Thank you for your report. Bug reports are highly appreciated. I have tested and verified the odd behaviour and reported it. We are now working on designing a Simulator II and hopefully this bug will be fixed in this version before it is released. I don't have any release date for ATmega16 support in sim II so in the mean time I suggest you try on chip debugging which will give a more reliable result.


Best Regards
Stian Oroe Moen
Atmel AVR Technical Support

--------------------------------
AVR support and FAQ: http://support.atmel.no/
Atmel AVR page: http://www.atmel.com/products/avr/
Info and software: http://www.avrfreaks.net
Discussion forum: http://www.avrfreaks.net/phorum/
Distributors: http://www.atmel.com/dyn/general/contact.asp
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 19th July 2025 - 19:21
Рейтинг@Mail.ru


Страница сгенерированна за 0.01337 секунд с 7
ELECTRONIX ©2004-2016