Go to advanced search

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: 782

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: 782

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: 782

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: 782

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: 3160

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: 1068

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: 15
Views: 4111

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: 15
Views: 4111

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: 15
Views: 4111

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: 775

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: 2809

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: 3338

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: 2809

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: 3338

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: 3338

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...
by dwelch67
Sun Dec 17, 2017 5:42 am
Forum: Bare metal, Assembly language
Topic: Pi won't start pianobar on boot
Replies: 1
Views: 485

Re: Pi won't start pianobar on boot

this is a bare metal forum
by dwelch67
Wed Dec 13, 2017 9:22 pm
Forum: Bare metal, Assembly language
Topic: [Solved] UARTs break
Replies: 12
Views: 3338

Re: UARTs break

or just dont use the mini-uart if you want to detect break.
by dwelch67
Wed Dec 13, 2017 9:21 pm
Forum: Bare metal, Assembly language
Topic: [Solved] UARTs break
Replies: 12
Views: 3338

Re: UARTs break

I dont use break much unless absolutely have to, problem is what is the definition for starters, how long does it have to be asserted to define a break? And then does the uart detect it at all, or detect just a framing error? Are you seeing a framing error and if so does the rx buffer have any data ...
by dwelch67
Mon Dec 11, 2017 9:50 pm
Forum: Bare metal, Assembly language
Topic: Reasoning about PWM for a DC Motor Driver
Replies: 2
Views: 811

Re: Reasoning about PWM for a DC Motor Driver

is there one universal answer? The pwm frequency is ideally faster than the motor/system can respond to, otherwise it sits there and oscillates or wiggles. But it doesnt want to be so fast that it is filtered out as noise. You can of course intentionally put your own filter in the system to turn it ...
by dwelch67
Mon Dec 11, 2017 9:44 pm
Forum: Bare metal, Assembly language
Topic: lwIP - A Lightweight TCP/IP stack
Replies: 20
Views: 8490

Re: lwIP - A Lightweight TCP/IP stack

skimming thread...depending on what you want to do you can bang out a UDP stack that cheats a lot in an afternoon or half an hour whichever. if i build a quicky client that I want to talk to in that I want to ask it questions, what is the temperature, send me some data, etc. I used fixed packet size...
by dwelch67
Mon Dec 11, 2017 9:33 pm
Forum: Bare metal, Assembly language
Topic: Dave Welche's bootloaders for RPi3 or other alternative
Replies: 18
Views: 3770

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

generally I write and post the blinkers first increasing in complexity and/or rotating through possible timers in the device. unfortunately with the pi the leds are no longer directly tied to gpio pins (for the pi3) which means maybe now you need an led and a resistor and some wires. I usually write...
by dwelch67
Fri Dec 08, 2017 9:42 pm
Forum: Bare metal, Assembly language
Topic: Setting AUX_MU_LCR_REG for mini UART to 8 bit mode
Replies: 3
Views: 709

Re: Setting AUX_MU_LCR_REG for mini UART to 8 bit mode

If you are reading what I think you are reading is because the manual was wrong, took me a couple of hours as I didnt have a scope at the time. the pinned topic for baremetal has resources, in there there should be an errata thing on an elinux wiki page, this among many other bugs in the broadcom do...
by dwelch67
Thu Dec 07, 2017 9:41 am
Forum: Bare metal, Assembly language
Topic: Physical Address Mapping on the Pi3
Replies: 4
Views: 3493

Re: Physical Address Mapping on the Pi3

you almost exactly have it right it is 47-32=15th bit Where does it say the 47th bit is the led? in some broadcom schematic we dont have access to. or in the linux port from broadcom that someone dug through to figure this out. There may be some documentation at this point that we have visibility to...
by dwelch67
Sun Dec 03, 2017 2:36 pm
Forum: Bare metal, Assembly language
Topic: Dave Welche's bootloaders for RPi3 or other alternative
Replies: 18
Views: 3770

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

at the top of the baremetal forum there is a pinned thread that has a log of baremetal resources, look through those to find other solutions as well.

Go to advanced search