Posts

Showing posts with the label arm

Assembly? LD & MOV

Assembly? LD & MOV What's the difference between that instructions? By example in the ARM9 processor, it shouldn't be: ASM: mov r0, 0 C: r0 = 0; ASM: ld r0, 0 C: r0 = 0; ? I don't know why to use one or other :S @DrBeco: Why did you tag this intel-syntax (stackoverflow.com/tags/intel-syntax/info)? That makes no sense; this is an ARM question. Intel-syntax is one of two major flavours of syntax for x86, which is a separate architecture. x86's mov instruction can have a memory, register, or immediate source, and doesn't have a separate ld instruction. – Peter Cordes Jun 30 at 0:01 mov ld Hi @PeterCordes, I tagged it for clarifying the operand order, only (first DST, second SRC). But I see your point, ok. – Dr Beco Jun 30 at 0:...

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...