git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5439 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
56a1ab369f
commit
216f0d6ace
|
@ -4,11 +4,11 @@
|
|||
|
||||
** TARGET **
|
||||
|
||||
The demo runs on an STMicroelectronics STM32F3-Discovery board.
|
||||
The demo runs on an STMicroelectronics STM32373C-EVAL board.
|
||||
|
||||
** The Demo **
|
||||
|
||||
The demo runs on an STMicroelectronics STM32373C-EVAL board.
|
||||
The application demonstrates the use of the STM32F37x PWM and ICU drivers.
|
||||
|
||||
** Board Setup **
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ static msg_t spi_thread_1(void *p) {
|
|||
chRegSetThreadName("SPI thread 1");
|
||||
while (TRUE) {
|
||||
spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */
|
||||
palSetPad(GPIOC, GPIOC_LED2); /* LED ON. */
|
||||
palClearPad(GPIOC, GPIOC_LED2); /* LED ON. */
|
||||
spiStart(&SPID2, &hs_spicfg); /* Setup transfer parameters. */
|
||||
spiSelect(&SPID2); /* Slave Select assertion. */
|
||||
spiExchange(&SPID2, 512,
|
||||
|
@ -80,7 +80,7 @@ static msg_t spi_thread_2(void *p) {
|
|||
chRegSetThreadName("SPI thread 2");
|
||||
while (TRUE) {
|
||||
spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */
|
||||
palClearPad(GPIOC, GPIOC_LED2); /* LED OFF. */
|
||||
palSetPad(GPIOC, GPIOC_LED2); /* LED OFF. */
|
||||
spiStart(&SPID2, &ls_spicfg); /* Setup transfer parameters. */
|
||||
spiSelect(&SPID2); /* Slave Select assertion. */
|
||||
spiExchange(&SPID2, 512,
|
||||
|
@ -126,15 +126,10 @@ int main(void) {
|
|||
/*
|
||||
* SPI2 I/O pins setup.
|
||||
*/
|
||||
palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) |
|
||||
PAL_STM32_OSPEED_HIGHEST); /* New SCK. */
|
||||
palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) |
|
||||
PAL_STM32_OSPEED_HIGHEST); /* New MISO. */
|
||||
palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) |
|
||||
PAL_STM32_OSPEED_HIGHEST); /* New MOSI. */
|
||||
palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL |
|
||||
PAL_STM32_OSPEED_HIGHEST); /* New CS. */
|
||||
palSetPad(GPIOB, 12);
|
||||
|
||||
/*
|
||||
* Prepare transmit pattern.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
** TARGET **
|
||||
|
||||
The demo runs on an STMicroelectronics STM32F3-Discovery board.
|
||||
The demo runs on an STMicroelectronics STM32373C-EVAL board.
|
||||
|
||||
** The Demo **
|
||||
|
||||
|
|
Loading…
Reference in New Issue