Go to advanced search

by LdB
Tue Feb 20, 2018 1:04 am
Forum: Bare metal
Topic: Memory address range for ARM in RPI3?
Replies: 5
Views: 265

Re: Memory address range for ARM in RPI3?

It was recorded when the firmware changes went thru start.elf = Normal GPU code start_cd.elf = Cutdown GPU code you need to use whenever gpu_mem is set less than 32MB What disappears is GL/VG/OpenMAX code, you cant call those features anymore So if you set gpu_mem = x and x is lower than 32MB then s...
by LdB
Mon Feb 19, 2018 12:48 am
Forum: Bare metal
Topic: [SOLVED] Driving a TLC5940 chip inconsistent behaviour
Replies: 4
Views: 163

Re: Driving a TLC5940 chip inconsistent behaviour

The Pi GPIO is only 3.3V
https://www.raspberrypi.org/documentation/usage/gpio/

Trying running the TLC5940 at 3.3V from the external source it says it is valid all the way down to 3V.

So from the Pi you will need the signals plus a ground to connect up.
by LdB
Sun Feb 18, 2018 4:10 pm
Forum: Bare metal
Topic: [SOLVED] Driving a TLC5940 chip inconsistent behaviour
Replies: 4
Views: 163

Re: Driving a TLC5940 chip inconsistent behaviour

What voltage are you running the tlc5940 and from where? What I am worried about is you have to much current going thru the LEDS resulting in .... The TLC5940 provides a temperature error flag (TEF) circuit to indicate an overtemperature condition of the IC. If the junction temperature exceeds the t...
by LdB
Sun Feb 18, 2018 9:18 am
Forum: Bare metal
Topic: Get the state of the ACT LED on RPi 3
Replies: 3
Views: 224

Re: Get the state of the ACT LED on RPi 3

Try unsigned char act_led_get_state() { // Property Info buffer volatile unsigned int __attribute__((aligned(16))) property_info[8]; // Fill the message infos property_info[0] = ACT_LED_MESSAGE_SIZE; /* Not needed ... safer to use sizeof( property_info) */ property_info[1] = ACT_LED_REQUEST_CODE; pr...
by LdB
Fri Feb 16, 2018 3:19 am
Forum: Bare metal
Topic: Toggling GPIO on Rpi B+ as fast as possible
Replies: 3
Views: 225

Re: Toggling GPIO on Rpi B+ as fast as possible

The Pi GPIO has a slow AXI bus it can't get anywhere near 250Mhz which you might hope for based on the core CPU speed and GPIO datasheet. Maximum high/low clock speeds on the CPU access to the GPIO are Pi3: 65Mhz Pi2: 41Mhz Pi1: 21Mhz DMA transfers to the GPIO are significantly slower than CPU acces...
by LdB
Wed Feb 14, 2018 1:50 am
Forum: C/C++
Topic: api to firmware
Replies: 7
Views: 376

Re: api to firmware

Not sure if you can get to the GPU system mailbox while linux is running, I imagine it may be using it and may not let you memmap it There is a published interface which we use all the time baremetal https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface The structure to represent t...
by LdB
Sun Feb 11, 2018 5:21 am
Forum: Bare metal
Topic: [SOLVED] Multicore tries... work not everytime
Replies: 6
Views: 357

Re: Multicore tries... work not everytime

The core will be going there (I use almost identical code) you have something wrong with the code at the function :-) My code is (I just put a label where I want it to jump) mov r1, #1073741824 ;@ 0x40000000 ldr r2, =multicore1_start ;@ Address of Core1Setup call str r2, [r1, #156] ;@ Write // ... s...
by LdB
Sun Feb 11, 2018 4:50 am
Forum: C/C++
Topic: writing a transfer vector in C
Replies: 7
Views: 445

Re: writing a transfer vector in C

@matherp The question we are wondering is why you are trying to eliminate the loop, it is not faster or more optimal. I have the feeling you are used to working with static opcodes off something like a micro taking x amount of cycles it doesn't quite work like that on the ARM you have a cache and pr...
by LdB
Sat Feb 10, 2018 1:48 am
Forum: Bare metal
Topic: [SOLVED] Multicore tries... work not everytime
Replies: 6
Views: 357

Re: Multicore tries... works not everytime

The functionality is provided by the stub loader https://github.com/raspberrypi/tools/blob/master/armstubs/armstub7.S That is it assumes your code is at 0x8000 and has come thru the normal bootload sequence. You talked about a config file and if you are using the kernel old line and starting the cor...
by LdB
Thu Feb 08, 2018 3:03 pm
Forum: C/C++
Topic: writing a transfer vector in C
Replies: 7
Views: 445

Re: writing a transfer vector in C

You need to be careful with terms like fast and copying, and explain what you are trying to do. Technically you can just copy opcodes to a memory block and do exactly what the PDP11 did for example ghans has shown one example of assembler optimization memcpy which is nice but it's not the fastest wa...
by LdB
Thu Feb 08, 2018 7:46 am
Forum: Bare metal
Topic: FIXED: GPIO 22 and 26 parallel behaviour
Replies: 4
Views: 294

Re: GPIO 22 and 26 parallel behaviour

You aren't getting the whole GPIO set and clear thing at all ... Why are you doing this orr r1,r2 ... // NO r2 has the right bit set ... r1 is a port read it useless to you You only set the bits you want to set or clear everything else should be zero .. read the data sheet again about GPCLR page 95 ...
by LdB
Sun Feb 04, 2018 2:10 pm
Forum: Bare metal
Topic: starting to make an os for rpi
Replies: 18
Views: 1342

Re: starting to make an os for rpi

I have considered making an O/S tutorial but there are two big issues with the Pi 1.) You have to get the USB up to have a keyboard unless you want to use a uart or ps2 via some adapter board. That means a USB stack that is workable with your proposed O/S. I have even written a cut down USB stack (w...
by LdB
Wed Jan 31, 2018 1:00 am
Forum: Bare metal
Topic: Pi3 GPIO and UART questions
Replies: 6
Views: 534

Re: Pi3 GPIO and UART questions

So you connect tx, rx signals and gnd for reference
DO NOT CONNECT THE 5V or you will try to power the Pi and you dont have enough power at 500mA.
by LdB
Tue Jan 30, 2018 2:12 pm
Forum: Bare metal
Topic: Pi3 GPIO and UART questions
Replies: 6
Views: 534

Re: Pi3 GPIO and UART questions

What Joan said needs to be double exclaimed !!!!!!!!!! GPIO'S are internal numbers they often don't connect to the outside world, they are for programming reference. The PINS you are talking about are HEADER PINS nothing to do with GPIO numbering. On your JPEG it's very clear .. look down the right ...
by LdB
Mon Jan 29, 2018 12:01 pm
Forum: Bare metal
Topic: RPI3 QEMU
Replies: 28
Views: 4271

Re: RPI3 QEMU

Yeah there seems to be conflict between kernel address and firmware address and what each actual means.

I find the code very disjointed.
by LdB
Sun Jan 28, 2018 10:53 am
Forum: Bare metal
Topic: Beginner learning Bare Metal GPIO
Replies: 14
Views: 989

Re: Beginner learning Bare Metal GPIO

yes I didn't fail at that code :-)

There is the array of two registers 0..31 = GPLEV[0] ... 32 .. 53 GPLEV[1]

Code: Select all

mem = GPLEV[gpio / 32]
by LdB
Sat Jan 27, 2018 11:50 pm
Forum: Bare metal
Topic: Secure state and non secure state in Rpi3
Replies: 4
Views: 340

Re: Secure state and non secure state in Rpi3

It's not just the address space affected it's certain registers and resources. You don't need any of this at all for conventional programs it is for building secured trusted apps and O/S Start here: https://www.arm.com/products/security-on-arm/trustzone As they say SoC developers and OEMs can benefi...
by LdB
Sat Jan 27, 2018 2:23 pm
Forum: C/C++
Topic: Anyone wants to help to do a working port of xv6 to PI2/3 on armv7
Replies: 10
Views: 1132

Re: Anyone wants to help to do a working port of xv6 to PI2/3 on armv7

Downloading but first obvious thing is it is setup for 0x0 startup from linker as its designed for QEMU From makefile $(call LINK_INIT, -N -e start -Ttext 0) You need it at 0x8000 OR use config.sys and kernel_old =1 trick on a real Pi with bootloader in baremetal I will setup a proper linker file it...
by LdB
Sat Jan 27, 2018 1:16 pm
Forum: Bare metal
Topic: Development environment for bare metal
Replies: 1
Views: 324

Re: Development environment for bare metal

- I am comfortable with the editors I use and am fine without intellisense. But still, does anyone use an IDE here? I have almost identical setups and just use VisualStudio for the IDE , I can't live without intellisense :-) If you have VS2017 download the basic blinker example from the link you ca...
by LdB
Sat Jan 27, 2018 11:00 am
Forum: C/C++
Topic: Anyone wants to help to do a working port of xv6 to PI2/3 on armv7
Replies: 10
Views: 1132

Re: Anyone wants to help to do a working port of xv6 to PI2/3 on armv7

If you link a source/github site I will have a quick look :-)
by LdB
Sat Jan 27, 2018 10:56 am
Forum: Bare metal
Topic: Beginner learning Bare Metal GPIO
Replies: 14
Views: 989

Re: Beginner learning Bare Metal GPIO

Glad someone is on ball today .. code as was only worked for GPIO 0..31 ..... lets try regnum properly used this time .. which is pointer p offset array position 0 or 1 so 0..53 GPIO #define PI_IOBASE_ADDR 0x3F000000 #define SET_REGISTER_ADDR (PI_IOBASE_ADDR + 0x200000 + 0x1C) #define CLR_REGISTER_A...
by LdB
Sat Jan 27, 2018 2:26 am
Forum: Bare metal
Topic: Beginner learning Bare Metal GPIO
Replies: 14
Views: 989

Re: Beginner learning Bare Metal GPIO

#define PI_IOBASE_ADDR 0x3F000000 #define SET_REGISTER_ADDR (PI_IOBASE_ADDR + 0x200000 + 0x1C) #define CLR_REGISTER_ADDR (PI_IOBASE_ADDR + 0x200000 + 0x28) bool gpio_output (unsigned int gpio, bool on) { if (gpio < 54) // Check GPIO pin number valid { volatile unsigned int* p; // Create temp pointe...
by LdB
Fri Jan 26, 2018 5:45 pm
Forum: Bare metal
Topic: RPI3 QEMU
Replies: 28
Views: 4271

Re: RPI3 QEMU

Okay followed all that .. so it's a really bad emulator and can't allow static bios like blocks and doesn't do major registers. However walking thru the C code for QEMU C code it's shouldn't be a surprise it loads at 0x10000 #define KERNEL_LOAD_ADDR 0x00010000 The 64bit is set to right address #defi...
by LdB
Fri Jan 26, 2018 11:15 am
Forum: Bare metal
Topic: RPI3 QEMU
Replies: 28
Views: 4271

Re: RPI3 QEMU

Never tried QEMU but I can give you the issue from using our normal image files. The VC4 sets all the peripherals up reads the SD card and loads the images into position .. THAT INCLUDES THE BOOT STUBS https://github.com/raspberrypi/tools/tree/master/armstubs ARM6 aka Pi1 or equivalent => https://gi...
by LdB
Fri Jan 26, 2018 2:12 am
Forum: Bare metal
Topic: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...
Replies: 30
Views: 3696

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

As I said there are many sections of that market so you want something like a go-pro or dashboard camera like the hundreds of cheap immitation designs in China. "mipi csi-2 extremely low power reference design" would be the search I would use there will be hundreds that run back to USB3 that you cou...

Go to advanced search