Configure SPI on STM32F4 Discovery
Configure SPI on STM32F4 Discovery Im not able to get any data out from the MOSI pin, or the CLK pin when measuring with an oscilloscope on the pins. this is my code: include include "stm32f407xx.h" void delay(){ int i; for(i = 0; i < 1000000; i++); } int main(){ // Enable RCC APB2 clock for SYSCFG (for externalinterrupt) RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; // Enable RCC APB1 clock for SPI2 RCC->APB1ENR |= (1 << 14); // GPIOA for pushbutton RCC->AHB1ENR |= (1 << 0); // GPIOB for SPI RCC->AHB1ENR |= (1 << 1); // GPIOD for LED RCC->AHB1ENR |= (1 << 3); /////// GPIO B init for MOSI, MISO och CLK pins: GPIOB->MODER |= (2 << (2*13)); //Sets pin 13 as Alternate f...
