<set_> Nope.
* set_ cannot wait for Fri. Funday to come back!
<set_> Outside of the BBB for a second or two, did anyone happen to be in the weather today?
<set_> I checked my truck. It said 104F. Um, that is hot.
<set_> Okay, that is all.
<set_> And no, I cannot get the bi-directional GPIO to work so far.
<vagrantc> i love the atmosphere. could not live without it.
<set_> Oh, and yes. You are right. W/out the atmosphere, we would all be doomed!
<set_> So, toggling bi-directional is not a thing at all w/ GPIOs right?
<set_> For instance, using a PIN, say P9.12, to be input and then output is not done on the BBB...
<set_> Or...is that all for source to handle? Like making it output firstly, then source, and then making it an input seems it could happen.
<set_> But then...
<set_> Whelp.
<set_> No question now. Dang it. No matter in what GPIO ideas I am thinking of currently, I cannot send/recieve in the same ON or the same OFF.
starblue3 has joined #beagle
<set_> So, is it possible to send one INPUT and one OUTPUT signal during an ON/1 and then a different signal of IN/OUT on an OFF?
<zmatt> ?
<zmatt> I have no idea what you're trying to describe
<set_> Me neither. I thought I could send two signals during a 1 in Linux w/ a language.
<zmatt> wtf does that mean. "during a 1" .. of what?
<ds2> you mean like with an open collector, you need to output a 1 to see any other signals?
starblue2 has quit [Ping timeout: 240 seconds]
<set_> For instance, in my file I can get the Linux system to accept a 1 or a 0.
<set_> Or none.
<ds2> you can't read a none
<set_> Oh.
<set_> Okay, forget none for now please.
<set_> "none."
<set_> So, say I set up a small sysfs system w/ available GPIOs.
<set_> Files like enable and etc may be in that specific file.
<zmatt> why is your phrasing always so weird. what do you mean by "set up a small sysfs system"
<set_> B/c I know less of what you know to understand. I am an awkward phraser.
Shadyman has joined #beagle
<set_> "set up a small sysfs system" is part of the kernel.
<set_> Still, although deprecated, it is around.
<zmatt> regardless, you can do anything you want with gpios at any time. each gpio is in one of three states: input (i.e. output-disabled), output-low, or output-high. you can change between these modes by writing "in", "low", or "high" to the "direction" attribute in the gpio's sysfs directory.
<set_> ds2: I am trying to make two signals out of one. I guess.
<zmatt> when in output mode you can also change the output by writing to the "value" attribute
<set_> Right. Okay.
<zmatt> when in input mode you can observe the line level by reading the "value" attribute
<set_> I am thinking I can send two signals of a GPIO simultaneously.
<set_> 1/2?
<set_> Right. Everything in b/t 0 and 1?
<zmatt> what do you mean by "sending" a "signal of a GPIO"
<zmatt> ?
<zmatt> you can change the state of any individual gpio at any time
<set_> Okay. I am changing the state of the GPIO. IN and OUT.
<set_> Can OUT be used to be an input and ouput during a 1 value of an direction OUTPUT?
<set_> I do not need to know the way it can be done. I just would like to know if it can be done.
<zmatt> keep in mind that the "out" direction is not a complete description of the gpio state, since it can either be output-low or output-high. when changing from input to output you need to specify which output state you want by writing "low" or "high" to the direction attribute (don't write "out", it's a deprecated synonym for "low")
<zmatt> I have no idea what that sentence means
<set_> Okay. "low".
<set_> I get it.
<set_> I know it gets complicated.
<zmatt> well, "low" or "high", depending on whether you want it to output low or output high :P
<set_> So, w/ my value of IN and/or OUT, can I then send the same signal to be both an IN (low) as 1 and an OUT (high) as 1?
<set_> I guess not but it was wishful thinking.
<zmatt> sorry, your question is completely unintelligible
<set_> I understand just fine. It does not make sense.
<set_> I am trying to understand it too.
<zmatt> you still haven't even answered what you mean by "send a signal"
<set_> value
<set_> value of 1 or 0.
<zmatt> also "IN (low) .. OUT (high)" makes no sense... IN vs OUT has nothing to do with low vs high
<set_> To "send a signal" is setting my value to 0 or 1.
<set_> So, INPUT has no low or high. Okay.
<zmatt> that's not what I said either
<set_> Oh. I am wrong. Dang it.
<zmatt> an input can either be low or high, an output can either be low or high
<set_> Okay.
<zmatt> but for an output, software controls whether it's low or high
<set_> Aw.
<zmatt> for an input this is controlled by whatever hardware is connected to the pin, and software can observe this
<set_> Right, like an analog push button or something...
<set_> Okay.
* set_ things Fri. Funday is back!
<zmatt> a push button yes. (which are not analog)
<set_> Oh.
<set_> B/c it is either ON or OFF.
<zmatt> indeed
<set_> tactile!
<zmatt> I mean, I suppose you could technically have an analog push button if it's pressure-sensitive (like game controller buttons often are I think)
<zmatt> but generally speaking, pushbuttons are digital
<set_> Okay, so b/c my input cannot accept any, say b/c of a tactile switch, GPIO intervention, bi-directional for this type is negligent.
<zmatt> ?
<set_> Right. Like something like a reed switch, that is different.
<zmatt> sorry, I've had enough of trying to decipher your word salads for today :P afk
<set_> negligent or not available
<set_> Fine. Sorry.
<set_> Another time and another Fri!
* set_ will try to better articulate the GPIO sysfs subsystem a bit better during our next encounter...
<set_> Hopefully!
vagrantc has quit [Quit: leaving]
<ds2> one of the events will override the other. if you do not look at the hardware and plan accordingly, you will destroy something. maybe not immediately but damage will occur w/o consideration
weevoy has quit [Ping timeout: 240 seconds]
<set_> Oh.
<set_> I am reading the kconfig stuff.
<set_> It seems that it needs to be done but at some level and this level right now has nothing in my mind on its whereabouts.
<set_> I will update my kconfig ideas soon. I need to keep reading it.
<set_> By then, another one will be in place. Blah.
set_ has quit [Read error: Connection reset by peer]
set_ has joined #beagle
c0dex has joined #beagle
<c0dex> hi all, I just got a BBB and I'm willing to learn assembly programming. Are the two books at the bottom of the books page good to start with or would you recommend something different?
<set_> Assembly! Let me check those books. I would recommend assembly books on learning assembly but I am going to check the books sections.
<set_> I looked online for books. I do not believe any books for the BBB that are out now have a strong assembly approach.
<zmatt> c0dex: for ARM assembly programming? well one of the two books they list is the architecture reference manual, which you can find in html and pdf form here: https://developer.arm.com/documentation/ddi0406/b/?lang=en
<zmatt> but that's more of a reference manual than a tutorial
<zmatt> as the name implies ;)
<zmatt> (I've linked to the old rev B since that's aligned with the cortex-a8 that's in the BBB... later versions add a lot of stuff that would be irrelevant)
<zmatt> c0dex: is there a particular reason you're interested in ARM assembly programming on a beaglebone?
<c0dex> well, I had this idea of writing a basic DOS-like OS, so I'm checking the possibilities
<c0dex> set_ thanks for the insight
<zmatt> c0dex: even an OS only needs a very small amount of assembly generally, although it certainly requires a more in-depth knowledge of the architecture
<c0dex> ok, I've been read some posts and most people say that a little asm is necessary, the other parts would be C
<set_> No issue, c0dex. I read a bunch of books. Grasping languages and then handling a BBB would have been my better judgment. Instead I learned about what the BBB offered on the am335x and then slowly learned how to program.
<zmatt> c0dex: though, many years ago I made a simple pure-assembly baremetal application for the BBB: https://github.com/mvduin/bbb-asm-demo
<set_> I am a starter fellow. I iam trying to finish!
<c0dex> I'm ok with C, for asm I would need to learn.
<zmatt> arm assembly is not too difficult, it's not the horror of x86 assembly ;)
<zmatt> assembly is mostly just very verbose
<c0dex> yep, I know very little but enough to agree
<c0dex> set_ which language(s) are you learning on BBB?
<set_> Python3, C/C++, and I wanted to take time out to learn more assembly.
<set_> That way I can call my assembly from C.
<c0dex> oh, I see... cool
<zmatt> set_: how about you start with actually being able to write working python code and demonstrate a general grasp of how programming works before moving on to C/C++ let alone asm :P
<set_> For me, I like to make GPIOs on the am335x work but if you would like a more, well-rounded set of ideas, other people will help more than I.
<set_> Ha.
<set_> You are right. I need to understand more and not just say I can understand.
<set_> @zmatt is quick to beat me up for my lack of enthusiasm towards actual production.
<set_> I am in a pretend phase right now.
<set_> I saw the reCharger.
<zmatt> I mean, you rarely seem to have any shortage of enthausiam, but nevertheless it tends to result in you producing code that makes me feel like I'm having a stroke while reading :P
<zmatt> anyway
<set_> Ha.
<set_> Yeppers and I second that idea.
<zmatt> c0dex: unfortunately I don't really know what is or isn't good tutorial material on asm programming, I kinda just absorbed it along the way somewhere
<set_> When I move left to right while reading it, I seem to have the same issues.
<zmatt> c0dex: you could also look at PRU programming in asm in the BBB... its instruction set kinda resembles that of ARM but it's much much simpler
<set_> @zmatt: I mean, what do you want me to do? Put a bunch of PWM, GPIO, SERIAL, etc files together and call them later in other files?/
<c0dex> zmatt, thanks for the suggestions
<set_> I mean, I can use sysfs for it...
<set_> Forget it. I am going to silently yell in a pillow, i.e. past 10:00.
buzzmarshall has quit [Quit: Konversation terminated!]
<zmatt> c0dex: but e.g. for an OS the most you need asm for is special instructions that don't have a C wrapper, for which you can use inline assembly in gcc
<set_> Okay. Coughing done. I am back!
<zmatt> c0dex: for example, here's some code I've written to handle/decode processor faults on the cortex-a8: https://pastebin.com/S4BtY6Gi
<c0dex> thats great, because most of the things (pieces of code) we see in the OS books is in C
<zmatt> c0dex: it's mostly just architectural knowledge, with inline asm mostly used to read special cpu registers that contain fault information, e.g.:
<zmatt> asm( "mrc p15, 0, %0, c5, c0, 1" : "=r"(fsr) ); // read IFSR
<c0dex> and for the boot is just about to put the initial code in the right place, right?
<c0dex> I mean, the processor will look for the initial code in a specific location
<c0dex> like in the track 0 of a HD
<zmatt> well, the cpu itself boots from a fixed address, which is located in the boot ROM baked in the AM335x
<zmatt> the boot rom is capable of loading the next stage in a bunch of different ways
<zmatt> the README of the asm demo I linked earlier (which is designed to be loaded directly by bootrom) describes a bunch of these
<c0dex> hm, ok
<c0dex> bbl, thanks guys
<zmatt> most commonly you'd have bootrom loading a secondary bootloader like u-boot... and because u-boot is too bloated to fit its fat ass into the internal static RAM buffer (iirc 107 KB) where bootrom loads code into, u-boot actually uses another intermediate bootloading stage
<set_> MLO?
<zmatt> MLO is actually just the name of the file format used by bootrom, so whatever is the stage loaded directly after bootrom will be MLO regardless of whether that's u-boot's intermediate bootloading stage, which is called SPL (Secondary Program Loader)
<set_> Secondary Program Loader!
<set_> It is still Fri. and I for one am almost tired. Phew. I can probably get some shuteye if @zmatt calms down.
<set_> But...I helped today. "Helped."
<set_> I help people find true glory and BBB related items.
<set_> For instance, the BBGW mechanical is hard to track down...
<set_> First, seeed studio's website would not allow me to get on it.
<set_> Heh?
<set_> Then, beagleboard.org changed in my viewing twice in one night.
<set_> I type the same thing and get different results. I know how difficult ideas are when things happen, i.e. things like switching registrars and making small changes.
<set_> It is not easy.
<set_> Anyway, off to play!
<set_> sysfs(5) holds the glory!
<set_> @zmatt: Things just keep getting more interesting.
<set_> So, does the /proc/ system work now instead of the sysfs or just along w/ it?
<zmatt> they're just different things
<set_> Okay. Good enough.
<set_> I read the differences. Would I need to understand /proc/ more as futures unfold?
<zmatt> you don't need to know much about either of them
<set_> Stop it. I can learn!
* set_ learns like a new sponge!
<set_> soaking up the knowledge! Did you get the ole joke?
<set_> Outside of banter and jokes around here...I better learn to trap it and not allow it to become disposable. I need it for future times.
weevoy has joined #beagle
<zmatt> :q
<set_> @zmatt: What are you doing?
<set_> I, set_, am working on a 3D Printer. Blah. Discontinued and faulty firmware. Aw!
<ds2> faulty firmware?
<ds2> are you trying for a turnkey 3d printer?
<set_> No.
<set_> I have one! I am about to dismantle it and use another board and adjust some items.
<set_> And by adjust, I mean goof around for a while w/ it until I can learn.
<set_> Do you need an additional board?
<set_> This one has a STM on it, I think. Anyway, I am about to rid myself of its issues and get a new one (new board) to test.
<set_> Anyway...
<set_> The mechanics are nice (sort of) and it is heavy duty metal! Steel! Overkill...yes sir.
<set_> It is 24v though. So, I have to exchange the 12v into it from 24v.
Shadyman has quit [Remote host closed the connection]
<set_> Whelp. I am doing it. I am close!
<jfsimon1981> Hi zmatt
<jfsimon1981> does your project still rely on the beagle black or red
<jfsimon1981> both projects i previoously worked on were brushed by customers, although they worked quite well, i'm not too happy with this
buzzmarshall has joined #beagle
starblue3 has quit [Ping timeout: 250 seconds]
<zmatt> brushed?
<zmatt> and we use BBBs in production yes
mattb0ne has joined #beagle
mattb0ne has quit [Ping timeout: 246 seconds]
starblue3 has joined #beagle
mattb0ne has joined #beagle
mattb0ne has quit [Ping timeout: 246 seconds]
mattb0ne has joined #beagle
mattb0ne has quit [Ping timeout: 250 seconds]
mattb0ne has joined #beagle
mattb0ne has quit [Ping timeout: 245 seconds]
starblue3 has quit [Ping timeout: 240 seconds]
vagrantc has joined #beagle
starblue3 has joined #beagle
brook has quit [Read error: Connection reset by peer]
brook has joined #beagle
samnob_ has quit [Read error: Connection reset by peer]