| 전자부품 데이터시트 검색엔진 |
|
AN4157 데이터시트(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4157 데이터시트(HTML) 21 Page - STMicroelectronics |
|
21 / 24 page ![]() AN4157 Peripheral firmware examples description Doc ID 023629 Rev 1 21/24 TIM2 is configured as follows: ● The Retrigerrable One Pulse mode is used, the external signal is connected to TIM2 CH2 pin (PA1), the rising edge is used as active edge, and the One Pulse signal is output on TIM2_CH1 (PA0). ● The TIM_Pulse defines the One Pulse value. The pulse value is fixed to: Retrigerrable One Pulse value = TIM_Period/TIM2 counter clock Retrigerrable One Pulse value = 65535 / 36000000 = 1.8 ms. Note: Connect the external signal to the TIM2_CH2 pin (PA01) Connect the TIM2_CH1 (PA00) pin to an oscilloscope to monitor the waveform. 3.25 USB example 3.25.1 Purpose This example provides a description of how to use the USB-FS-Device on the STM32F30x /STM32F31x devices. It is enumerated as an USB-FS-Device mouse, that uses the native PC Host USB-FS-Device HID driver. 3.25.2 Description This example shows how the board is recognized as a standard mouse and how its motion will also control the PC cursor. The LSM303DLHC MEMS accelerometer device mounted on the STM32F3DISCOVERY board is used to emulate the mouse directions. 3.26 WWDG example 3.26.1 Purpose This example shows how to periodically update the WWDG counter, and how to simulate a software fault which generates an MCU WWDG reset when the programmed time period has expired. 3.26.2 Description The WWDG timeout is set to 58.2 ms and the refresh window is set to 80 ms. The WWDG counter is refreshed each 43ms in the main program infinite loop to prevent a WWDG reset. LED4 is also toggled each 43 ms indicating that the program is running. An EXTI Line is connected to a GPIO pin and configured to generate an interrupt on the rising edge of the signal. The EXTI Line is used to simulate a software failure: once the EXTI Line event occurs by pressing the user push-button, the corresponding interrupt is served. In the ISR, a write to invalid address generates a Hardfault exception containing an infinite loop and preventing to return to main program (the WWDG counter is not refreshed). |
|
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| 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 |