STM8L052 enters an infinite loop __iar_unhandled_exception

Publisher:码字奇才Latest update time:2020-03-10 Source: eefocusKeywords:STM8L052 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Entering this infinite loop is actually because a certain interrupt is configured in your program. When the conditions are met, the interrupt occurs, but your program does not have a service function for this interrupt.


__iar_unhandled_exception:

    0084DA 9D NOP

    0084DB 20FD JRA __iar_unhandled_exception

Solution:


1. Find out which interrupt is configured in the program. If the interrupt is not needed, turn off its interrupt enable directly.


2. If this interrupt is what you need, implement its corresponding interrupt service function correctly. I did not implement the corresponding interrupt service function correctly, which led to this infinite loop.


3. Directly turn off the general interrupt disableInterrupts(), which can also temporarily solve this problem, but it will affect the use of the interrupt.

Keywords:STM8L052 Reference address:STM8L052 enters an infinite loop __iar_unhandled_exception

Previous article:Summary of STM8 operation LCD5110
Next article:STM8L learning while debugging

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号