cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Setting

digitalmg
Associate
Posted on November 25, 2008 at 10:24

SPI Setting

2 REPLIES 2
digitalmg
Associate
Posted on May 17, 2011 at 12:52

In the example from Keil I have this setting for SPI

/* Configure SPI1 pins: SCK, MISO and MOSI */

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;

and

SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;

SPI_InitStructure.SPI_Mode = SPI_Mode_Master;

for MISO the GPIO is output Alternate function push-pull,but the MISO is Master input Slave output,and for Master mode MISO is input,is OK to use this setting?,and why MISO is output?

gculliven
Associate II
Posted on May 17, 2011 at 12:52

Hi there my name is Gavin and I live in scotland. I am trying to write an assembly program for a random dice. I was wondering if you woud know how to initialize the ports and use the timer with the thumb assembly? I have been scouring the net and can't seem to find what I'm lookin for. Many thanks for any help, Gav