Go to advanced search

by rst
Mon Feb 24, 2020 8:34 pm
Forum: Bare metal, Assembly language
Topic: Understanding the CNTFRQ in Pi2 System timer
Replies: 1
Views: 53

Re: Understanding the CNTFRQ in Pi2 System timer

This value is initialized by the ARM stub here . This stub is executed after ARM reset and before the loaded kernel image gets control, if "kernel_old=1" is _not_ defined in config.txt, which is the normal case. You do not need to write this register and cannot do it, because it is read-only after t...
by rst
Mon Feb 24, 2020 8:51 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

You should be able to use a cross toolchain from here on your Ubuntu. It only needs to be downloaded and extracted (no further install). Take the AArch32 bare-metal target (arm-none-eabi). The executables are in the bin/ subdirectory after extraction, which should be added to your PATH environment v...
by rst
Sun Feb 23, 2020 9:41 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

Update : scratch that! I managed to get a build from my Ubuntu box. qemu-system-arm now launches my image. And it works! Cool. I have some interesting ideas what to do with circle. Great! Unfortunately this QEMU fork is relatively old and does not build on some platforms. But it's the only one I kn...
by rst
Sun Feb 23, 2020 4:54 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

@blippy For 32-bit operation I'm still using a slightly patched version of Andrew Baumann's QEMU fork for the RPi 2, which has USB support and provides the system timer, which is needed by Circle in 32-bit mode: https://github.com/rsta2/qemu You should add the following line before building the Circ...
by rst
Sun Feb 23, 2020 3:34 pm
Forum: Bare metal, Assembly language
Topic: Bare Metal Assembly
Replies: 2
Views: 81

Re: Bare Metal Assembly

The BCM2835 Manual said GPIO controller in VideoCore Virtual Address is 0x7E200000 and in ARM Physical Address is 0x20200000 I have been searched about this article, and I saw someone said "It's chosen by context." But what is context? What can 0x7E200000 do, and can I access it by ARM? 0x7E200000 ...
by rst
Sat Feb 22, 2020 4:54 pm
Forum: Bare metal, Assembly language
Topic: Problem booting PI3 in 64bit mode from 0x00 address
Replies: 4
Views: 166

Re: Problem booting PI3 in 64bit mode from 0x00 address

I looked for your code, I assume you mean this example? https://github.com/bztsrc/raspi3-tutorial/blob/master/14_raspbootin64/uart.c In here you seem to set the clock to a slower speed 4MHz. Is this clock only used by the UART0? That's why you can safely set it? You have to ask @bzt about this code...
by rst
Sat Feb 22, 2020 3:54 pm
Forum: Bare metal, Assembly language
Topic: Problem booting PI3 in 64bit mode from 0x00 address
Replies: 4
Views: 166

Re: Problem booting PI3 in 64bit mode from 0x00 address

My code use the Mini UART so I thought maybe the clock that feeds the Mini UART changed? Anyone know if this is true? Yes, it's true. I was facing a similar problem with Dwelch67's bootloader and it turned out, that the core clock frequency has changed. I cannot tell you the actual value, because I...
by rst
Sat Feb 22, 2020 3:44 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C slave on Raspberry Pi 4 Model B?
Replies: 8
Views: 195

Re: I2C slave on Raspberry Pi 4 Model B?

Slave I2C seems to work as before. I'll check slave SPI at some stage, perhaps that has started to work (it doesn't work on earlier Pi models). So my problem is solved. Thank you too! Yes, it's interesting, if the SPI slave can be used now. I tried to implement a driver for it, but I didn't get it ...
by rst
Sat Feb 22, 2020 4:26 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C slave on Raspberry Pi 4 Model B?
Replies: 8
Views: 195

Re: I2C slave on Raspberry Pi 4 Model B?

adun wrote:
Sat Feb 22, 2020 1:54 am
According to elinux
GPIO 8-11 is indeed for the I2C/SPI slave function on the RPi4.
GPIO 10: I2C_Slave_SDA
GPIO 11: I2C_Slave_SCL

I can confirm this working. Thank you!
by rst
Fri Feb 21, 2020 10:44 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C slave on Raspberry Pi 4 Model B?
Replies: 8
Views: 195

Re: I2C slave on Raspberry Pi 4 Model B?

Okay. Thanks.
by rst
Fri Feb 21, 2020 9:51 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C slave on Raspberry Pi 4 Model B?
Replies: 8
Views: 195

Re: I2C slave on Raspberry Pi 4 Model B?

joan wrote:
Fri Feb 21, 2020 8:57 pm
Does your driver work with the earlier Pi models?

Yes, I just tested it on a RPi 3 B+ again and it works.
by rst
Fri Feb 21, 2020 6:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C slave on Raspberry Pi 4 Model B?
Replies: 8
Views: 195

I2C slave on Raspberry Pi 4 Model B?

The BCM2711 SoC has an I2C / SPI slave device at 0xFE214000, which has been proved by comparing the register values at this address with the expected reset values from the "BCM2835 ARM Peripherals" document. Only the IFLS register slightly differs. AFAIK it has not been publicized yet, to which GPIO...
by rst
Thu Feb 20, 2020 6:17 am
Forum: Bare metal, Assembly language
Topic: Invalidation of data cache on Raspberry Pi
Replies: 14
Views: 986

Re: Invalidation of data cache on Raspberry Pi

I trust you rst you have done as much baremetal as anyone and reading that you are right. I had forgotten about CPUECTLR.SMPEN and that is actually part of my confusion which is historic when we used to kernel_old = 1 It's really obvious with the VC4 just put the cache on over the framebuffer and t...
by rst
Wed Feb 19, 2020 4:54 pm
Forum: Bare metal, Assembly language
Topic: Invalidation of data cache on Raspberry Pi
Replies: 14
Views: 986

Re: Invalidation of data cache on Raspberry Pi

So for data blocks with the MMU on and sharing set: After a core writes data to memory you need to clean the data cache to make it coherent to other core and peripherals (DMA/VC4). When reading data from memory that has been written by another core or peripheral (DMA/VC4) you need to invalidate the...
by rst
Thu Feb 06, 2020 2:52 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

Now I would like to use the 2Gbyte of my raspberry to extend my measurement data acquisition. Does someone here have extended the memory acces on raspberry pi 4 to 2GBytes or more ? There is a new release of Circle available, which supports using the (extended) high memory over 1 GB on the Raspberr...
by rst
Sun Dec 29, 2019 12:40 pm
Forum: Bare metal, Assembly language
Topic: [RPi3][raspbian][asm] mailboxes
Replies: 8
Views: 1006

Re: [RPi3][raspbian][asm] mailboxes

One thing to add: You are writing a virtual address from the application memory space to the mailbox register, but a physical address is required. I guess, there is no way to do a virtual-to-physical address translation from a Linux application. That's another reason why you cannot do property mailb...
by rst
Fri Dec 27, 2019 8:29 pm
Forum: Bare metal, Assembly language
Topic: [RPi3][raspbian][asm] mailboxes
Replies: 8
Views: 1006

Re: [RPi3][raspbian][asm] mailboxes

I'm not a Linux expert, but I suppose there is no chance to access the property mailbox from a Linux application program in the way, you try it, by directly accessing the mailbox hardware. There is a mailbox driver running in each Raspbian system, which reads the received data from the mailbox, befo...
by rst
Mon Dec 16, 2019 7:40 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

That said, I have two questions concerning the USB driver, which I'm currently trying to use as such. 1. What kind of max throughput I should expect on a RPi3B+ and on a RPi4 ? Someone told me this is not a high-perf driver. Can you explain me why, and what would be needed to make it so? 2. I try t...
by rst
Sat Dec 14, 2019 12:32 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

@rdpdo Thanks! High memory above 1 GByte is currently not supported in Circle and is planned for a future version. If you want to use it in spite of it, you have to consider the following: The MMU page table initializes the high memory as "device memory" (not cached) at the moment. To get full speed...
by rst
Mon Dec 09, 2019 12:02 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

@dpotop Yes, Circle does support USB 3.0 on the RPi 4, but this is not an optimized high-speed driver. Its transfer rate is not comparable with that of the Linux driver. Also USB 3.0 hubs are currently not supported.
by rst
Wed Dec 04, 2019 11:34 am
Forum: Deutsch
Topic: LCD 16x2 bare metal programming
Replies: 5
Views: 349

Re: LCD 16x2 bare metal programming

Die Circle Bare-Metal Umgebung hat einen Treiber für HD44780-gesteuerte LCD-Displays mit 4-Bit parallelem Anschluss (Pins D4-D7, EN, RS, ggf. RW): https://github.com/rsta2/circle/tree/master/addon/display Circle unterstützt u.a. auch verschiedene USB-Devices und TCP/IP-Networking über den Ethernet-C...
by rst
Fri Nov 22, 2019 7:54 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

Many thanks, it worked, CHUNKSIZE 32 @ 48kHz! the calculation of 8Voices with 6 Operators take about 47uS and so it seems that there are even some cycles left for more fun stuff! :-) Sounds good. :) I have updated the "develop" branch, so that chunk size 32 will work with the next Circle release wi...
by rst
Tue Nov 19, 2019 9:08 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

Thanks, @styro! Good to see you are making progress with your PreenFM2-Synth port. I did not test CI2SSoundBaseDevice with that small chunk sizes, but I guess, if you want to use a chunk size of 32 for small latency, you have to decrease the "TX Request Level" in the "DREQ_A" register of the PCM / I...
by rst
Fri Nov 01, 2019 8:25 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 255
Views: 73901

Re: Circle - C++ bare metal environment (with USB)

@kryptonaut Thanks for using and appreciating Circle. The problem, you have described, seems to be a strange one to me and I guess, the solution to define the CMachineInfo object in lib/sysinit.cpp static (outside of a function) does only work by luck. Unfortunately it's difficult to imagine, what h...
by rst
Fri Oct 18, 2019 8:25 am
Forum: Bare metal, Assembly language
Topic: Circle 64Bit Crashing in Constructor
Replies: 7
Views: 1648

Re: Circle 64Bit Crashing in Constructor

LdB wrote:
Fri Oct 18, 2019 3:31 am
I stand to be corrected but if my memory serves me right -mno-unaligned-access does not exist on AARCH64
You are right. Then the options you have suggested have to do it.

Go to advanced search