**** BEGIN LOGGING AT Tue Sep 15 02:59:58 2015 Sep 15 06:54:15 Hi, actually writing a driver for a DAC124S085, I need to send a 16bits word to the device so at 24Mhz this takes 650ns (scope validate that, the spi correctly send the sequency in 650ns when clock start), but calling the device from userspace I've a high jitter, and one shot call can takes 180us to proceed ... Sep 15 06:55:01 http://pastebin.com/T56MYgv9 this is time result Sep 15 06:55:57 What is taking so long to the driver ? >< spi_write from linux/spi/spi.h is very slow, do someone knows any way to improve that Sep 15 06:56:10 note that i'm on the preempt enable kernel Sep 15 06:57:30 http://pastebin.com/heMSxbBZ the driver code I wrote, if you see anything that can slow down so much the process ... Sep 15 06:58:10 note that if I comment out the spi_write call the function takes 2-3us ... so everythings come from the spi_write call Sep 15 06:59:45 the sequence * Sep 15 07:05:11 anyone ? :/ no idea ? Sep 15 07:11:28 Gwak: sorry, no idea Sep 15 07:11:38 ds2: ^^^^^ Sep 15 07:12:01 Gwak: you might instrument the spi_write call inside the kernel and see where it spends time Sep 15 07:12:31 av500: How can I trace the all call to spi_write ? Sep 15 07:13:35 spi_write in ftrace filter return bad argument >.< Sep 15 07:24:08 Gwak: add printks :) Sep 15 07:24:13 thats what I do :) Sep 15 07:28:16 inside the spilib ? Sep 15 07:29:00 how printks can help me on time spend ? :S they already increase a lot the execution time, printk timestamp ? Sep 15 07:30:11 hmm Sep 15 07:30:13 true Sep 15 12:04:33 av500: I'm actually trying to output a sinus on my analog output with the driver I wrote, I can see that everything is smooth (about 100Hz, one value every 10us) but sometimes the value stop for about 300us, i'm quite sure that this come from the scheduler interupting my task, how can I setup this ? I've a PREEMPT kernel and running the programm setting his priority to 99 doesn't change anything (chrt -f 99 ./ana-sinus) Sep 15 12:06:16 Gwak: I doubt that you can get reliable timing from user space Sep 15 12:06:30 also, I dont know whether PREEMPT helps you for that Sep 15 12:06:50 I think it might help you if you write a kernel driver that does the sine Sep 15 12:07:14 ye but useless that was just for a test :/ Sep 15 12:07:29 as said, user space timing is not reliable Sep 15 12:08:24 but that means the driver is able to respond quickly, I just don't undestand what makes it so slow sometime and so much jitter, a call can be 150us to write through spi, and average time is 10us if I spam the spi sysfs entry Sep 15 12:09:45 because it's a multitasking OS Sep 15 12:10:57 ye but setting nice value doesn't change the result Sep 15 12:14:15 Gwak: try to set your user space taks to SCHED_REALTIME Sep 15 12:15:06 Ye that's what i'm actually trying i'm reading some stuff on thread and scheduling Sep 15 12:15:09 pthread_attr_setschedpolicy(&thread_attr, SCHED_FIFO); Sep 15 12:15:16 thank :p Sep 15 12:15:32 you can only do that as root IIRC Sep 15 12:15:40 and basically it allows you user space task to hog the CPU Sep 15 12:17:04 but i've already tried SCHED FIFO with this cmd : chrt -f 99 ./ana-sinus, this launch the programm in fifo with priority 99, no change Sep 15 20:24:58 For the beaglebone black you can buy a 4.3" screen cape, but does anyone know if I can stack two? Sep 15 20:33:46 <_av500_> two screens? Sep 15 20:34:05 <_av500_> one hiding the other Sep 15 20:36:12 Well imagine I want to recreate something such as a one of those Nintendo DS portables Sep 15 20:36:40 Two screens that display some different output at the same time. Sep 15 20:41:20 I'm talking about a screen like this, that does not stack on top of each other: http://www.element14.com/community/dtss-images/uploads/devtool/image/large/Expansion+Board+for+BeagleBone+family+with+4.3+inch+LCD+5511ec1857684.png Sep 15 20:42:29 <_av500_> ah Sep 15 20:42:36 <_av500_> connecting two screens wont be easy Sep 15 20:42:46 <_av500_> you have one set of display signals from the CPU Sep 15 20:42:55 <_av500_> to drive two screen you need some tricker Sep 15 20:42:58 <_av500_> trickery Sep 15 20:43:04 <_av500_> its doable, but not "out of the box" Sep 15 20:43:17 I didn't expect it to be easy :) Sep 15 20:43:26 I'm just wondering about things such as power supply. Sep 15 20:43:37 <_av500_> something like an FPGA that takes a 2x sized signals and splits it out to two screens Sep 15 20:43:47 <_av500_> power supply is the least of your worries Sep 15 20:43:51 :D Sep 15 20:46:46 I think you'll struggle to find an arm device with two display interfaces you can multiplex easily Sep 15 20:47:17 you might be better trying with a bigger display and splitting it vertically Sep 15 20:47:56 But the hobby project I want to construct exists of two screens pointing away from eachother. Sep 15 20:48:31 use two beagles ;) Sep 15 20:48:51 and a lan cable between them .. pretty sure the port does auto-mdx Sep 15 20:49:03 That would work as well. Sep 15 20:49:15 Increases the cost a little, but would work :) Sep 15 20:49:16 quicker/cheaper :D Sep 15 20:49:23 How is it cheaper? :) Sep 15 20:49:37 you're not gonna get an fpga developed quick/simply .. Sep 15 20:49:47 My hobby time doens't cost money :D Sep 15 20:50:00 It's cheaper than going out drinking! Sep 15 20:50:06 true Sep 15 20:50:15 Anyway thanks for the information and hints guys! :) Sep 15 20:50:21 good luck Sep 15 20:50:36 It's not for now - if we ever get to start I'll be back :) Sep 15 20:50:50 I'm still trying to find a nice devboard to begin with. Sep 15 20:51:09 I want to write some basic games (pong clones, for example) as bare to the metal as is still realistic (e.g. in ARM Assembly) Sep 15 20:51:38 <_av500_> have fun Sep 15 20:52:11 hey anyone here? Sep 15 20:52:37 <_av500_> no Sep 15 20:52:40 I need help connecting a beaglebone black with Windows 7 through VirtualBox on a mac Sep 15 20:52:42 <_av500_> we closed for the night Sep 15 20:52:52 _av500_: :( Sep 15 20:52:56 :( :( Sep 15 20:53:48 dcarr: you'll need to be more specific. Sep 15 20:53:51 after I run the bone_64.exe installer thing, where does it put the driver files Sep 15 20:54:16 I'm really just having trouble locating the drivers Sep 15 20:54:30 wow, I wrote bone_d64.exe and I don't know.... mostly because Windows already has the drivers. I just give it an .INF file to tell it to use them. Sep 15 20:54:49 The device connects fine, I just get a code 10 device won't start Sep 15 20:54:59 hahahah so what would you recommend Sep 15 20:55:06 here's the INF: https://github.com/beagleboard/beaglebone-getting-started/blob/master/Drivers/Windows/src/files/RNDIS/linux.inf Sep 15 20:56:05 have you rebooted your machine since installing the drivers? Sep 15 20:56:43 I'm assuming your machine doesn't show a new network connection.... Sep 15 20:57:02 yeah I have Sep 15 20:57:08 not sure what you mean Sep 15 20:57:27 if you are saying that it is working (ie., you can browse to 192.168.7.2 and all), then it might be just one of the other devices, and not the RNDIS device that isn't working. Sep 15 20:57:28 in devices and printers it shows beaglebone black under unspecified Sep 15 20:57:45 BeagleBone looks like 3 devices: network, file storage and serial. Sep 15 20:57:53 I can't browse to that IP Sep 15 20:58:02 also what do I do with the .inf file Sep 15 20:58:07 ok, then the RNDIS driver might not be loading. Sep 15 20:58:08 sorry I don't do windows Sep 15 20:58:21 that goes for most of us here. :-D Sep 15 20:58:51 fair enough but I already installed all the software I need for this class on my windows VM, so I'm in it now Sep 15 20:58:57 given that you are running in a VM, there are many points of possible failure. Sep 15 20:59:14 "in it now"? Sep 15 20:59:34 in too deep to want to reinstall everything on linux or something Sep 15 20:59:43 any chance your VM host is picking up the network device? Sep 15 20:59:47 yeah I agree, but it doesn't seem to be the VM that's struggling Sep 15 20:59:52 I'm not sure, how could I check Sep 15 21:00:58 my mac doesn't seem to be acknowledging it at all so I doubt it Sep 15 21:01:23 k, there is a different (HoRNDIS) driver for the Mac. Sep 15 21:01:43 have you tried doing the "Update driver" thing on the Windows image and manually pointing to the .inf file? Sep 15 21:02:54 haven't, still trying to download the inf file Sep 15 21:03:08 I'm so stupid, how do I download it from the github link Sep 15 21:05:17 vm may need extras for usb suport Sep 15 21:06:24 certainly the case with virtualbox anyway Sep 15 21:06:42 I've used an altera board through virtualbox in the past, I think I have the filters set alright Sep 15 21:06:44 dcarr .. have you plugged it into a switch via the rj45 jack? Sep 15 21:06:47 you can use this link: http://beagleboard.org/static/Drivers/Windows/src/files/RNDIS/ Sep 15 21:07:03 I do not know what that means at all veremit Sep 15 21:07:12 can't beat an old fashioned network cable Sep 15 21:08:36 any thoughts on what folder I should save the .inf in? Sep 15 21:08:46 dcarr: it is a solid work-around idea to use Ethernet. Sep 15 21:08:56 just the downloads folder should be fine Sep 15 21:10:56 * veremit cusses jkridner for his enthusiasm for usb gadget :P Sep 15 21:11:10 :-) Sep 15 21:11:16 it is awesome. Sep 15 21:11:29 I swear .. 3/4 of beagle problems stem from that bloody usb otg port Sep 15 21:11:33 some operating systems simply have stupid driver distribution models. Sep 15 21:11:46 most OS's Sep 15 21:11:47 works perfect on Linux hosts... I do all my workshops with Chromebooks. Sep 15 21:11:58 jkridner .. depends on the kernel Sep 15 21:12:13 only had an arch query this weekend Sep 15 21:12:16 98.2% of Linux kernels are fine. Sep 15 21:12:27 yeah more like about 50 Sep 15 21:12:49 although, granted .. probably about 70% out there are in mobile devices Sep 15 21:12:50 really? I don't find that many people compiling out tons of USB host modules. Sep 15 21:13:00 oh.... that's different. Sep 15 21:13:03 hmph Sep 15 21:13:06 I don't think 95% of people actually compile a kernel Sep 15 21:13:12 nothing seems to have happened Sep 15 21:13:19 all the major distros include USB RNDIS host support. Sep 15 21:13:29 dcarr: you requested the driver update? Sep 15 21:13:35 it comes up as a USB Composite Device, is that right? Sep 15 21:13:43 dcarr: and it says "OK"? Sep 15 21:13:45 dcarr .. that's a start Sep 15 21:13:50 yes, it is a USB composite device. Sep 15 21:13:57 it should spawn another 3/4 devices Sep 15 21:14:30 veremit: the fact that people can get power and network over a single cable is really great to avoid having to go shopping and work with stuff many people don't know. Sep 15 21:14:31 * veremit had fun the first time I plugged my phone into usb as a usb hotspot Sep 15 21:14:31 right, so I go, properties, change settings, blah blah, and I made a folder that contains only the linux.inf file and pointed it there Sep 15 21:14:40 jkridner .. PoE :) Sep 15 21:14:47 which in hindsight sounds silly Sep 15 21:14:53 veremit: because EVERYBODY has PoE. :) Sep 15 21:15:00 they will soon :) Sep 15 21:15:15 i really have no idea what I'm doing Sep 15 21:15:35 dcarr .. the 'Composite device' install wizard should cause another 3 more to appear Sep 15 21:15:37 distros are evil. Sep 15 21:15:52 "change settings"? not "update driver"? Sep 15 21:15:57 i didn't get an install wizard Sep 15 21:15:59 at least in my experience Sep 15 21:16:03 update driver is under change settings Sep 15 21:16:15 k. Sep 15 21:16:16 ok .. remove the device completely .. and delete its driver Sep 15 21:16:21 * jkridner is mostly reading from https://support.microsoft.com/en-us/kb/943104 Sep 15 21:16:31 what does running the bone_d64.exe even do Sep 15 21:16:56 dcarr: which vm are you running? virtualbox? Sep 15 21:17:18 I run it and it tells me 4 drivers were installed, but they're nowhere to be found Sep 15 21:17:19 yes Sep 15 21:17:22 jkridner .. I remember installing an hp printer once via usb .. and after the second attempt, deleting manually all the installer files in c:\windows\system32 ........ Sep 15 21:17:29 dcarr: bone_d64.exe runs "dpinst" which essentially does the same thing as "update driver" across the 3 different drivers. Sep 15 21:18:10 should I toss the linux.inf file in c:\windows\system32\drivers Sep 15 21:18:19 thankfully, driver installers are a little more brutal these days Sep 15 21:18:34 but never expect Anything to work First Time with windows ... lol Sep 15 21:18:36 or something Sep 15 21:19:05 dcarr: https://forums.virtualbox.org/viewtopic.php?f=3&t=3262 says "go into your Dash settings and go to Connections > USB to PC and disable advanced network functionality" Sep 15 21:19:13 of course, that was from 2007 Sep 15 21:19:32 oh... rats... Sep 15 21:19:32 yeah I don't have a connections menu Sep 15 21:19:49 that isn't for virtualbox, they are saying turn off the RNDIS on the device. :( Sep 15 21:20:33 hahaha Sep 15 21:20:56 so there's an option in virtualbox that's greyed out under device filters that says enable USB 2.0 (EHCI) Controller Sep 15 21:21:04 and I feel like that needs to be checked Sep 15 21:21:08 https://groups.google.com/forum/#!topic/beagleboard/-HBwQdkuzes suggests installing http://developer.toradex.com/knowledge-base/how-to-install-microsoft-rndis-driver-for-windows-7 Sep 15 21:21:08 but I can't check it Sep 15 21:21:27 dcarr .. you need the virtualbox extras package .. it enables usb2 support Sep 15 21:21:31 otherwise its 1.1 only Sep 15 21:22:13 I remember running into this problem with the altera board and not being able to check that, tried installing extras and everything, but it ended up just working Sep 15 21:22:15 which was weird Sep 15 21:22:17 but nice Sep 15 21:22:51 I had to get the extras and another bodge to get usb boot working in a virtualbox VM Sep 15 21:23:00 wanted to make a linux vm Sep 15 21:23:16 ah yes .. under windows :) Sep 15 21:23:18 do you know where I can find the extras Sep 15 21:24:33 https://www.virtualbox.org/wiki/Downloads .. under the "expanson pack" Sep 15 21:25:47 yes I remember now .. you fudge a raw device to the usb so the virtualbox 'bios' finds it on init Sep 15 21:26:02 but that's an aside :) Sep 15 21:26:30 Once it works .. its fine :) Sep 15 21:27:44 checking your virtualization extensions are turned on in the bios is a good check too Sep 15 21:38:02 alright so stuff is happening Sep 15 21:38:05 now that I enabled 2.0 Sep 15 21:38:18 it's trying to install the drivers, we'll see Sep 15 21:38:27 oooooohh it's working let's go Sep 15 21:38:50 SWEET it works Sep 15 21:38:54 thanks guys Sep 15 21:46:27 np congrats Sep 15 23:28:03 Does anyone know how to fix the "no unused FET found" error? **** ENDING LOGGING AT Wed Sep 16 02:59:59 2015