Go to advanced search

by dwelch67
Sun Jan 14, 2018 10:28 pm
Forum: Bare metal, Assembly language
Topic: understanding the arm timer
Replies: 1
Views: 548

Re: understanding the arm timer

no it means the interrupt from this peripheral fires when it reaches zero. this is fairly typical with timers, when the roll over they fire an interrupt, some count down some count up some count down to zero some count up to N and reload with zero, etc. You control the interrupt rate in this case wi...
by dwelch67
Wed Jan 10, 2018 3:58 pm
Forum: Bare metal, Assembly language
Topic: Timer with nanosecond accuracy for electronic purpose
Replies: 15
Views: 3556

Re: Timer with nanosecond accuracy for electronic purpose

I dont think the timer is your problem, there are a couple there already, it is the herky jerky nature of a pipeline, assuming you can keep the code in L1 then great, but it it bounces out to L2/DRAM then big performance hit, all accuracy is lost. Microcontrollers have a much better chance, similar ...
by dwelch67
Wed Jan 10, 2018 3:36 am
Forum: Bare metal, Assembly language
Topic: What can be realistically programmed in assembler today?
Replies: 39
Views: 5319

Re: What can be realistically programmed in assembler today?

While the everything that is possible is absolutely the answer, another interesting side effect is you can do MORE than you can with high level languages as you have no limitations other than the hardware/instruction set rules. The real question is knowing that anything that is remotely possible to ...
by dwelch67
Tue Jan 09, 2018 3:05 am
Forum: Bare metal, Assembly language
Topic: Hello world! bare metal boot of PI Zero, ASM + C
Replies: 2
Views: 1723

Re: Hello world! bare metal boot of PI Zero, ASM + C

vectors.s .globl _start _start: mov sp,#0x8000 bl notmain hang: b hang .globl PUT32 PUT32: str r1,[r0] bx lr .globl GET32 GET32: ldr r0,[r0] bx lr .globl dummy dummy: bx lr notmain.c extern void PUT32 ( unsigned int, unsigned int ); extern unsigned int GET32 ( unsigned int ); extern void dummy ( uns...
by dwelch67
Tue Jan 09, 2018 2:59 am
Forum: Bare metal, Assembly language
Topic: Hello world! bare metal boot of PI Zero, ASM + C
Replies: 2
Views: 1723

Re: Hello world! bare metal boot of PI Zero, ASM + C

absolutely I have examples for pi-zero look in the boards/pi-zero directory or look at the standalone repo https://github.com/dwelch67/raspberrypi-zero
by dwelch67
Mon Jan 08, 2018 9:57 pm
Forum: Bare metal, Assembly language
Topic: Powering CPUs on/off in RPi3
Replies: 11
Views: 2010

Re: Powering CPUs on/off in RPi3

nCPUPORESET[CN:0]

nCORERESET[CN:0]

as with other arm cores that came before there are individual reset lines per core that the chip vendor controls. its a chip vendor question not an arm TRM question.
by dwelch67
Mon Jan 08, 2018 3:50 pm
Forum: Bare metal, Assembly language
Topic: Practical question: RPi SD card reader worn
Replies: 5
Views: 641

Re: Practical question: RPi SD card reader worn

I agree, go with a bootloader. the original pi something about that full sized slot would crack a corner of my sd card adapters, ran through a number of them (before having a solid bootloader). later adafruit made a pcb flush mount micro sd adapter that would slide in and that problem got solved.
by dwelch67
Sun Jan 07, 2018 1:25 pm
Forum: Bare metal, Assembly language
Topic: Dave Welche's bootloaders for RPi3 or other alternative
Replies: 18
Views: 2923

Re: Dave Welche's bootloaders for RPi3 or other alternative

This is very typical for uarts, sadly on a platform like this it doesnt have to be this way they could have the uart shifters run off of the 100mhz (or whatever) reference clock not the PLL clock, and or they could allow for a PLL tap for the peripherals. which the system clock at 250MHz should have...
by dwelch67
Sun Jan 07, 2018 1:21 pm
Forum: Bare metal, Assembly language
Topic: Powering CPUs on/off in RPi3
Replies: 11
Views: 2010

Re: Powering CPUs on/off in RPi3

I am still curious about this as well, I would hope it is just an undocumented register and they flip on all four at once. (and have four sets of controls) Why? Because it is there, like why climb the mountain. In part if you are not using the core why have the other three be beating on the cache/dr...
by dwelch67
Fri Jan 05, 2018 6:39 pm
Forum: Bare metal, Assembly language
Topic: Access GPIO with assembly gives segmentation fault
Replies: 2
Views: 627

Re: Access GPIO with assembly gives segmentation fault

this is a baremegal forum, looks like you are writing a user application on an operating system (by definition not bare metal). there are many examples and we can help with baremetal, but hit up one of the other forums for application work (hint google mmap())
by dwelch67
Thu Jan 04, 2018 9:31 pm
Forum: Bare metal, Assembly language
Topic: uart04 in bare metal examples does not work
Replies: 6
Views: 676

Re: uart04 in bare metal examples does not work

those are compatible instructions, the return from the isr is probably wanting to be an eret, but see the pi2 examples not the pi1.
by dwelch67
Thu Jan 04, 2018 2:03 am
Forum: Bare metal, Assembly language
Topic: uart04 in bare metal examples does not work
Replies: 6
Views: 676

Re: uart04 in bare metal examples does not work

you are in the right place as in the folks here are very knowledgeable about events/interrupts on the various chips/cores. look at the options pick one path (for example the without config.txt path) see if you can get that to work, then get a little more complicated as needed/desired.
by dwelch67
Thu Jan 04, 2018 2:01 am
Forum: Bare metal, Assembly language
Topic: uart04 in bare metal examples does not work
Replies: 6
Views: 676

Re: uart04 in bare metal examples does not work

You are in the right place, but first you need to figure out if you have the pi2 with the armv7 or with the armv8. then what mode do you want 32 or 64 bit (if the armv8), HYP, SVC, etc...Then from there you can determine how exceptions work. The folks here are very well versed. I have a selection of...
by dwelch67
Thu Jan 04, 2018 1:52 am
Forum: Bare metal, Assembly language
Topic: uart04 in bare metal examples does not work
Replies: 6
Views: 676

Re: uart04 in bare metal examples does not work

Need to change that readme as well, those top level examples are for the original pi. Try the boards directory and see the options as how you startup and run the chip determines how events/interrupts work. gets worse for the pi3. and sadly if this pi2 you have uses the pi3 chip not the old pi2 chip ...
by dwelch67
Wed Dec 27, 2017 1:32 am
Forum: Bare metal, Assembly language
Topic: Machine Learning on the Video Core of the Pi's
Replies: 4
Views: 2253

Re: Machine Learning on the Video Core of the Pi's

did you read up on the gpu and its instruction set? it is floating point heavy, so if you you want to do a fair amount of math then perhaps that is a/the way to go. as far as what algorithms you write that have some purpose that is up to you. I have not messed with it in a very long time, back when ...
by dwelch67
Wed Dec 27, 2017 1:28 am
Forum: Bare metal, Assembly language
Topic: Enabling MMU slows down VFP?
Replies: 5
Views: 871

Re: Enabling MMU slows down VFP?

every single access including fetching of code goes through the mmu, which goes to a table in ram. there is some table caching but not perfect. when you enabled or disabled the mmu did you add any code (or simply nop or not nop the mrc or other instructions that do the enable). changing the alignmen...
by dwelch67
Wed Dec 27, 2017 1:25 am
Forum: Bare metal, Assembly language
Topic: Drive up to 20 stepper motors (28byj-48)
Replies: 14
Views: 2675

Re: Drive up to 20 stepper motors (28byj-48)

Well you dont have enough I/O pins right? so you may want to have an external mcu or a stepper driver that the pi can spam with some number of steps and or speeds, worst case one mcu per motor, but based on pin count, etc you can have more than one per. a simple-ish interface spi or uart or i2c you ...
by dwelch67
Wed Dec 27, 2017 1:19 am
Forum: Bare metal, Assembly language
Topic: Drive up to 20 stepper motors (28byj-48)
Replies: 14
Views: 2675

Re: Drive up to 20 stepper motors (28byj-48)

steppers can be driven either way, tend to be able to go around and around as many times as you want. servos tend to not spin all the way around, used for things like controlling the rudder on an rc plane or boat.
by dwelch67
Mon Dec 25, 2017 4:07 am
Forum: Bare metal, Assembly language
Topic: Drive up to 20 stepper motors (28byj-48)
Replies: 14
Views: 2675

Re: Drive up to 20 stepper motors (28byj-48)

too broad at this point, depends initially on the driver you plan to use, what is the interface, how many motors can it control, etc. do they all have to be powered and hold their position or can you put a relay board or some flavor of mux such that you have one driver and switch only one motor in a...
by dwelch67
Wed Dec 20, 2017 2:32 pm
Forum: Bare metal, Assembly language
Topic: Config.txt over_voltage option Bare metal
Replies: 2
Views: 627

Re: Config.txt over_voltage option Bare metal

I dont know the board design, but would recommend against messing with voltages, that doesnt often work out well, in some cases you can tweak but you go to low and logic just stops working. the windows are generally very tight. you want to save power lower the clock rates for the processor and ddr i...
by dwelch67
Tue Dec 19, 2017 7:06 pm
Forum: Bare metal, Assembly language
Topic: Run interrupts on raspberry pi 3
Replies: 9
Views: 2225

Re: Run interrupts on raspberry pi 3

I probably didnt bother with the pi3 led (maybe someone will prove me wrong with my own examples), I did try to find it over i2c, but mailboxes arent interesting to me, talking to the gpu. If anything I have boards with leds and resistors i can use on any gpio pin, but that doesnt serve as a good ex...
by dwelch67
Tue Dec 19, 2017 7:02 pm
Forum: Bare metal, Assembly language
Topic: [Solved] UARTs break
Replies: 12
Views: 2539

Re: [Solved] UARTs break

Nope, just stating that a break is a framing error. uarts are not all built equal (although a lot like/try to clone the 16550). So if there isnt a specific break detect and/or it doesnt work then perhaps a combination of framing error and rx data maybe you can assume break from that. I have not look...
by dwelch67
Tue Dec 19, 2017 12:56 am
Forum: Bare metal, Assembly language
Topic: Run interrupts on raspberry pi 3
Replies: 9
Views: 2225

Re: Run interrupts on raspberry pi 3

if booted in aarch32 it starts in supervisor mode, but the bootstrap that the gpu places if you let it (no config.txt or not overriding the boot in config.txt), you get HYP mode or at least for while now but who knows maybe one day they will change. So you can 1) let it boot stock into hyp mode, lea...
by dwelch67
Sun Dec 17, 2017 5:51 am
Forum: Bare metal, Assembly language
Topic: [Solved] UARTs break
Replies: 12
Views: 2539

Re: UARTs break

super simple way to test break and other framing errors is to feed the unit under test with a uart set for half or slower speed, write a 0x00 at 57600 into a 115200 unit under test and it looks like a break. feed other bit patterns and they look like various other things some legal some not pretty e...
by dwelch67
Sun Dec 17, 2017 5:49 am
Forum: Bare metal, Assembly language
Topic: [Solved] UARTs break
Replies: 12
Views: 2539

Re: UARTs break

I have been forced to use break from time to time, it is a framing error by definition, the stop bit doesnt arrive at the right time and you need to re-sync. (think of it is a start bit that lasts longer than a character, or a bunch of zeros that stop through and beyond the stop bit) Each uart has i...

Go to advanced search