필터 지우기
필터 지우기

Digital read pull up in simulink stm32 nucleo board

조회 수: 8 (최근 30일)
as sc
as sc 2021년 8월 19일
I have a STM32 nucleo board which has a button connected to 5V, GND and D15 (PD_8 --> pin 15) GPIO configured.
When the button is pressed, I want the on board green LED (PD_5 --> pin 13) to light up. When the button is not pressed the LED should be off.
I know the cabling is right since I managed to implement this in STM32CUBEIDE with written code. However, I am having problems with the implementation in simulink. When I press the button, the LED lights up. When I release the button, the LED stays on. In my CUBEIDE code I configured GPIO_PIN_8 as pull up resistor which solves this problem. How do I include pull up resistors in simulink?
I checked Configuration Parameters: simulink_model/Configuration --> Hardware Implementation --> Target hardware resources but there is no GPIO option.

답변 (0개)

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by