I used these commands:
Code: Select all
.section .init .global main main: /* Set GPIO Pin 2 as Output */ ldr r0,=0x20200000 mov r1,#1 lsl r1,#6 str r1,[r0] infty: /* Set GPIO Pin 2 High */ mov r1,#1 lsl r1,#2 str r1,[r0,#0x1C] /* Set GPIO Pin 2 Low */ mov r1,#1 lsl r1,#2 str r1,[r0,#0x28] b infty
and replaced the kernel.img with the kernel.img from raspbian.arm-none-eabi-as test.s
arm-none-eabi-objcopy a.out -O binary kernel.img
I have a few questions now:
1. I only measured about 6MHz of toggle speed even though I think there is not much code which could be dropped to speed things up, so how am I able to get the 21 MHz I read about on this forum?
2. I would like to drive a small 4-wire SPI display (128x128 Pixel) with the integraded Hardware-SPI as a first project. Is there enough documentation for it to work or should I rather stick to bit-banging?