[elektro] STM32F4 -- I/O problema -- fagyas
uprogc .
uprogc at gmail.com
Fri Oct 23 11:02:19 CEST 2015
ui:
Meg egy jelenseg:
Van egy adott porton nehany kimenet beallitva.
GPIO_InitTypeDef ctrl_analog_board_InitStruct;
ctrl_analog_board_InitStruct.GPIO_Pin = CTRL_AF_AMP | LINE_OR_P
| SW_RX_TX ;
ctrl_analog_board_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
// ctrl_analog_board_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
ctrl_analog_board_InitStruct.GPIO_OType = GPIO_OType_PP;
ctrl_analog_board_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(CTRL_ANALOG_BOARD_PORTC,
&ctrl_analog_board_InitStruct);
Ugyanezen porton nehany bement is van:
GPIO_InitStruct.GPIO_Pin = ROT_ENC_TRIGGER | ROT_ENC_DIRECTION;
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(ROT_ENC_PORT, &GPIO_InitStruct);
Ez utobbiak dual IT-k ( EXTI ) -- mukodik .
Lathato hogy a kimeneteknel kivettem a GPIO_Speed configot, ha bent hagyom
szinten valami faulttal indul a proci...
Az inputok beallitasa fut le eloszor.
Ertheto hogy nem kell 2x beallitani a GPIO_Speed-et, de mi baja vele ?
Udv.
Szabi
More information about the Elektro
mailing list