Debounce

<< Click to Display Table of Contents >>

Navigation:  STM32F4 Target > Block References > On-chip Peripherals > IO >

Debounce

Previous pageReturn to chapter overviewNext page

User Interface

How this block appears in a Simulink model?

stm32f4_gpio_debounce_block

What can be configured?

stm32f4_gpio_debounce_mask

When to use this block?

This block can be use for reject glitch or non-stable input, example when reading digital input from Button/ Switch.

How does this block work?

Mode

1. Normal:

- Output state is 0 (FALSE) when input is steady at 0 for a Debounce period (or longer).

- Output state is 1 (TRUE) when input is steady at non-zero for a Debounce period (or longer).

 

2. Single Pulse:

- Output state will generate a single pulse (one time-step) when input signal change from 0-to-NonZero and steady for a Debounce period.

 

3. Toggle Latch:

- Output state will toggle when input signal change from 0-to-NonZero and steady for a Debounce period

 

Debounce period,

- Debounce period (sec) = Debounce count * Sample time (sec)

Demo

Debounce