From 55ba9680d6f409c2a307904c64632934ba97e899 Mon Sep 17 00:00:00 2001 From: batt Date: Wed, 23 Sep 2009 21:21:24 +0000 Subject: [PATCH] Fix SPI1 activation bug. Now SPI1 on at91sam7x is fully functional. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2971 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/ser_at91.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bertos/cpu/arm/drv/ser_at91.c b/bertos/cpu/arm/drv/ser_at91.c index dfc429d3..aacb99b6 100644 --- a/bertos/cpu/arm/drv/ser_at91.c +++ b/bertos/cpu/arm/drv/ser_at91.c @@ -530,10 +530,13 @@ static void spi1_init(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(struc /* Disable PIO on SPI pins */ PIOA_PDR = BV(SPI1_SPCK) | BV(SPI1_MOSI) | BV(SPI1_MISO); + /* SPI1 pins are on B peripheral function! */ + PIOA_BSR = BV(SPI1_SPCK) | BV(SPI1_MOSI) | BV(SPI1_MISO); + /* Reset device */ SPI1_CR = BV(SPI_SWRST); -/* + /* * Set SPI to master mode, fixed peripheral select, chip select directly connected to a peripheral device, * SPI clock set to MCK, mode fault detection disabled, loopback disable, NPCS0 active, Delay between CS = 0 */ -- 2.25.1