Go to advanced search

by Ultibo
Wed Jun 21, 2017 11:06 am
Forum: Bare metal, Assembly language
Topic: Simple question: is there a way to cpsr in a branch instruct
Replies: 2
Views: 810

Re: Simple question: is there a way to cpsr in a branch inst

Is there any instruction I can use for this? What is the best way to do it? Hello Mr.Coco, I think the instruction you are looking for is RFE which is Return From Exception. At first glance it might seem like it is only useful for returning from an interrupt handler or other exception but you can a...
by Ultibo
Fri Jun 09, 2017 10:34 am
Forum: Bare metal, Assembly language
Topic: What am i doing wrong when accessing and using a framebuffer
Replies: 29
Views: 4158

Re: What am i doing wrong when accessing and using a framebu

Mine is on a Pi3 and I wonder if they had a bug in firmware I am working to and now fixed. My boards using the firmware I have is definitely backwards. Time to make sure my firmware is up todate and go check the linux driver :-) Odd, the Linux driver seems to have always done it the way the documen...
by Ultibo
Mon Jun 05, 2017 12:06 am
Forum: Bare metal, Assembly language
Topic: ChibiOS on RPi low core
Replies: 7
Views: 1857

Re: ChibiOS on RPi low core

Turning on instruction caching & branch prediction cut the tight loop time from 77 ns down to 4.3 ns. That's an excellent result. Next step, MMU & data cache. You have some reading to do, but you will also find quite a few people on this forum who have worked through the details of this if you do r...
by Ultibo
Mon Jun 05, 2017 12:03 am
Forum: Bare metal, Assembly language
Topic: Flash the red LED on a Pi3, now you can!
Replies: 2
Views: 1188

Re: Flash the red LED on a Pi3, now you can!

So do understand correctly that this access is still (proxied) through the GPU and not directly? Yes, unfortunately access to the GPIO expander still requires using the mailbox interface which is not as easy for getting starting as directly manipulating the GPIO registers. However at least the inte...
by Ultibo
Sat Jun 03, 2017 7:01 am
Forum: Bare metal, Assembly language
Topic: Flash the red LED on a Pi3, now you can!
Replies: 2
Views: 1188

Flash the red LED on a Pi3, now you can!

I know many have complained in the past about the changes to the Pi3 that made it hard to blink the activity LED and completely impossible to control the power LED. I'm not sure if anyone else noticed but when someone asked the other day about the list of mailbox property tags looking at the latest ...
by Ultibo
Sat Jun 03, 2017 3:13 am
Forum: Bare metal, Assembly language
Topic: What am i doing wrong when accessing and using a framebuffer
Replies: 29
Views: 4158

Re: What am i doing wrong when accessing and using a framebu

I discovered seggers does not support the cortex a53 yet and I am working on a pi 3, and I have been trying to find a way to use my jtag device to trace the registers, You certainly don't need jtag for debugging, dwelch67 has a huge collection of examples that show how to output information to the ...
by Ultibo
Sat Jun 03, 2017 1:14 am
Forum: Bare metal, Assembly language
Topic: What am i doing wrong when accessing and using a framebuffer
Replies: 29
Views: 4158

Re: What am i doing wrong when accessing and using a framebu

Makogan wrote:This doesn't seem to be working at all
You'll probably need to do some debugging, what is the address returned in t.fb_ptr? Is the mailbox request actually succeeding (your code doesn't seem to check the result)?
by Ultibo
Sat Jun 03, 2017 1:10 am
Forum: Bare metal, Assembly language
Topic: ChibiOS on RPi low core
Replies: 7
Views: 1857

Re: ChibiOS on RPi low core

rvanspaa wrote:Should complete in about 4-5 ns (which in a similar program running under raspbian it does), however running under ChibiOS it take about 70 ns for the loop.
Have you enabled the MMU, data cache, instruction cache and branch prediction?
by Ultibo
Fri Jun 02, 2017 10:04 am
Forum: Bare metal, Assembly language
Topic: What am i doing wrong when accessing and using a framebuffer
Replies: 29
Views: 4158

Re: What am i doing wrong when accessing and using a framebu

No matter what I do the screen remains black. Normally the mailbox request will return t.fb_ptr as a bus address and you need to convert it to a physical address before using it. This is simply a matter of ANDing it with NOT(0xC0000000) like this: physical_addres = bus_address AND NOT(0xC000000) So...
by Ultibo
Fri Jun 02, 2017 9:56 am
Forum: Bare metal, Assembly language
Topic: ChibiOS on RPi low core
Replies: 7
Views: 1857

Re: ChibiOS on RPi low core

Can someone tell me if the GPU uses any of the memory below 0x8000 and if so, what & what for exactly? Hi, By default during boot the GPU copies a small piece of code called the armstub to 0x0 and sets up the ARM tags at 0x100 which contains the command line and other information (although later fi...
by Ultibo
Thu Jun 01, 2017 12:28 pm
Forum: Bare metal, Assembly language
Topic: raspberry pi 2 bare metal
Replies: 2
Views: 838

Re: raspberry pi 2 bare metal

where should i begin ... i need some guidance :? The best place to start is to have a look at the Bare Metal resources post in this forum which lists lots of projects, examples and information that you can begin with. Throughout this forum you will find many projects and examples in Assembler, C, C...
by Ultibo
Mon May 29, 2017 11:24 pm
Forum: Bare metal, Assembly language
Topic: COMPLETE list of property tags?
Replies: 2
Views: 752

Re: COMPLETE list of property tags?

Makogan wrote:Does anyone know where the full list is?
The Linux source has the most complete list available.

Most of them are undocumented so you have to find a Linux driver that uses them to work out the parameters.
by Ultibo
Sun May 14, 2017 10:22 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 242
Views: 67945

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

So what is the fastest jitterfree timing interval that I can use to drive a 64bit counter, that could be read aligned by a single instruction - or even better: reserve a register that will always contain that counter? The Generic Timers (per core) in the Pi 2 and 3 can be read using a single MRRC i...
by Ultibo
Thu Apr 27, 2017 11:30 am
Forum: Bare metal, Assembly language
Topic: Peripheral access precautions for correct memory ordering
Replies: 17
Views: 3553

Re: Peripheral access precautions for correct memory orderin

So do you use a single mutex for the entire peripheral address range? No, not at all. We use locks as required on each device in order to protect from concurrent access by multiple CPUs or threads. I kind of get the concept you are thinking of here but I don't see any evidence for it, and I don't s...
by Ultibo
Wed Apr 26, 2017 11:43 pm
Forum: Bare metal, Assembly language
Topic: Peripheral access precautions for correct memory ordering
Replies: 17
Views: 3553

Re: Peripheral access precautions for correct memory orderin

If this peripheral issue exists on a BCM2836 or BCM2837, that would mean the only proper way to access any peripheral on these multicore systems would be to have a single mutex for the entire peripheral region. Is that what you are doing? Or are you only using a mutex for each peripheral individual...
by Ultibo
Wed Apr 26, 2017 3:36 am
Forum: Bare metal, Assembly language
Topic: Peripheral access precautions for correct memory ordering
Replies: 17
Views: 3553

Re: Peripheral access precautions for correct memory orderin

Hi Squishy, Does anyone have code that can reliably hit the reordering issue on RaspberryPI 1 or Zero with its ARM1176? Can you try the same code on a RaspberryPI 2 or 3 and see if the issue still occurs? I think the first thing to clarify is that memory access ordering and the use of memory barrier...
by Ultibo
Thu Apr 13, 2017 11:49 pm
Forum: Bare metal, Assembly language
Topic: _complete driver functions (interruptions)
Replies: 2
Views: 985

Re: _complete driver functions (interruptions)

Hello pierre123, These functions are : rx_complete, tx_complete and intr_complete. These are not interrupt handlers, they are USB completion callbacks. These functions are passed to either usb_fill_int_urb() or usb_fill_bulk_urb() as part of creating the USB request, then the request is submitted us...
by Ultibo
Tue Mar 21, 2017 11:44 am
Forum: Bare metal, Assembly language
Topic: Pipes in USB specification
Replies: 7
Views: 1788

Re: Pipes in USB specification

I think we should consider that the authors, who wrote some open source software might have very different constraints when they did this. An we should not underestimate their achievements. Because the only reward, you often get, is some positive attention. Very well said Rene, this is a perfect ex...
by Ultibo
Tue Mar 21, 2017 12:55 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4727

Re: RPI2 framebuffer not displaying fully

alexlanzano wrote:

Code: Select all

for(int y = 0; y < HEIGHT; ++y){
    for(int x = 0; x < WIDTH; ++x){
It might not make any difference (I'm not a C programmer) but wouldn't you normally do post increment (y++) instead of pre increment (++y) ?

Code: Select all

for(int y = 0; y < HEIGHT; y++){
    for(int x = 0; x < WIDTH; x++){
by Ultibo
Mon Mar 20, 2017 11:10 pm
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4727

Re: RPI2 framebuffer not displaying fully

Hi alexlanzano, I initialize my frame buffer and attempt to set each pixel to white (0xFFFFFFFF) but when I do so it only displays the first few hundred rows being white. I can't see anything wrong from the code you posted but I can clear up the confusion about the "wrong order" You seem to be using...
by Ultibo
Sun Mar 19, 2017 2:18 am
Forum: Bare metal, Assembly language
Topic: Pipes in USB specification
Replies: 7
Views: 1788

Re: Pipes in USB specification

The standard says: An unconfigured endpoint is called an endpoint while a configured endpoint is called a pipe. I think this line sums it up completely, the only difference is terminology. Since this is from a Microsoft document and not from the USB specification then I don't see any need to follow...
by Ultibo
Tue Feb 21, 2017 11:22 am
Forum: Bare metal, Assembly language
Topic: 64bit with FAT32 alignment problems
Replies: 7
Views: 1766

Re: 64bit with FAT32 alignment problems

because the buffer is aligned and the partition structure is aligned but the partition block is located at 446 in my buffer and that is an unaligned address I dealt with that particular case by making a copy of the partition entry (the partition_struct in your example) to a new instance allocated o...
by Ultibo
Mon Feb 20, 2017 10:01 am
Forum: Bare metal, Assembly language
Topic: Operating System developments "Baking Pi"
Replies: 6
Views: 2054

Re: Operating System developments "Baking Pi"

And than tried the pi3 again, where I am still fighting a daily battle with all the cache and coherency intricacies of the ARMv8. Hi @AlfredJingle, excuse my curiosity but I'd be fascinated to know what sorts of issues you are running into with this. Personally when adding support for the Pi3 I onl...
by Ultibo
Mon Feb 20, 2017 9:37 am
Forum: Bare metal, Assembly language
Topic: 64bit with FAT32 alignment problems
Replies: 7
Views: 1766

Re: 64bit with FAT32 alignment problems

Do you have a small code snippet that shows the problem you are having?
by Ultibo
Mon Feb 20, 2017 9:34 am
Forum: Bare metal, Assembly language
Topic: SID player on Ultibo
Replies: 3
Views: 1531

Re: SID player on Ultibo

LdB wrote:.. nice work Ultibo.
Thanks but the credit for the SID player project goes to @pik33 who has done a huge amount of work on it over the past few months.

Go to advanced search