Go to advanced search

by rst
Sat Oct 13, 2018 10:30 am
Forum: Bare metal, Assembly language
Topic: FT5406 Touch coordinate corruption
Replies: 25
Views: 5211

Re: FT5406 Touch coordinate corruption

Circle is using the original algorithm for detecting touch screen events from the Linux driver. There has been an update to the Linux driver later, which fixes a spurious event issue from the touch screen. This fix has not been applied to the Circle driver yet. I will check this soon. Applying thos...
by rst
Fri Oct 12, 2018 5:00 pm
Forum: Bare metal, Assembly language
Topic: FT5406 Touch coordinate corruption
Replies: 25
Views: 5211

Re: FT5406 Touch coordinate corruption

Circle is using the original algorithm for detecting touch screen events from the Linux driver. There has been an update to the Linux driver later, which fixes a spurious event issue from the touch screen. This fix has not been applied to the Circle driver yet. I will check this soon. I did some te...
by rst
Fri Oct 12, 2018 1:38 pm
Forum: Bare metal, Assembly language
Topic: FT5406 Touch coordinate corruption
Replies: 25
Views: 5211

Re: FT5406 Touch coordinate corruption

Maybe my problem is related to yours. I'm using the Circle framework to access the touch screen, it's using this code : https://github.com/rsta2/circle/blob/master/lib/input/touchscreen.cpp I call Update() 60 times per sec as suggested, and it's working well except sometimes it misses a Touch Relea...
by rst
Thu Sep 27, 2018 11:45 am
Forum: Bare metal, Assembly language
Topic: Building a network stack
Replies: 12
Views: 2210

Re: Building a network stack

I actually meant I will be ready to start working on the USB/Network stack in a month or two. I am still working on the memory system and process management, but I wanted to start reading around the subject before I am ready to start. I suspect this will take me 6 - 9 months to actually get somethi...
by rst
Wed Sep 26, 2018 7:32 pm
Forum: Bare metal, Assembly language
Topic: Building a network stack
Replies: 12
Views: 2210

Re: Building a network stack

This is something I may be looking at in a month or 2 and was wondering if anyone else has done so and what pain points they had? My experience is, doing this from scratch is not that easy and it takes time, but you can learn a lot from it about USB 2.0 and TCP/IP. Do I need a working USB stack bef...
by rst
Wed Sep 26, 2018 6:40 pm
Forum: Bare metal, Assembly language
Topic: Why does my Raspberry Pi Zero W report that it has 256MB?
Replies: 7
Views: 1471

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

I guess, the firmware file fixup.dat is missing on your uSD card. Without it the firmware cannot relocate the file start.elf in memory.
by rst
Wed Sep 19, 2018 10:31 am
Forum: Bare metal, Assembly language
Topic: Circle Audio Buffering
Replies: 3
Views: 1721

Re: Circle Audio Buffering

You are welcome. I did some measurements now and it comes out, that my guess was far too pessimistic. On a RPi 3B+ the overhead for DMA interrupt and cache management is safely below 30 microseconds per chunk. So the influence of this overhead on the available time for rendering the sound data is mi...
by rst
Tue Sep 18, 2018 10:54 am
Forum: Bare metal, Assembly language
Topic: Circle Audio Buffering
Replies: 3
Views: 1721

Re: Circle Audio Buffering

Supposing you are using the PWM sound device at 44.1 KHz sample rate, writing out one sound DMA buffer with 2048 samples (1024 per channel) should take about 23 ms, as you have noted. The CPWMSoundBaseDevice class uses two of these linked sound DMA buffers, so that while one buffer is written out, t...
by rst
Sat Jun 16, 2018 3:50 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 239
Views: 64950

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

Could someone tell why are we clearing only L1 d-cache and not L1 & L2 for the multicore case, any reason? Is it specific to Raspberry Pi ? Excuse me, I'm a little late here. The reason for that behaviour of the Circle start-up code is, that the L1 caches may contain random data after reset, at lea...
by rst
Tue May 08, 2018 8:24 am
Forum: Bare metal, Assembly language
Topic: Audio output on the Raspberry Pi 3B
Replies: 26
Views: 7795

Re: Audio output on the Raspberry Pi 3B

@LdB: I guess, you have overseen that #define and the following comment: https://github.com/rsta2/circle/blob/master/lib/sysinit.cpp#L139 This for-loop is only used, if ARM_ALLOW_MULTI_CORE is not (!) defined to put the secondary cores to sleep, which was required with older firmwares, which did not...
by rst
Sun Apr 22, 2018 8:12 am
Forum: Bare metal, Assembly language
Topic: multi-core shared memory communication
Replies: 15
Views: 4035

Re: multi-core shared memory communication

Is there a way to see the stub in the fimrware by disassembling start.elf or similar? Or is the only way to write a bootloader that dumps it out? I used a program, which copies the firmware from 0x0 and writes it out to the SD card. You can also search for the firmware in the start.elf binary, if y...
by rst
Sat Apr 21, 2018 4:40 am
Forum: Bare metal, Assembly language
Topic: multi-core shared memory communication
Replies: 15
Views: 4035

Re: multi-core shared memory communication

It's working now. That's good. Yes, all cores are initially in HYP mode. I have compared the referenced armstub7.S source code with the stub which is actually loaded on my RPi 3B with a firmware from Apr 9. I'm sure, it's the same here. Setting the data cache enable bit in the control register has n...
by rst
Thu Apr 19, 2018 6:09 pm
Forum: Bare metal, Assembly language
Topic: multi-core shared memory communication
Replies: 15
Views: 4035

Re: multi-core shared memory communication

The SMP bit is already set by the ARM stub, before your code is started, here: https://github.com/raspberrypi/tools/blob/master/armstubs/armstub7.S#L69 You do not need to touch it. There is only one exception: You use the "kernel_old=1" setting in config.txt. I'm sure, you do not need to do cache ma...
by rst
Wed Apr 18, 2018 8:04 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 239
Views: 64950

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

Great, that it's working now!
by rst
Tue Apr 17, 2018 6:40 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 239
Views: 64950

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

I think, you already did a good job. What I can see is, that liblua.a must be moved to the first position in LIBS. There are some functions, which are not implemented yet by the circle-stdlib project. We have to find out, which functions are affected. I don't think, this is fully POSIX compatible, b...
by rst
Tue Apr 17, 2018 3:26 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 239
Views: 64950

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

Great, that it's working now. The serial bootloader can be already tested, if you checkout the develop branch. We have used Dwelch67's bootloader. Have a look into the file doc/eclipse-support.txt for infos on how to use it with Circle. It can be used with or without the Eclipse IDE. Running Lua on ...
by rst
Sun Apr 15, 2018 7:45 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 239
Views: 64950

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

You can use a resolution of 320x240, if you directly choose it in the constructor of CKernel in kernel.cpp of any sample: CKernel::CKernel (void) : m_Screen (320, 240), ... It does not work with the cmdline.txt settings, because there are some checks in CKernelOptions , which do not allow a resoluti...
by rst
Fri Apr 13, 2018 4:09 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 239
Views: 64950

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

Hi, thanks for being interested in Circle. Circle does not support accelerated graphics using the GPU. I know of the Circle-based ZX Spectrum emulator ZXBaremulator , which reaches at least 50 to 60 FPS with a PAL screen resolution, while doing sound at the same time. So for retro graphics it can be...
by rst
Wed Mar 21, 2018 9:40 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 239
Views: 64950

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

Support for the new Raspberry Pi 3 Model B+ has been added to Circle at the develop branch on GitHub including a driver for the LAN7800 Gigabit Ethernet device. I did some tests with several sample programs and everything seems to work well.
by rst
Fri Mar 02, 2018 4:41 pm
Forum: Bare metal, Assembly language
Topic: [solved] RPi-3 (aarch32) - MMU activation hangs
Replies: 23
Views: 4332

Re: RPi-3 (aarch32) - MMU activation hangs

I observed two things: You did not set the Domain Access Control Register (DACR) . This register controls the access permission for each memory domain (0-15) used in the translation table entries. Its reset value in UNKNOWN, so it is normally required to set (at least) domain 0 to "Client" (1) or "M...
by rst
Sun Dec 24, 2017 10:54 am
Forum: Bare metal, Assembly language
Topic: JustBoom DAC HAT (or any other I2S DAC HAT) on RPi 3?
Replies: 4
Views: 1052

Re: JustBoom DAC HAT (or any other I2S DAC HAT) on RPi 3?

You are welcome. With I2C used for configuration it should be possible to get it running. The pHAT DAC is working with Circle. I have it here.
by rst
Sat Dec 23, 2017 1:38 pm
Forum: Bare metal, Assembly language
Topic: JustBoom DAC HAT (or any other I2S DAC HAT) on RPi 3?
Replies: 4
Views: 1052

Re: JustBoom DAC HAT (or any other I2S DAC HAT) on RPi 3?

It's very likely that you have to do additional initialisations for the PCM5122 DAC chip used in this HAT. This chip has internal registers, which have to be set. The PCM5102A does not need this and the Circle driver is doing the plain I2S output only. I guess, you can only try to analyse the code o...
by rst
Thu Nov 30, 2017 11:32 am
Forum: Bare metal, Assembly language
Topic: Trying to fully understand this C++ approach the Virtual GPIO Pins of the GPU
Replies: 2
Views: 947

Re: Trying to fully understand this C++ approach the Virtual GPIO Pins of the GPU

I am a little too hung up on the assert. I am not sure why he is using a bitwise & 3 there. What is he trying to defend against? This assert ensures that the total size of the property tag structure is a multiple of 4 bytes. As I understand it, this is required by the firmware. See: https://github....
by rst
Sun Nov 19, 2017 8:58 am
Forum: Bare metal, Assembly language
Topic: Framebuffer ain't working on rpi zero :(
Replies: 7
Views: 1845

Re: Framebuffer ain't working on rpi zero :(

That's the L2 cache of the VideoCore (VC) which is enabled by default on the RPi 1 and Zero, but can be disabled in config.txt. Have a look at the diagram on page 5 of this document . There are four alias memory windows for the VC on the left side. You have to add (or to OR) 0x40000000 to each physi...
by rst
Mon Nov 13, 2017 6:41 am
Forum: Bare metal, Assembly language
Topic: Framebuffer ain't working on rpi zero :(
Replies: 7
Views: 1845

Re: Framebuffer ain't working on rpi zero :(

Do you have by any chance the data cache enabled? Then you have to mark the memory range which belongs to the frame buffer as "not cached" or you have to clean the data cache after writing to the frame buffer. This is the only idea I have at the moment.

Go to advanced search