STM32(Keil, MCBSTM32E) GPIOA Pin15 lässt sich nicht setzen

Gast #1974959
Lesenswert?

Hallo,

ich habe ein Problem mit dem Setzen eines Pins von GPIOA auf einem 
MCBST32E. Ich benutze µV4.

Der Pin 15 lässt sich nicht setzen, die Pins von GPIOB funktionieren 
einwandfrei.
1
  /*----------Begin Init Port A----------*/
2
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;      //USART TX
3
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
4
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
5

6
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
7

8
  GPIO_Init(GPIOA, &GPIO_InitStructure);
9

10
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;  //USART RX
11
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;        
12

13
  GPIO_Init(GPIOA, &GPIO_InitStructure);
14

15
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      //LTC2440
16
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
17
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_7 | GPIO_Pin_15;  // SCK, MOSI, /CS
18

19
  GPIO_Init(GPIOA, &GPIO_InitStructure);
20

21
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;  //LTC2440 
22
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;        //MISO        
23

24
  GPIO_Init(GPIOA, &GPIO_InitStructure);
25

26
  /*----------End Init Port A----------*/

Hat da jemand eine Idee?
Angehängte Dateien:
Gast #1975016
Lesenswert?

Weil ich in der Doku auf folgendes gestoßen bin:

#define IS_SPI_DATASIZE ( DATASIZE    )

Value:
(((DATASIZE) == SPI_DataSize_16b) || \
                                   ((DATASIZE) == SPI_DataSize_8b))
Definition at line 157 of file stm32f10x_spi.h.

Referenced by SPI_DataSizeConfig(), and SPI_Init().

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren