**** BEGIN LOGGING AT Thu Feb 23 03:00:03 2017 Feb 23 05:00:47 time of day is a fairly poor predictor of whether I'm asleep though :P Feb 23 05:09:25 :p Feb 23 05:10:43 zmatt: was there anything else that you wanted to let me know? Feb 23 05:10:56 Well BBB was not with me yesterday so i had to rely on a guy who was handling it. Today Morning when i checked. SD card was sitting in slot but plugged out Feb 23 05:11:13 :/ Feb 23 05:11:18 thanks for helping out zmatt Feb 23 05:11:24 ^ Feb 23 05:12:43 SAK: lol... Feb 23 05:13:15 fouric: yeah, though I have limited time right now, but at least I wanted to give you a link to https://goo.gl/UHF2Fy Feb 23 05:13:45 fouric: it includes a map of the debug interconnect, which is what's hooked up to the APB-AP in DAP Feb 23 05:15:06 fouric: the AHB-AP connects directly to the L3 interconnect, the CPU's view of physical address space can found in the HASS tab Feb 23 05:18:30 fouric: for more documentation on the debug subsystem, see the Debug chapter of the DM816x TRM Feb 23 05:23:50 fouric: another overview that may be useful when doing baremetal programming is https://goo.gl/7YooOO Feb 23 05:34:32 fouric: oh, and to get bootrom to do bootp/tftp boot you'll need two wires (or preferably resistors, anywhere between 100 ohm and 10K is fine): pull sysboot0/lcd_data0 up to 3.3v and sysboot2/lcd_data2 down to ground. if they are pulled like that during power-on then ROM will attempt to boot from { spi, μSD, ethernet, uart } instead of the default { eMMC, μSD, uart, usb } Feb 23 05:36:26 * fouric finds the pins Feb 23 05:37:01 ah, so it's like holding the boot button while powering on? Feb 23 05:39:38 pulling sysboot2 down is like holding the boot button yes Feb 23 05:39:46 *awesome* Feb 23 05:39:54 I wish I had know about this months ago Feb 23 05:40:08 so that I could have avoided holding down that bloody button every single time I powered up Feb 23 05:40:31 that yields boot order { spi, μSD, usb, uart }. additionally pulling sysboot0 up replaces usb by ethernet in that Feb 23 05:40:41 * fouric was just about to ask Feb 23 05:40:45 perfect! Feb 23 05:40:50 you could just have wiped the MLO from eMMC Feb 23 05:41:53 this is also true Feb 23 05:42:23 a list of boot orders can be found on the Boot tab of my pins spreadsheet => https://goo.gl/Jkcg0w Feb 23 05:42:53 most of this info is of course also in the official docs, I just consolidated it in a way that I find convenient Feb 23 05:43:56 i need to get more used to reading datasheets, i suppose Feb 23 05:45:17 if the information was in a convenient format there, I wouldn't have made these spreadsheets Feb 23 05:45:20 :) Feb 23 05:46:54 oh, and a few of my baremetal headers can be found in the 'include' dir of this funky little project => https://github.com/dutchanddutch/jbang Feb 23 05:47:12 "self-jtag" Feb 23 05:47:13 it lets you do funny stuff like: https://liktaanjeneus.nl/iopin-test.cc.html Feb 23 05:47:15 oh gosh Feb 23 05:47:17 what is this Feb 23 05:49:01 zmatt: hm, what is "usb boot"? Feb 23 05:49:20 is the micro-usb header on the bbb attached to a serial adapter or something? Feb 23 05:49:29 it shows up as usb device, presents an RNDIS interface, and then proceeds to netboot over it Feb 23 05:49:37 wtf is RNDIS Feb 23 05:49:39 * fouric googles Feb 23 05:49:55 you meant mini-usb, not micro-usb Feb 23 05:50:05 (yes, that) Feb 23 05:50:19 RNDIS = usb ethernet Feb 23 05:50:27 like CDC-ECM Feb 23 05:50:43 hm, this looks very microsoft-y Feb 23 05:50:47 it is Feb 23 05:50:52 i feel like booting over ethernet is preferrable Feb 23 05:50:55 though linux supports it too Feb 23 05:51:14 (although, i would hazard to guess, not perfectly) Feb 23 05:52:18 either of 'em works, they're basically equivalent from linux' perspective, except that for usb boot you do need to ensure the usb0 interface is brought up (without configuring any address) when it shows up Feb 23 05:53:04 so all i need to do is install tftp, run dnsmasq with the config file in your repo, connect bbb (with pulldown and pullup resistors), and apply power, and my binary will get sucked over to the bbb and run? Feb 23 05:53:14 dnsmasq has built-in tftp Feb 23 05:53:19 :D Feb 23 05:53:44 oh man, you even have a "you need to customize" section of dnsmasq.conf Feb 23 05:53:46 you are a hero Feb 23 05:53:51 :D Feb 23 05:54:47 in case you're interested, this is the start.S from my own baremetal code => https://liktaanjeneus.nl/start.S.html Feb 23 05:55:30 this is essentially all you need to do in asm, the rest can be C/C++ with bits of inline asm to access special registers and such Feb 23 05:56:25 good to know! Feb 23 05:56:34 i was sort of aiming to write everything in assembly, though Feb 23 05:56:41 heh, ok :) Feb 23 05:56:56 the idea is to implement a little Forth in assembly, then maybe build a tiny OS off of it Feb 23 05:57:01 you are awesome Feb 23 05:57:21 I've never gotten around to porting my Forth for dm814x to am335x Feb 23 05:57:45 lol Feb 23 05:57:54 save the praise until i actually *write* something Feb 23 05:57:56 hehe Feb 23 05:58:06 oh, another useful thing probably => https://community.arm.com/processors/b/blog/posts/cortex-a8-translation-table-init-example Feb 23 05:58:18 ooh, what's this? Feb 23 05:59:39 wait Feb 23 05:59:44 does this configure the MMU? Feb 23 06:00:22 it initializes the translation table, which is the main part of work before turning on the mmu Feb 23 06:00:40 which is needed so you can enable the caches Feb 23 06:01:17 which you really want, since otherwise every load/store is Strongly Ordered hence takes about 150 ns instead of 1 cycle Feb 23 06:01:22 the...caches? Feb 23 06:01:26 like the l2 and l3 caches? Feb 23 06:01:31 l1d and l2 Feb 23 06:01:32 aren't those automatic? Feb 23 06:02:05 the cpu needs to know which memory regions are to be cached and which aren't Feb 23 06:02:10 OH Feb 23 06:02:15 i didn't even *consider* that Feb 23 06:02:27 * fouric was under the impression that the caches Just Did Feb 23 06:02:37 do you have the cortex-a8 trm ? Feb 23 06:03:13 no, although i have the am335x Feb 23 06:03:52 yeah obviously you need the am335x trm too, but when doing baremetal dev you want the docs on the cortex-a8 itself too Feb 23 06:04:02 got it Feb 23 06:04:09 http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344k/DDI0344K_cortex_a8_r3p2_trm.pdf Feb 23 06:04:47 ty ty Feb 23 06:06:28 i think i'm going to save all of these irc logs Feb 23 06:07:04 zmatt: you've been more helpful to me *than the entire internet* Feb 23 06:07:21 that's impressive Feb 23 06:08:14 fortunately the cortex-a8 r3p2 doesn't have any particularly bad errata. for some reason the errata doc is hard to find, so here's my summary of them: http://pastebin.com/raw/vGHUdCsb Feb 23 06:11:04 ...and thank you again! Feb 23 06:11:05 the third one is probably the only one that you may need to pay attention to, and maybe the second one if you want to use the performance counters for performance analysis Feb 23 06:11:27 A performance counter overflow event may be lost (incl associated interrupt) Feb 23 06:11:29 if the overflow happens during a write to certain CP14 and CP15 registers. Feb 23 06:11:35 ...that's...not good :/ Feb 23 06:12:48 no, but performance counters can increment at most twice per cycle, so if you poll the counters at least one per 2^31 cycles then you're guaranteed to be able to track their progress without confusion Feb 23 06:13:27 right Feb 23 06:13:33 it's not that it's crippling Feb 23 06:13:36 it's just...annoying Feb 23 06:13:48 no, that means polling once per 4 seconds or so is fine at 500 MHz Feb 23 06:14:00 (which is what you're running at) Feb 23 06:14:25 ...not 1GHz? Feb 23 06:14:28 oh Feb 23 06:14:30 let me guess Feb 23 06:14:44 default is 500MHz, you have to do power-management magic to make it work at the advertised frequency Feb 23 06:14:46 erratum #687067 needs another excellent workaround: just don't use BTB invalidate by MVA in the first place, it's unnecessary on the cortex-a8 Feb 23 06:15:24 correct, you'll need to have i2c working to communicate with the pmic and increase the cortex-a8's supply voltage Feb 23 06:15:31 then reconfigure its PLL Feb 23 06:16:10 or, you can let u-boot load your forth... but that's cheating ;) Feb 23 06:17:46 it would deprive you of the fun of experiencing the buggy i2c controller and its incorrect documentation Feb 23 06:17:53 XD Feb 23 06:20:28 zmatt: My rtc is resetting on each boot to 2000-01-01 Feb 23 06:20:39 I read using ntpdate etc didn;t found it Feb 23 06:20:58 3ez Feb 23 06:21:06 zmatt: thank you so much for your help Feb 23 06:21:09 i'll still be in this room Feb 23 06:21:12 ...but afk Feb 23 06:21:14 i have a writing paper to work on Feb 23 06:21:21 the "joys" of attending university Feb 23 06:21:25 I have to go to work :) Feb 23 06:21:29 gl hf Feb 23 06:21:31 o7 Feb 23 06:21:37 have fun! Feb 23 06:21:41 * fouric -> paper Feb 23 06:21:46 i am tring to install but it says ntpdate has no installation candidate Feb 23 06:22:09 SAK: that was probably deprecated in favour of ntp Feb 23 06:22:18 both should exist Feb 23 06:22:21 as that has a catch-up mode Feb 23 06:22:47 there's also another one better suited for not-always-internet-connected devices but I forgot its name Feb 23 06:23:03 ayup, https://packages.debian.org/search?keywords=ntpdate - it's still there Feb 23 06:23:29 of course if you care about that you might want to consider using an external rtc powered by a backup battery so it doesn't lose its date/time in the first place Feb 23 06:23:33 or just having a real battery backed RTC :) Feb 23 06:24:08 e.g. the pcf8523 uses only 150 nA typ Feb 23 06:24:10 ok so external rtc is inevitable Feb 23 06:24:23 (which is really crazy, how can you run an osc on that?!) Feb 23 06:24:26 i previously used ds107 i think Feb 23 06:24:42 than for some reason i stopped using it Feb 23 06:24:46 anyways thanks Feb 23 06:24:50 there are lots of RTCs of course Feb 23 06:25:21 is there anyways i can currently sync my BBB from the machine it is connected to Feb 23 06:25:22 ?? Feb 23 06:25:45 ntpdate, ntpd, or one of the alternatives Feb 23 06:25:58 systemd-timesyncd, and the one whose name I can't remember Feb 23 06:26:28 if you're using systemd then just 'systemctl enable systemd-timesyncd' and you're done Feb 23 06:26:41 it's not the world's greatest ntp client, but it works Feb 23 06:30:15 SAK: either you run ntpd on the host machine and enable it to act as a server for others or you hack something Feb 23 06:30:53 SAK: you can of course "ssh foo@bar date -s $bla" from the host, but that's not going to be very precise Feb 23 06:31:18 ok Feb 23 06:31:35 so ntp, ntpd and ntpdate didnn't worked for me Feb 23 06:31:54 systemdsync shows service as red Feb 23 06:31:58 i am working on it Feb 23 06:32:03 thanks guys Feb 23 06:32:30 well, if the device doesn't have a default route, then the default configuration will fail Feb 23 06:33:01 ok yes I'm assuming here you first get internet access working Feb 23 06:33:01 there probably is a way to make it a bit automagical by using multicast Feb 23 06:33:12 actually no Feb 23 06:33:27 you need internet access to install packages, but ntp *might* work automagically Feb 23 06:33:30 internet access is there Feb 23 06:33:33 ok Feb 23 06:33:48 (dhcp servers can specify a local ntp server to use) Feb 23 06:33:52 just pinged google and 8.8,.8 Feb 23 06:34:01 ok Feb 23 06:34:09 then ntpd should 'just work' Feb 23 06:34:13 well, I'm off Feb 23 06:34:28 alright zzmatt Thanks for being here for us Feb 23 06:34:40 yeah, I need to zombie shuffle to the office too, quite soon Feb 23 07:04:13 hello :) Feb 23 07:05:14 fouric: btw, as far as Forth implementation strategy goes, if you care about performance at all you'll want to use subroutine threading (i.e. native code generation). using direct threading will make the cortex-a8 branch predictor cry itself to sleep at night Feb 23 07:08:45 whether to use ARM code or Thumb-2 code doesn't matter hugely. I opted for thumb-2 to keep the option open of being able to generate code for cortex-M cores Feb 23 07:12:32 it also has the benefit of being more compact, which is always welcome when running out of internal SRAM (and it should make things slightly faster due to reduced instruction cache pressure) Feb 23 07:16:44 (even when interpreting I just compiled to a temporary buffer and executed that. if a control structure was used then it would continue compiling until the control stack was balanced again and then execute) Feb 23 07:21:49 ok now really afk Feb 23 10:04:06 thank you Feb 23 11:20:54 musb_hdrc is usb 2.0 or it represents usb 3.0 Feb 23 11:20:55 ?? Feb 23 11:42:07 dos RTL8191SU wifi work with BBB ? Feb 23 11:42:18 please , Feb 23 11:42:41 where can I check ? Feb 23 11:43:37 dunno, sorry : \ Feb 23 11:53:52 SAK: there's no usb 3 on the am335x Feb 23 12:46:18 alright stuck in weird thing. I will try to fix this issue myself this time. :p Feb 23 12:50:46 using 3.8.13-bone50 on bbb Feb 23 12:51:10 unable to get inet adress thought conncted to LAN Feb 23 12:53:02 getting inet6 address but not the inet address Feb 23 14:11:21 Hello Can anyone please help me with modbus setup for Beaglebone black over RS485? Feb 23 14:18:08 hello Feb 23 14:21:27 please have patience :slightly_smiling_face: Also maybe it would help if you describe how what steps you've taken and what problems you've encountered. Feb 23 14:28:26 Hello beagleslackbot. Thanks for your reply. I have worked with installing CAN on Beaglbone previously and got it to work successfully as I could find enough support for it online. With regards to Modbus communication over RS485 I am still looking for overlay files that will set up driver for Modbus communication when beaglebone boots up. After this setup I actually want to send the data available inside text file over modbus. Feb 23 14:40:56 Aks: why are you sending me a private message? I'm not a personal assistant Feb 23 14:41:07 Aks: I'm not an expert but if you have the RS485 cape working I wouldn't think you need any more overlay files. Have you looked into libmodbus? They mention supporting that cape. https://github.com/stephane/libmodbus/wiki/Beaglebone-RS485-cape Feb 23 15:05:53 most of the modbus implementations are incomplete at best .. frequently buggy too .. in my personal experience Feb 23 15:06:45 in the end I implemented one from scratch .. or rather significantly hacked something I downloaded .. with a reasonable amount of help from a colleague Feb 23 15:15:31 veremit: also, if this is about that combined CAN/RS485 cape, based on the schematics I have no idea how rs485 could possibly work at all on that thing Feb 23 15:15:43 it seems to have a drive conflict designed in Feb 23 15:16:30 zmatt: rings a bell .. fyi jktrip'ing :p Feb 23 15:17:17 jtrip* sorry .. how's ELC? slightly jelly :P Feb 23 15:17:46 beagleslackbot: !help Feb 23 15:19:58 Hi everyone! This is my first day with beagle and I need a good simple example to compile with PRU Feb 23 15:25:32 hello vermit yes it is that combined CAN/RS485 cape. May I know how did you implement Modbus Communication? Feb 23 15:27:01 veremit: oh I'm not at ELC, I wish! I'm just lazy about irc and use slack for a lot of things anyway Feb 23 15:27:29 lazy but not incapable ;) Feb 23 15:29:19 Hello beagleslackbot I will look into the link you have shared. thanks a lot Feb 23 15:43:03 jtrip: llol Feb 23 15:43:42 Aks: I downloaded something called "protocol:modbus" for perl .. but it was seriously incomplete .. so it needed a lot of rewriting Feb 23 15:50:06 Hello vermit thanks for the guidance. I will definitely look into it. Feb 23 15:51:25 Vermit, also I wanted to ask if you have shared completed to code online somewhere like github? Feb 23 16:50:55 Hi everyone ! I am an electronics and communication engineering sophomore from Delhi,India. I have worked with embedded systems and microcontrollers but i am still new to open source community.I would like to know if BeagleBoard will be offering internships this year under gsoc and where can i find information regarding it.Thanks :) Feb 23 16:55:35 namanb, I have not a clue, but you could check the official beaglebone google group ;) Feb 23 16:55:42 bye bye to everyone! Feb 23 16:58:24 Thanks for the suggestion lore4 :).I will check it out Feb 23 17:45:53 on the BBB, there's a yellow blob next to the USB port, which my smart friends tell me is a "polyswitch fuse". is that correct? it seems to stick out a little higher than the pinheader; isn't this problematic for capes that fit snugly? Feb 23 18:05:08 sgflt: yeah it's a polyfuse for the hdmi 5v... it hasn't caused any problems for us so far, though you could squish it if necessary :P Feb 23 18:05:36 zmatt: i've ran into a board that pretty much has a pin stick out right above the fuse. isn't that kind of problematic? Feb 23 18:06:57 also, the kicad template has a PCB shape that is not symetrical, i.e. it has a cutout for the ethernet port, but not the 5V barrel jack. what kind of pinheaders am i supposed to put on there? if i use perfectly fitting ones (no pins visible from the outside when plugged in), the barrel jack will block the PCB, as it is higher than the pinheaders. Feb 23 18:07:47 i've accidentally "solved" this problem by buying pins that are 5mm too long; now they are visible/accessible from the side, which i think is problematic. but that way it hits neither the fuse nor the 5V barrel jack. Feb 23 18:07:54 still, i'm wondering what the clean solution is here. Feb 23 18:15:06 is there some kind of "pin" protector i can put on the bottom side of the cape? Feb 23 18:19:37 sgflt: normally a header already keeps some distance between the pcb and the mating connector Feb 23 18:19:49 about 2mm I think? Feb 23 18:21:48 enough that the 5v socket isn't in the way, although it gets close to it Feb 23 18:22:11 only ethernet requires a cutout Feb 23 20:22:58 zmatt: well, measuring, my too-long pins stick out an extra 5mm (just the naked part between the pcb of the cape and the P8/P9 on the BBB) Feb 23 20:23:28 zmatt: the distance between the 5V connector and the PCB is just 2mm Feb 23 20:23:48 so i guess that means that i can shorten it no more than 2mm? Feb 23 20:27:34 ¯\_(ツ)_/¯ Feb 23 20:27:43 we just use regular headers and it always fits Feb 23 20:31:04 there's also quite a bit of slack in the pin length you can use since you can insert the pins deeper than strictly necessary to make contact Feb 23 20:34:01 the SRM dedicates quite a few pages on the expansion headers, including a diagram of the interior of the expansion headers Feb 23 20:37:52 although I agree the stackable cape construction as drawn would run into issues with components like the 5v power connector... but that's only a concern for stackable capes Feb 23 23:30:40 hi Feb 23 23:31:26 i have question about my bbb Feb 23 23:32:14 zmatt: thanks! =) **** ENDING LOGGING AT Fri Feb 24 03:00:00 2017