Home

S3FN41F External Interrupt

image

Contents

1. SAMSUNG ELECTRONICS 12 x S3FN41F_Application Note_REV1 00 2 External Interrupt WSRCx field should have one among 16 external interrupts The corresponding value is included in the below table e When mapping EXIO onto WSRC7 WSRC7 4 0 of CM WCR1 lt 00000 b Write 00000 b into WSRC7 field e When mapping EXI15 onto WSRCO WSRC0 4 0 of CM WCRO lt 01111 b Write 01111 b into WSRCO filed e When mapping EXI8 onto WSRC4 WSRC4 4 0 of CM_WCR1 lt 01000 b Write 01000 b into WSRC4 field Table 4 External Interrupt Wake Up Sources and Pin Assignment SAMSUNG ELECTRONICS 13 x S3FN41F_Application Note_REV1 00 2 External Interrupt The external interrupt number EXIn doesn t have relation with the wakeup source number WSRCx WSRCO can have something among 16 external interrupts from EXIO to EX115 And the interrupt of WSRCx becomes Wix In other words the interrupt of WSRCO WSRC1 WSRC2 WSRC3 WSRC4 WSRC5 WSRC6 WSRC7 is WIO WI1 WI2 WI3 W14 W15 W16 W17 NK AS A 23 RIOD EKL LESSIG Ss Oo ae PL KIS KIK REED RIS BRODERE DALL ALE LA RIED SPODELI ROCKERS ESAS ES lt gt De ALS EI SRY EEE I NRK RRO SSS SEK LS LOS EIS Dx gt TON S III X N Ceo SAS Sse X Figure 1 Mapping between WSRCx WI
2. IOCONF FSEL MASK lt lt 2 new_port CSP IOCONF SET MHRO IOCONFO temp function lt lt 2 new port if iogroup GROUP1 if port lt 16 temp CSP IOCONF GET MLR1 IOCONFO amp IOCONF FSEL MASK lt lt 2 port CSP IOCONF SET MLR1 IOCONFO temp function lt lt 2 port new port port 16 temp CSP IOCONF GET MHR1 IOCONFO amp IOCONF_FSEL MASK lt lt 2 new port CSP_IOCONF_SET_MHR1 IOCONFO temp function lt lt 2 new port SAMSUNG ELECTRONICS 22 ex S3FN41F_Application Note_REV1 00 3 Example Example 3 EXI10 WIO and EXIO WI1 Interrupt Configuration External interrupt configuration EXI10 CSP_IOFunctionConfigure GROUP1 22 IOCONF F1 P1 22 is defined as EXI10 Function 1 source0 CM WSRCO CM WSRC EXIO CM_EDGEO CM_WENO WSRCO setting value CSP CM SET WCRO CM0 source0 WIO interrupt is configured as EXI10 interrupt CSP CM SET WICR CMO CM WIO Clear WIO interrupt status CSP CM SET WIMSCR CMO CM WIO Enable WIO interrupt CSP NVIC SET ISER NVICO 0 NVIC INT6 Enable WSIO interrupt vector for WIO interrupt External interrupt configuration EXIO CSP IOFunctionConfigure GROUPO 15 IOCONF F1 P0 15 is defined as EXIO Function 1 sourcel CM WSRC1 CM WSRC EXI10 CM EDGE1 CM WENl WSRC1 setting value CSP CM SET WCRO CMO CSP CM GET WCRO CMO sourcel WIl interrupt is configured as EXIO interrupt CSP CM SET WICR
3. F2 function e EXI8 pin configuration IOCONF MHR1 lt 11 b lt lt 6 Write 11 b into IO1_19_FSEL field to assign as F3 function Table 1 External Interrupt Pins TO Group Function Number o m e e Pin Number ioxy FSELM0 om se me ta wosrseum Pos mwmorr exm aome SAMSUNG ELECTRONICS 11 en S3FN41F_Application Note_REV1 00 2 External Interrupt 2 2 External Interrupt Mapping If you choose which external interrupt you use you should register target external interrupt to CM_WCRO or CM WCR1 Wakeup Control Register 0 or 1 You can register up to eight sources from WSRCO to WSRC7 Table 2 CM_WCRO from WSRCO to WSRC3 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16115 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Table3 CM WCR1 from WSRC4 to WSRC7 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16115 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 To enroll target external interrupt you should fill out three fields in CM WCR0 1 Wakeup Control Register Name Description External Interrupt Wake Up Source Selection Field nn Refer to the below table Edge Type Selection Bit EDGEx 0 Rising edge trigger selected for external event or interrupt 1 Falling edge trigger selected for external event or interrupt External Interrupt Wake Up Enable Disable Control Bit WENx 0 The edge trigger selected by EDGEx bit disable 1 The edge trigger selected by EDGEx bit enable NOTE x 0 1 2 3 4 5 6 or7
4. WIMSCR WI1 gt CM WMISR WI External Interrupt Trigger CM WRISR WI1 clear CM WICR WI1 CM WIMSCR WI2 gt CM_WMISR WI2 ay External Interrupt Trigger CM WRISR WI2 clear CM WICR WI2 CM WIMSCR WI3 em WMISR WI External Interrupt Trigger CM WRISR WI3 lt clear CM WICR WI3 NVIC ISER ICER CM WIMSGR WI4 gt CM WMISR WI4 NVIC_ISPR ICPR External Interrupt Trigger CM_WRISR WI4 clear CM_WICR WI4 CM_WIMSCR WI5 gt CM WMISR WI5 External Interrupt Trigger CM WRISR WI5 di CM_WICR WI5 CM_WIMSCR WI6 CM_WMISR WI6 External Interrupt Trigger CM_WRISR WI6 clear CM_WICR WI6 CM_WIMSCR WI7 gt CM WMISR WI7 External Interrupt Trigger CM WRISR WI7 lt clear CM WICR WI7 Figure3 Wix Interrupt and WSlx Vector SAMSUNG ELECTRONICS 16 ex S3FN41F_Application Note_REV1 00 2 External Interrupt 2 4 External Interrupt Handler In external interrupt handler you should clear the pending interrupt as like other interrupt handler It can be done by writing 1
5. Block Diagram of S3FN41F Evaluation Board SAMSUNG ELECTRONICS 56 I S3FN41F_Application Note_REV1 00 3 Example Each part should be controlled according to the following guide e H L Gen part Connect between WAKEUP and L in J62 e Wakeup Source part Connect between WAKEUP and EXIO in J61 Connect between WAKEUP and EXI10 in J61 e 4xLED part Connect J63 jumpers e USART2 Connect between P1 8 RX and UART in J53 Connect between P1 9 TX and UART in J54 Connect to PC comport through P3 Baud rate 19200bps ATE BER TEE arm ii Jah Ma m Coe Figure 6 Board Condition for Example SAMSUNG ELECTRONICS 21 x S3FN41F_Application Note_REV1 00 3 Example 3 2 Software This example uses EXIO and EXI10 pin EXI10 interrupt is remapped to WIO interrupt by writing EXI10 value to WSRCO EXIO interrupt is remapped to WI1 interrupt by writing EXIO value to WSRC1 Simply it can be described as like this e P1 22 gt EXI10 gt WSRCO gt WIO gt WSIO e P0 15 gt EXI0 gt WSRC1 gt WI1 gt WSIx Example 2 I O Configuration Function void CSP_IOFunctionConfigure eGROUPy iogroup U8 T port U8 T function U32 T temp U8 T new port 0 if iogroup GROUPO if port lt 16 temp CSP IOCONF GET MLRO IOCONFO amp IOCONF FSEL MASK lt lt 2 port CSP IOCONF SET MLRO IOCONFO temp function lt lt 2 port new_port port 16 temp CSP IOCONF GET MHRO IOCONFO amp
6. CMO CM WI1 Clear WIl interrupt status CSP CM SET WIMSCR CMO CSP CM GET WIMSCR CMO CM WIl Enable WIl interrupt CSP NVIC SET ISER NVICO 0 NVIC INT31 Enable WSIx interrupt vector for WIl interrupt If the external interrupt configuration is completed the external interrupt can occur by the signal to be asserted through EXIO or EXI10 pin In this example WI1 and WIO interrupts occur at the same time because event signal triggered by SW17 is connected with both EXIO and EXI10 But the WIO interrupt handler will be served first The reason is that the default priority of WIO interrupt vector WSIO IRQ6 is higher than WI1 interrupt vector WSIx IRQ31 Let s execute this example After reset the configuration is done If that is completed you can see the message to be displayed until a At this time four LEDs turn on If there is no SW17 s push there will be no change any more Because the microcontroller is waiting for the external interrupt trigger signal Let s push the switch button of SW17 You can see the result to be done by the external interrupt handler That is b and c These are sent while microcontroller serves each interrupt handler operation If you see all message as like the below this example execution is finished To notify the end all LEDs will blink S3FN41F Gortex M Flash 256KB SRAM 32KB External Interrupt Example Evaluation Board Condition for This Example Connect J63 jumpers for 4xLED Con
7. S3FN41F External Interrupt Revision 1 00 August 2012 Application Note SAMSUNG ELECTRONICS RESERVES THE RIGHT TO CHANGE PRODUCTS INFORMATION AND SPECIFICATIONS WITHOUT NOTICE Products and specifications discussed herein are for reference purposes only All Informa er tion discussed herein is provided on an AS IS basis without warranties of any kind This document and all information discussed herein remain the sole and exclusive property of Samsung Electronics No license of any patent copyright mask work trademark or any other intellectual property right is granted by one party to the other party under this document by implication estoppel or otherwise Samsung products are not Intended for use In life support critical care medical safety equipment or similar applications where product fallure could result in loss of life or personal or physical harm or any military or defense application or any governmental procurement to which special terms or provisions may apply For updates or additional information about Samsung products contact your nearest Samsung office All brand names trademarks and registered trademarks belong to their respective owners 2012 Samsung Electronics Co Ltd All rights reserved SAMSUNG ELECTRONICS I Important Notice Samsung Electronics Co Ltd Samsung reserves the right to make changes to the information in this publication at any time without prior notic
8. Support falling rising edge e Interrupt enable disable control The external interrupt can be used to execute any specific operation or wakeup from low power mode when the external event is detected The signal to trigger external event should be asserted through EXI External Interrupt Pin Refer to chapter 26 5 External Interrupt Input Characteristics in S3FN41F user s manual for the detailed condition of external event signal 1 3 Reference You can download the related document and example code from Samsung web site http www samsung com global business semiconductor product microcontroller detail productld 6784 amp iald 804 e S3FN41F User s Manual e S3FN41F Board Manual e External Interrupt Example Software SAMSUNG ELECTRONICS 10 ex S3FN41F_Application Note_REV1 00 2 External Interrupt External Interrupt 2 1 EXI Pin Configuration As you can see a pin can be defined as one function pin among maximum 4 functions If you want to use the external interrupt input pins for external event signal should be configured as EXI function by IOCONF register before enabling each external interrupt You can set the target function external interrupt using the mode registers OCONF_MLR0 1 IOCONF_MHRO 1 e EXIO pin configuration IOCONF_MLRO lt 01 b lt lt 30 Write 01 b into IOO_15_FSEL field to assign as F1 function e EXI11 pin configuration IOCONF_MLRO lt 10 b lt lt 12 Write 10 b into IO0_6_FSEL field to assign as
9. blication are the property of their respective owners SAMSUNG ELECTRONICS lt Chip Handling Guide Precaution against Electrostatic Discharge When using semiconductor devices ensure that the environment is protected against static electricity 1 Wear antistatic clothes and use earth band 2 All objects that are in direct contact with devices must be made up of materials that do not produce static electricity 3 Ensure that the equipment and work table are earthed Use ionizer to remove electron charge Contamination Do not use semiconductor products in an environment exposed to dust or dirt adhesion Temperature Humidity Semiconductor devices are sensitive to e Environment e Temperature e Humidity High temperature or humidity deteriorates the characteristics of semiconductor devices Therefore do not store or use semiconductor devices in such conditions Mechanical Shock Do not to apply excessive mechanical shock or force on semiconductor devices Chemical Do not expose semiconductor devices to chemicals because exposure to chemicals leads to reactions that deteriorate the characteristics of the devices Light Protection In non Epoxy Molding Compound EMC package do not expose semiconductor IC to bright light Exposure to bright light causes malfunctioning of the devices However a few special products that utilize light or with security functions are exempted from this guide Radioactive Cosm
10. e All information provided is for reference purpose only Samsung assumes no responsibility for possible errors or omissions or for any consequences resulting from the use of the information contained herein This publication on its own does not convey any license either express or implied relating to any Samsung and or third party products under the intellectual property rights of Samsung and or any third parties Samsung makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Samsung assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation any consequential or incidental damages Customers are responsible for their own products and applications Typical parameters can and do vary in different applications All operating parameters including Typicals must be validated for each customer application by the customer s technical experts Samsung products are not designed intended or authorized for use in applications intended to support or sustain life or for any other application in which the failure of the Samsung product could reasonably be expected to create a situation where personal injury or death may occur Customers acknowledge and agree that they are solely responsible to meet all other legal and regulatory requirements regarding their application
11. e 3 WIx Interrupt and WSlx Vector ii Figure 4 Flow Chart for External Interrupt Figure 5 Block Diagram of S3FN41F Evaluation Board Figure 6 Board Condition for Example narran canario Figure 7 The Execution Message Through UART SAMSUNG ELECTRONICS Page Number List of Tables Table Title Page Number Number Table External Interrupt Pins ernannten dann haare daher 11 Table 2 CM_WCRO from WSRCO to WSRC3 nn 12 Table 3 CM WCR1 from WSRC4 to WSRC7 cae nano rre crac ranma 12 Table 4 External Interrupt Wake Up Sources and Pin Assignment nn 13 SAMSUNG ELECTRONICS ex List of Examples Example Title Page Number Number Example 1 External Interrupt Handler i 17 Example 2 I O Configuration Function ii 22 Example 3 EXI10 WIO and EXIO WI1 Interrupt Configuration i 23 SAMSUNG ELECTRONICS ex S3FN41F_Application Note_REV1 00 1 Introduction Introduction 1 1 Overview This document describes about the external interrupt of S3FN41F It includes the configuration to use the external interrupt and the example 1 2 General Description S3FN41F has 16 external interrupt pins EXIO to EXI15 The maximum number of external interrupt to enable at the same time is eight e 16 external interrupt pins EXIO to EX115 e Selectable external interrupts up to eight e
12. e any and all measures both in equity and law available to it and claim full damages against any party that misappropriates Samsung s trade secrets and or confidential information BE DOCH MMAR Se RT EA Lil FE PB MR EEE HRA AY FL Fp L T EEA IVS BEN DER feti SERT EE ME OA RA A RITA CLARE ERR SENTRET TI GZR LADE TN ARE RES AIR AT AD FINSE IE HE TI BJ TRA SUR AED KAE DIER TE ENGER k Trademarks All brand names trademarks and registered trademarks belong to their respective owners e Exynos Exynos4210 FlexOneNAND and OneNAND are trademarks of Samsung Electronics e ARM Jazelle TrustZone and Thumb are registered trademarks of ARM Limited e Cortex ETM ETB Coresight ISA and Neon are trademarks of ARM Limited e Java is a trademark of Sun Microsystems Inc e SD is a registered trademark of Toshiba Corporation e MMC andeMMC are trademarks of MultiMediaCard Association e JTAG is a registered trademark of JTAG Technologies Inc e Synopsys is a registered trademark of Synopsys Inc e 12S is a trademark of Phillips Electronics e 12Cis a trademark of Phillips Semiconductor Corp e MIPI and Slimbus are registered trademarks of the Mobile Industry Processor Interface MIPI Alliance All other trademarks used in this pu
13. ic and X ray Radioactive substances cosmic ray or X ray may influence semiconductor devices These substances or rays may cause a soft error during a device operation Therefore ensure to shield the semiconductor devices under environment that may be exposed to radioactive substances cosmic ray or X ray EMS Electromagnetic Susceptibility Strong electromagnetic wave or magnetic field may affect the characteristic of semiconductor devices during the operation under insufficient PCB circuit design for Electromagnetic Susceptibility EMS SAMSUNG ELECTRONICS LT Revision History Revision No Date Description Author s 1 00 August 08 2012 Creation Younghee Jin SAMSUNG ELECTRONICS x Table of Contents TINTRODUC HON unne 10 ALD QQVEIV LGW uns emne Gaal A nilo 10 1 2 General Description ee iaia 10 13 ROION valser GA Here rea 10 2 EXTERNAL INTERRUPT uses ia 11 2 1 EX Pin Configuration pae e nn air 11 2 2 External Interrupt Mappin ronca 12 2 3 External Interrupt Enable di eee ete 15 2 4 External Interrupt Handler ila 17 2 5 External Interrupt Configuration narran corn 18 3 EXAMPLE iia 20 ST ANONA E scialli ia iii ila eee ee 20 02 SOMWANCS 5c cach E E E iaia ire ail il 22 SAMSUNG ELECTRONICS ex List of Figures Figure Title Number Figure 1 Mapping between WSRCx WIx and EXIN i Figure 2 WHO Interrupt and WSIO Vector Figur
14. into each interrupt bit of CM_WICR register Also additional operation can be added by your system application The below table is one of the simple example Example 1 External Interrupt Handler void CSP WSIOHandler void CSP CM SET WICR CMO CM WIO Clear WIO interrupt pending bit void CSP_WSIxHandler void isr flag CSP CM GET WMISR CMO if isr_flag CM_WI1 CM WI1 CSP_CM_SET if isr flag amp CM WI2 CM WI2 CSP_CM_SET if isr flag amp CM WI3 CM WI3 CSP_CM_SET if isr_flag amp CM WI4 CM WI4 CSP_CM_SET if isr flag amp CM_WI5 CM WI5 CSP CM SET if isr flag amp CM WI6 CM WI6 CSP CM SET if isr flag CM WI7 CM WI7 CSP CM SET SAMSUNG ELECTRONICS 17 ex S3FN41F_Application Note_REV1 00 2 External Interrupt 2 5 External Interrupt Configuration The below figure includes the register information to control when you want to use the external interrupt And it shows the overall flow from the configuration to pending clear Generate interrupt handler ISR CSP WSIOHandler CSP WSlIxHandler Y EXI pin configuration IOCONF_MLRO 1 IOCONF_MHRO 1 Y Configure EXI interrupt source CM_WCRO CM_WCRI v Clear status bit RISR MISR CM_WICR v Enable target interrupt a CM_WIMSCR It is possible to enable interrupt v a after enable IRQ vector b Enable IRQ Vector b NVIC_ISER Waiting fo
15. nect between WAKEUP and L in J62 Connect between WAKEUP and EXIB in J61 Connect between WAKEUP and EXI1 in J l Completed the configuration both EXI and EXI19 EXI16 gt WSRCO WIG EXIG gt WSRC1 WI1 Press SW17 to generate external interrupt ISR_WI6 ISR_WI1 Figure7 The Execution Message Through UART SAMSUNG ELECTRONICS 23 ex
16. r the external event riggered external signal Jump WSIx Handler automaticllay Check pending source Jump WSIO Handler The external event occurred CM_WMISR CM_WRISR automatically 4 Clear interrupt pending YES Clear interrupt pending CM_WICR CM_WICR Return from ISR Return from ISR Execute the next instruction continuously Figure 4 Flow Chart for External Interrupt SAMSUNG ELECTRONICS 18 ex S3FN41F_Application Note_REV1 00 2 External Interrupt You can find the detailed description about each register from S3FN41F user s manual and ARM s manual Refer to chapter 14 I O Configuration of S3FN41F user s manual IOCONF_MLRO 1 IOCONF MHRO 1 Refer to chapter 6 Clock amp Power Manager of S3FN41F user s manual CM WCR0O 1 CM WIMSCR CM WICR CM WMISR CM WRISR Refer to chapter ARMv6 M Architecture Reference Manual NVIC_ISER SAMSUNG ELECTRONICS 19 ex S3FN41F_Application Note_REV1 00 3 Example Example This section provides the external interrupt example using the S3FN41F evaluation board 3 1 Hardware This example needs POWER H L Gen LED and Wakeup Source parts basically Also if you want to watch the display through UART include USART2 part be Dia m ml pi u i 000 Il Z a e i oO f ce XL n po un co Bi un oe Od Figure 5
17. s using Samsung products notwithstanding Copyright 2012 Samsung Electronics Co Lid Samsung Electronics Co Ltd San 24 Nongseo Dong Giheung Gu Yongin City Gyeonggi Do Korea 446 711 Contact Us como jin samsung com Home Page http www samsungsemi com SAMSUNG ELECTRONICS any information provided in this publication Customer shall indemnify and hold Samsung and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages expenses and reasonable attorney fees arising out of either directly or indirectly any claim including but not limited to personal injury or death that may be associated with such unintended unauthorized and or illegal use WARNING No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electric or mechanical by photocopying recording or otherwise without the prior written consent of Samsung This publication is intended for use by designated recipients only This publication contains confidential information including trade secrets of Samsung protected by Competition Law Trade Secrets Protection Act and other related laws and therefore may not be in part or in whole directly or indirectly publicized distributed photocopied or used including in a posting on the Internet where unspecified access is possible by any unauthorized third party Samsung reserves its right to tak
18. x and EXIn SAMSUNG ELECTRONICS 14 x S3FN41F_Application Note_REV1 00 2 External Interrupt 2 3 External Interrupt Enable If the mapping between EXIn and WSCRx is completed let s think WIx as the same name of EXIn WIx is one to on correspondent with WSCRx e EXIn n 0 1 2 14 or 15 e WSCRx WIx x 0 1 2 3 4 5 6 or 7 You can enable or disable WIx interrupt EXIn interrupt using CM_WIMSCR register To use the interrupt also you should enable the interrupt vector for the corresponding interrupt source WIO interrupt has the separated vector WSIO the IRQ number is 6 Other WIx interrupts have the common shared vector WSIx the IRQ number is 31 So when you enable WIO interrupt WSIO IRQ6 should be enabled Other WIx interrupts should be enabled with WSIx IRQ31 interrupt vector together See the below figures That shows the relation between registers for the control interrupt and each interrupt vector control register e WIO Interrupt gt WSIO Interrupt Vector IRQ6 e WI11 2 3 4 5 6 7 Interrupt gt WSIx Interrupt Vector IRQ31 NVIC_ISER ICER CM_WIMSCR WIO CM WMISR WIO NVIC_ISPR ICPR External Interrupt Trigger CM_WRISR WI0 lt li CM_WICR WIO Figure 2 WIO Interrupt and WSIO Vector SAMSUNG ELECTRONICS 15 ex S3FN41F_Application Note_REV1 00 2 External Interrupt CM

Download Pdf Manuals

image

Related Search

Related Contents

Acier patinable - SZS Stahlbau Zentrum Schweiz  IP camera User Manual  Fiche technique  Akasa InterConnect S  MANUAL DE INSTRUÇÕES TÉCNICAS  

Copyright © All rights reserved.
Failed to retrieve file