I have strange values on PB12..15 pins if I upload my firmware: pb12 - 3v pb13 - 0v, pb14 - 1.6v, pb15 - 0v. These pins are pulled up. So if DIP is on off state, then PB12..15 have to be in 1111 state.
I have configured port like this:
Code: Select all
/*
* Port B setup.
* Everything input with pull-up except:
* PB12 - Push pull output (SPI2 NSS), initially high state.
* PB13 - Alternate output (SPI2 SCK).
* PB14 - Normal input (SPI2 MISO).
* PB15 - Alternate output (SPI2 MOSI).
*/
#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */
#define VAL_GPIOBCRH 0x88888833 /* PB15...PB8 */
#define VAL_GPIOBODR 0xFFFFFFFFBut I have doubt about the comment lines above.
What I did wrong?
P.S. If i upload original discovery's firmware the PB12..15 have 0.1v on each pin.