数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN1015 数据表(PDF) 9 Page - STMicroelectronics

部件名 AN1015
功能描述  Software techniques for improving microcontrollers EMC performance
PDF  19 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN1015 数据表(HTML) 9 Page - STMicroelectronics

Back Button AN1015 Datasheet HTML 5Page - STMicroelectronics AN1015 Datasheet HTML 6Page - STMicroelectronics AN1015 Datasheet HTML 7Page - STMicroelectronics AN1015 Datasheet HTML 8Page - STMicroelectronics AN1015 Datasheet HTML 9Page - STMicroelectronics AN1015 Datasheet HTML 10Page - STMicroelectronics AN1015 Datasheet HTML 11Page - STMicroelectronics AN1015 Datasheet HTML 12Page - STMicroelectronics AN1015 Datasheet HTML 13Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 9 / 19 page
background image
DocID5833 Rev 2
9/19
AN1015
Preventive techniques
18
For STM8 users, the STM8 "TRAP" instruction is also very convenient (only one instruction
byte:83) for generating a software interrupt in order to recover from a jump to an unexpected
location in memory.
Another effective way for recovery to normal operation is filling memory by value of illegal
instruction opcode which fetch and execution generates reset on STM8 microcontrollers.
STM32 microcontrollers with ARM® Cortex®-M core use fault exception which trap illegal
memory accesses and illegal program behavior which may occure if the system is exposed
to EMC disturbances. The undefined instruction opcode may be used to fill the unused
memory of STM32 microcontroller to rise the Usage Fault exception where the fail safe
routine recovers from errors in case of program counter run-away.
Another option is to use System serivce call with SVC instruciton to execute fail safe routine.
2.3
Input filtering and comparison
The routine which checks several times that that the state of input pin is stable before
validating the state and continuing the program execution is a good practice to avoid
unwanted reaction on spikes caused by external noise induced in input circuit.
This is a simple means of critical input filtering for no extra cost!
2.4
Management of unused interrupt vectors
To avoid problems caused by unexpected interrupt occurrences (whatever the source) it is
recommended to manage all the possible interrupt sources by putting a valid interrupt
routine address in the corresponding vector.
In the example below the unused interrupt vectors point to a fault management routine label
filled with a simple “return from interrupt” instruction.
2.5
Removing illegal and critical bytes from your code
2.5.1
Critical Bytes
A critical byte is an instruction switching MCU in low power modes which is decoded by the
microcontroller and forces it to stop executing any further instructions.
When the PC is corrupted it often becomes desynchronized (as most of the instructions
have several bytes), and as a result it may read and decode critical bytes.
To check and minimize the occurrence of these critical bytes you can check the program
".list" file.
Very often critical bytes are generated by the compiler as label address bytes. In this case, if
you simply insert one or several NOP instructions, all the label addresses will shift and this
will change the critical byte value to another value.
2.5.2
IIlegal Bytes
Illegal bytes are defined as any byte value which is not part of the instruction set. They will
either be executed as a NOP instruction or (on some MCUs) a reset is generated if an illegal



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com