Page 1 of 1

Simulator hangs on 'wait until..'

Posted: Wed Mar 27, 2013 6:50 pm
by pito
Hi, when debugging under iar with simulator, it is hanging everywhere where we wait on some flags be ready ie.(VL and F4 Disco demo) after starting (or reseting) the debugger it hangs in hal_lld.c (on every 'while..') and it never enters into the line with 'int main(void)'. (a memory setup issue ??)

Code: Select all

 while (!(RCC->CR & RCC_CR_HSIRDY))
    ;                                       /* Wait until HSI is stable.    */


Is that a feature of the simulator or a proper simulator setup/config is needed?
Thanks.

Re: Simulator hangs on 'wait until..'

Posted: Wed Mar 27, 2013 7:14 pm
by Giovanni
Hi,

It is because the simulator only simulates the core not the RCC peripheral (nor any other peripheral) so it never exits that loop because there is no peripheral to set that bit.

You may disable the initialization phase if you really need a simulator.

Giovanni

Re: Simulator hangs on 'wait until..'

Posted: Wed Mar 27, 2013 8:04 pm
by pito
..we need better simulators :)
Thanks!