spi2 on stm32f103re question
Posted: Sat Oct 17, 2015 12:44 pm
on stm32f103re, i need to use spi2 and i want ask if i must initialize the associated pins with spi2, or spi routines do all?
actually i do:
i must use the PAL_MODE_STM32_ALTERNATE_PUSHPULL declaration?
normally the driver is initialized as bidirectional?
chibios 3.0.2
thanks
actually i do:
Code: Select all
palSetPadMode(TOUCH_IRQ_PORT, TOUCH_IRQ_PIN, PAL_MODE_INPUT_PULLUP);//t-irq
palSetPadMode(TOUCH_IRQ_PORT, TOUCH_SEL, PAL_MODE_OUTPUT_PUSHPULL);//sel
palSetPadMode(TOUCH_IRQ_PORT, 13, PAL_MODE_OUTPUT_PUSHPULL);//clk
palSetPadMode(TOUCH_IRQ_PORT, 14, PAL_MODE_INPUT_PULLUP);//miso
palSetPadMode(TOUCH_IRQ_PORT, 15, PAL_MODE_OUTPUT_PUSHPULL);//mosi
......
i must use the PAL_MODE_STM32_ALTERNATE_PUSHPULL declaration?
normally the driver is initialized as bidirectional?
chibios 3.0.2
thanks