This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

can we use break

Other Parts Discussed in Thread: TM4C123GH6PM

hello i am using tm4c123gh6pm and the problem is when i use break in while loop it goes in hard fault handler so simply  can we use break statement or not or something else to came out of loop

  • Surely you can use the break command, the hard fault will be from another problem, probably a configuration(or lack of) problem.

    It's always easier to find the problem if you show a piece of code...

  • Thanks Marc.

    Manish,

    I will add a perspective to marc's point. Let us say that you get a Hard fault (there are numerous sources), due to the fact that the clock to the peripheral module is not enabled. So you break from the hard Fault to go reconfigure the next register which is another fault, break to configure the next...and so on. The peripheral never got configured, you got your warnings (chose to break them) and the device does not work... Then forum will be pinged again.
    The Fault sources need to be handled in specific manner. That is what you should concentrate on.

    Regards,
    Amit