code stopps after using a function

THANK YOU!!!
the failure was that I used int section; instead of volatile int section;