The reset is forcing the led to turn off as the WWDG is giving the MCU only 1 clock cycle to do anything important. The on-board led is not being toggled every 20ms. In Case 4, we see something quite interesting. We have configured and tested the Window watchdog of STM32F401RE in various scenarios. Description of STM32F4 HAL and low-layer drivers Note: In case if you need complete information about HAL libraries for STM32F4 and how to use them, please refer to the manual UM1725. only after the down counter counts down to 0x3F (decimal: 63). But the reset is triggered every 52ms, i.e. 780us before reset, which is exactly one WWDG clock cycle before. We can see that the Interrupt is generated ca. This activates the WWDG with the default configuration as displayed in the section 3 in the below image. A window appears showing WWDG configuration. On the left pane, expand- System Core and select- WWDG. Refer to the attached file for details- 'Create STM32CubeMX project'.Ģ. Create a project in STM32CubeMX from the board selector. This is an advance feature in WWDG which is not available in IWDG.ġ. We will observe on the oscilloscope that the ISR is executed before initiating a MCU reset. Case 4: We will enable the EWI interrupt and write a routine to toggle the on-board Green LED there.Case 3: We will refresh the WWDG too early and check that a reset is triggered.Case 2: Include our routine to refresh it within the window and see that no reset is initiated by the WWDG.We will monitor the reset line using Digilent- Analog Discovery (Legacy) instrument. Case 1: Activate WWDG and we will not refresh the WWDG and check that a reset is triggered, by the time down counter WWDG_CR is elapsed.In this project we will, configure and test these cases. The following image shows a snapshot form STM32CubeMX. Unlike IWDG, WWDG is clocked by the APB1 peripheral clock. IWDG offers no Interrupt Service Routine (ISR) where as WWDG does.IWDG does not offer a window for refresh.It then initiates a MCU reset, which will help to start the software all over again.įrom the functionality stand point, there are two major differences between IWGD and WWDG. In case of any abnormality from the normal sequence of program execution- software fault, the watchdog detects it. Some knowledge of STM32CubeMX, Keil MDK, GPIOs, Counters are assumed from the reader to follow along.Īs the name watchdog suggests, it is watching the application running on the MCU. petting (refreshing) too late or too early. Also we will see what will happen if you don't pet your watchdog within the window i.e. In this project we will see how to activate and periodically pet the dog, I mean refresh the watchdog. There are no ads in this search engine enabler service.STM32F401xD/E has two Watchdog timers- Independent watchdog (IWDG) and Window watchdog (WWDG). ℹ️About GitHub Wiki SEE, a search engine enabler for GitHub WikisĪs GitHub blocks most GitHub Wikis from search engines. #define I2S2_MOSI_GPIO_CLK_ENABLE() _GPIOB_CLK_ENABLE() Alternate function mapping in datasheet if you need solid confirmation. The pin usage should be updated accordingly and alternative function settings (AF5) are the same, referring to Table 9. PB13 is pin 26 and PB15 is pin 28 respectively. On STM32F401CxU6 (Jawbone, 48pin UQFN48 package) PB13 (pin 34) is used as I2S2_CK and PB15 (pin 36) is used as I2S2_SD #define I2S2_MOSI_GPIO_CLK_ENABLE() _GPIOC_CLK_ENABLE() #define I2S2_SCK_GPIO_CLK_ENABLE() _GPIOB_CLK_ENABLE() #define I2S2_CLK_ENABLE() _SPI2_CLK_ENABLE() V stands for 100pin, G for 1M flash, T for LQFP package and 6 for -40 to 85 degree temp range.Īccording to code, I2S_CK is assigned to PB10 (Pin 47) and I2S_SD is assigned to PC3 (Pin 18), respectively. The mcu model of STM32F4Discovery board is STM32F407VGT6, where: Referring to datasheet, SB13 and SB14 jump resistor on the back side of the board should be removed and SB62 and SB63 should be shorted. The default configuration of STM32F401RE Nucleo does NOT output UART2 (PA2, PA3) signal to pin header directly. The firmware is based on stm32f4cube firmware v1.5. Initial code was implemented on STM32F401RE Nucleo board, porting from official STM32F4Discovery wave recorder demo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |