**** BEGIN LOGGING AT Tue Jun 07 02:59:58 2016 Jun 07 05:10:03 alexhiam: there? Jun 07 05:47:30 alexhiam: ping.. Jun 07 08:57:04 HAHAH ! got a blinky ! Jun 07 08:57:33 but, i probably burnt some of the pins .. wrong resistor :( Jun 07 08:58:00 I thought 20mA will be tolerable, then read that it should be about 6mA Jun 07 08:58:27 pru blinky on all the pru pins ! (except those that i burn out ) Jun 07 11:15:05 ZeekHuge - just how many pins did you burn? Jun 07 11:15:11 *ouch btw* Jun 07 11:15:22 2 probably .. :( Jun 07 11:15:34 wait .. Jun 07 11:19:07 jic23, out of P8 27,28,29,39 to 46 ... i can see only 43,44,45 and 46 responding ... :( Jun 07 11:20:54 hmm. Sounds like a lot to have fried... Jun 07 11:21:07 and .. I dont think that i have got the wrong configuration, but some one will have to test that .... Jun 07 11:21:23 might be worth checking the test - in particular that all pins are in the right mode. Jun 07 11:21:23 https://github.com/ZeekHuge/BeagleScope/tree/master/examples/pru_blinky Jun 07 11:21:36 hmm. no beagle bone with me at work so will leave for someone else. Jun 07 11:21:55 Yep, did that . They are in right made. Jun 07 11:22:02 still - on the plus side it worked ;) Jun 07 11:22:04 okay. Jun 07 11:22:14 All well documented? If not that might be very handy to do. Jun 07 11:22:40 Maybe even a nice detailed blog post of all the steps it took... Jun 07 11:22:46 Useful for others (me for example ;) Jun 07 11:22:56 will document it before all are up here .. Jun 07 11:23:02 cool. Jun 07 11:23:18 yeah .. have thought of, but lagging behind the schedule in the project itself Jun 07 11:23:21 so later, Jun 07 11:23:45 good win for the week to have those docs done. Even if off schedule. Jun 07 11:25:03 btw I blew up a mere 14 boards testing over the last few weeks - not as complex as the BBB, but being specials, rather more pricey each. It happens! Jun 07 11:25:52 (particularly when the 5V line is right next to the 12V one...) Jun 07 11:26:18 jic23, .. what should be the next part i should worry about .. at present before the next meet, I am trying to get the 16 bit capture mode on the pru (that will be firmware side). Then I will try to make a simple module to communicate to pru through remoteproc and rpmsg. I have made some notes too .. need to do some brushing and then will put it on repo Jun 07 11:26:35 Mind you yesterdays discovery of fun was that on some boards the '12V' line was actually fed by a 15V reg... Jun 07 11:27:09 Can you read much back from PRU at the mo? Jun 07 11:27:16 or is it all a bit output only. Jun 07 11:27:25 Capture looks likely to be easy compared to that. Jun 07 11:27:42 back in asec - need coffee refill! Jun 07 11:29:37 Yes .. there is an example by TI, that echoes back. Jun 07 11:29:42 hmm. I recon there is a market for a electronics hobbiest hardened board with protection diods on every pin. Jun 07 11:29:44 Cool Jun 07 11:29:55 working fine I assume? Jun 07 11:30:17 If so guessing a bodge of that and some of the beaglelogic firmware ought to get you there in an hour or so? Jun 07 11:30:23 it exposes a dev file. /dev/rpmsg30 Jun 07 11:30:35 and then we just need to echo and listen to it Jun 07 11:30:56 yes . perfectly fine. Jun 07 11:31:22 cool, that's actually fairly straightforward - I haven't yet looked at the new code. Jun 07 11:31:26 Ah, was beagle logic all ASM? Jun 07 11:31:37 a part was. Jun 07 11:32:15 Anyhow, capture didn't look too complex - do manual readout of inputs first though as that's an easy win on what you have now. Jun 07 11:32:23 https://github.com/ZeekHuge/BeagleLogic/tree/master/beaglelogic-firmware Jun 07 11:32:26 See how you get on. Jun 07 11:32:41 yeah. Jun 07 11:33:56 might be really nice to do a C only version of beaglelogic and characterize it wrt to the original version (though for that you'd need to drop back in kernel version etc so that runs). Jun 07 11:35:05 might be fine to characterize against Abishek's original docs rather than actually fire it up. Jun 07 11:35:40 Anyhow - good luck. Will be about, but PRU side is out of my comfort zone as I've never actually fired it up. Jun 07 11:35:42 :) Jun 07 11:45:24 ZeekHuge - I'm suffering boredom whilst something builds - could you post a link to the TI examples you are using? Jun 07 11:48:00 jic23, yeah .. Jun 07 11:48:03 just a sec Jun 07 11:48:12 https://git.ti.com/pru-software-support-package Jun 07 11:49:03 ZeekHuge - thanks! Jun 07 12:33:10 alexhiam: can we have the meeting today? Jun 07 14:24:06 alexhiam: did you check this out?? it seems bmp180 works via the bmp085 kernel which was removed in 4.x kernel!!! Jun 07 14:24:24 alexhiam: I did not check it though.. Jun 07 14:30:25 kiran4399: that was a non-iio driver? Jun 07 14:32:07 kiran4399: are you having trouble with the bmp280 iio driver? Jun 07 14:47:07 kiran4399: did you get the imu working? Jun 07 14:48:10 kiran4399: I /really/ do want to see a wiki page, or even just a .txt file in the repo, where you're documenting your progress getting these sensors tested Jun 07 14:51:31 otherwise you're not hitting the required 5 days/week of pushing content... Jun 07 14:55:04 hey bradfa! Are you there? Jun 07 15:01:59 bradfa, I researched a bit on the memory problem.It turns out that I have to reduce the variable size and stuff to get it under 4K size. I am going through their guide about compiler optimization. Jun 07 15:02:18 bradfa, Take a look:https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/253360 Jun 07 15:02:48 * chanakya_vc going afk but will be online in two hours again. Jun 07 15:34:28 alexhiam: Alright.. do you want me to create a wiki? Jun 07 15:34:46 kiran4399: yes please Jun 07 15:35:11 alexhiam: Alright I am on it.. BTW.. when shall we have the meeting? Jun 07 15:36:28 kiran4399: maybe after the meeting tomorrow? everyone is sure to be online then Jun 07 15:36:42 kiran4399: you're not stuck at the moment, right? Jun 07 15:36:44 alexhiam: I have a quick question.. Jun 07 15:37:02 alexhiam: no.. Jun 07 15:37:28 alexhiam: On the basis of what will my mid-evaluation be? In other words what should I be doing to make sure that I don't fail in mid-term? Jun 07 15:44:33 kiran4399: well, we gotta try to get back on track with the timeline in your proposal. The big thing right now is getting those drivers up and running so you can start on the APIs, that really should have been sorted out by now. After that probably comes the PRU stuff Jun 07 15:45:02 plus, making sure to be pushing code and/or notes/instructions to github 5 days/week from here on out Jun 07 15:45:24 alright.. Jun 07 15:47:15 alexhiam: when I instantiate an i2c device.. should I do it on bus-0 or 2? Jun 07 15:49:02 kiran4399: when you do it through the device tree it's by the actual I2C module number according to the AM335x. On the other hand, the numbers assigned by linux (e.g. /dev/i2c-X) just correspond to the order in which the buses were enabled Jun 07 15:51:40 alexhiam: alright.. so even this is failing.. http://pastebin.com/KYB27Fkr Jun 07 15:52:48 kiran4399: what's triggering the probe? DT overlay? Jun 07 15:53:12 wait, bmp085? you want the bmp280 Jun 07 15:53:29 alexhiam: bmp280 is not working with 180.. Jun 07 15:54:17 kiran4399: the driver says it works for both and that's a super common part, I would be very surprised if that were the case Jun 07 15:54:26 plus, according to the schematic it is a bmp280 Jun 07 15:54:55 what makes you say it's not working? this is the kind of stuff that needs to be documented on a wiki page Jun 07 15:55:20 i.e. all the steps you've taken, plus any code pushed to the repo Jun 07 15:57:52 alexhiam: well I am saying on the basis of instantiating the device, loading the appropriate kernel module and chiecking with i2cdetect to see if it is recogonized on the bus.. alternatively.. using dmesg Jun 07 15:58:16 kiran4399: I wanna see all that stuff! Jun 07 16:40:31 amragaey: hi! Jun 07 16:42:34 amragaey: why update the jquery terminal? Jun 07 16:42:49 amragaey: I haven't seen any BBUI related commits this week. Jun 07 16:43:00 amragaey: I think you should be done with tests now, yes? Jun 07 16:44:00 amragaey, alexhiam: I changed the default repo from 'master' to 'gh-pages' to make sure we are updating what appears on the live pages. Jun 07 16:44:27 I still need to update the packaging, but I really hate the Debian packaging scripts. Jun 07 16:46:31 hi jkridner Jun 07 16:46:53 alexhiam: Can you tell me how to enable the interrupt pin in the pinmux? Jun 07 16:47:09 I found an error in console related to jquery terminal, it was an old version causing this. Jun 07 16:47:35 kiran4399: in your overlay? Jun 07 16:47:37 kiran4399: have you found in the TRM where it documents the pinmux? Jun 07 16:48:01 amragaey: k, but this is a bit of a distraction from BBUI. Have you gotten started on it? Jun 07 16:48:25 jkridner, I finished my exams two days ago.. just updated this library and started working today on it Jun 07 16:48:55 jkridner, I was looking for canvas debugger, do you have an idea ? Jun 07 16:49:14 I'm starting with drawing the graph Jun 07 16:49:36 alexhiam: yeah.. in https://github.com/kiran4399/bb_blue_api/blob/master/install_files/2016-05-01/BBBMPU6050-00A0.dts Jun 07 16:49:44 jkridner: TRM? Jun 07 16:49:57 kiran4399: AM335x Technical Reference Manual. Jun 07 16:50:50 amragaey: Chrome dev-tools has a Canvas Inspector. Jun 07 16:50:55 kiran4399: there's also lots of examples here: https://github.com/RobertCNelson/bb.org-overlays/tree/master/src/arm Jun 07 16:51:08 http://www.html5rocks.com/en/tutorials/canvas/inspection/ Jun 07 16:51:09 kiran4399: what part are you wondering about? Jun 07 16:51:33 alexhiam: I was wondering if I did not enable the pinmux for gpio p9_25 Jun 07 16:51:55 jkridner, I followed this article but it's no more available for chrome 44 and above Jun 07 16:52:05 oh. :( Jun 07 16:52:14 kiran4399: if it's not in the overlay and you didn't do it with config-pin, then it's likely not muxed correctly Jun 07 16:53:14 amragaey: what about simply stepping through the JavaScript code and seeing the output? Jun 07 16:53:19 kiran4399: if you have specific DT questions you can't find answers to then ask away, but I can't just tell you what to do. You're the one getting paid to do the work, after all ;) Jun 07 16:53:39 amragaey: maybe Firefox? https://hacks.mozilla.org/2014/03/introducing-the-canvas-debugger-in-firefox-developer-tools/ Jun 07 16:54:01 cooool Jun 07 16:54:27 alexhiam: just tell me why do we use pinmux? Jun 07 16:56:03 kiran4399: the processor has way more signals that physical pins, so it has a multiplexer subsystem to let the user choose which signals are routed to which pins (google 'beaglebone pinmux' ;) Jun 07 16:58:06 jkridner, yes I'm thinking of this solution for now Jun 07 16:59:43 jkridner, I read this topic too, but still didn't find it.. I'll make another try Jun 07 17:01:59 you will find commits the next days for BBUI : ) Jun 07 17:03:12 alexhiam: are you sure I don't need to modify the line in am335x-boneblack.dts if I want to speed up the i2c bus to 400 Hz? Jun 07 17:03:37 alexhiam: I anyway am changing it in my overlay.. Jun 07 17:03:50 kiran4399: yeah, the overlay overwrites it Jun 07 17:04:18 kiran4399: am335x-boneblack.dts shouldn't be changed, that's the base of all the different beaglebone variants Jun 07 17:05:17 kiran4399: am335x-boneblue.dts could change it to 400kHz - the only thing is that you want to make sure the bmp280 can support 400kHz I2C Jun 07 17:38:41 jkridner: does TI have better qty pricing for the WL1835MOD than is listed on their site? Jun 07 17:38:52 it seems so darn expensive Jun 07 17:39:26 jkridner: I'm working on a KiCad design with the OSD3358 and would like to have WiFi/BT Jun 07 17:41:18 would be nice to use the same chipset as the green wireless, but I was hoping for something cheaper Jun 07 17:45:07 bradfa, I am back.Are you there? Jun 07 17:47:54 alexhiam,bradfa,mdp,jic23 Just had a doubt in PRU...Does the compiler only support int. I mean I am trying to compile with char and short and it is giving the error that stdchar/stdshort not found . Jun 07 17:49:07 chanakya_vc: use stdint.h Jun 07 17:49:29 e.g. uint8_t Jun 07 17:50:34 stdint contains definition for all the data types? Jun 07 17:50:39 alexhiam, ^^ Jun 07 17:50:40 and you probably will always want unsigned Jun 07 17:50:49 chanakya_vc: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdint.h.html Jun 07 17:52:23 nicer to write, and guaranteed widths Jun 07 17:52:52 alexhiam, It did compile Jun 07 17:53:36 But I was using char to only use 1 byte because I needed to reduce the memory used by the binary Jun 07 17:54:15 yeah, uint8_t is guaranteed 8-bits Jun 07 17:54:41 alexhiam, So char==uint_8 right? Jun 07 17:54:42 (char is technically only guaranteed to be /at least/ 8-bits, though I don't know of a compiler where it's not...) Jun 07 17:54:52 chanakya_vc: hi Jun 07 17:55:02 no, uint8_t most likely == unsigned char Jun 07 17:55:03 chanakya_vc: I pushed a few more commits to my wip branch if you want to take a look Jun 07 17:55:07 bradfa, Hey I got it to compile Jun 07 17:55:11 I have a major preference for uint8_t as well. Jun 07 17:55:34 chanakya_vc: char is signed, which can get you into trouble Jun 07 17:55:58 chanakya_vc: if you want a specific bit width variable and to know if it's signed or unsigned, use stdint.h values Jun 07 17:56:04 I just changed all the int to short and char(will replace with uint_8) and it compiled bradfa : ) Jun 07 17:56:12 generally speaking, stdint is preferred for embedded stuff. IMO it's better for everything always Jun 07 17:56:30 chanakya_vc: scanf() is huge, one commit I have removes that and fixes compile size, too Jun 07 17:56:40 bradfa, I havent seen your commit Jun 07 17:56:41 not sure why you're trying to do scanf() but... Jun 07 17:56:43 chanakya_vc: again, short is signed, be careful. uint16_t is likely what you want there Jun 07 17:56:47 I removed scanf Jun 07 17:56:55 bradfa^^ Jun 07 17:57:00 alexhiam, Okay got it Jun 07 17:57:04 chanakya_vc: two most recent comits on: https://github.com/bradfa/PRU-I2C_SPI_master/commits/wip-on-spi-bradfa Jun 07 17:57:16 foreverska_, I will surely use that. Jun 07 17:59:28 bradfa, Did you manually check for the whitespace issues? Jun 07 17:59:56 Or did you use something else. I try to be very careful not to give any extra spaces Jun 07 18:00:12 But it just happens. Jun 07 18:01:06 bradfa, Using scanf was not a great idea since the values of CPOL AND CPHA is going to be coming from shared memory Jun 07 18:01:47 So for now I am manually going to be giving them values and checking the o/p waveform.What do you think? Jun 07 18:04:55 chanakya_vc: yes, just a quick manual cleanup for style, there's still some style violations if you were wanting to follow the linux code style Jun 07 18:05:09 chanakya_vc: in vim, the '=' retab tool works nicely :) Jun 07 18:05:28 bradfa, I use sublime :( Jun 07 18:05:48 chanakya_vc: CPOL and CPHA are both binary values, so all you need is to check a single bit for each Jun 07 18:05:51 chanakya_vc: never tried it, but it should have a "reindent" capability I'd think Jun 07 18:06:45 alexhiam, Yes . So no type is less than 8 bits. Jun 07 18:06:46 chanakya_vc: sublime has "tab_size" and "translate_tabs_to_spaces" settings that do a pretty good job of keeping things nice Jun 07 18:07:20 chanakya_vc: yeah, I just mean string processing is waay overkill. You could probably fit all your config into a single 32-bit value in the shared mem Jun 07 18:07:37 alexhiam, My logic for calculating choice is based on the fact that the two are binary values. Jun 07 18:07:51 alexhiam, So how do you suggest I do it? Jun 07 18:08:11 declare bool? Jun 07 18:09:17 chanakya_vc: I'm just talking about passing config data through the shared mem. It can probably all fit in 32-bits, so that's a uint32_t, where the driver side sets the config bits in it and the PRU side checks the state of the config bits Jun 07 18:10:37 alexhiam: they've done something a bit strategic for Beagle, but you pretty much need to be pretty high volume to get a good price on it. Jun 07 18:11:03 Okay alexhiam ,I have yet not written that.But the basic SPI module is complete. Jun 07 18:11:39 bradfa, I will push my code to git and perhaps you could also compile it and see if it is working on your system? Jun 07 18:11:59 jkridner: I figured as much. I'll probably look around for something cheaper. Or maybe ditch wireless for now and do a real simple design, though I was planning on leaving out the USB host, so that would mean no network connectivity... Jun 07 18:12:08 chanakya_vc: I can compile test and look at it but I won't have time to run it today, sorry, have some other things I have to complete. Jun 07 18:12:34 chanakya_vc: if you can run it, capture the output with your logic analyzer and post pretty pictures Jun 07 18:12:46 chanakya_vc: and don't forget your weekly report today (unless you've already sent it) Jun 07 18:12:55 bradfa, Okay np. But I so do want to take pictures with the logic analyzer Jun 07 18:13:49 bradfa, No I haven't sent in the report because I thought that I would attach the pics along with it.But I guess I can send them in later? Jun 07 18:14:02 Maybe tomorrow?bradfa? Jun 07 18:14:24 chanakya_vc: if you have time to get the pics before sending the status report, do that. but if not, just make sure you send out the status report before end of day for USA today Jun 07 18:14:44 okay bradfa.Sure. Jun 07 18:15:09 bradfa, Do you think my progress is slower than others? Jun 07 18:15:09 chanakya_vc: for your presenting tomororw at the meeting, it would be great to have logic analyzer plots to show :) Jun 07 18:15:26 chanakya_vc: don't worry about the rate of progress of others, focus on your project Jun 07 18:15:48 * bradfa has no idea what the progress of others is anyways Jun 07 18:16:05 bradfa, Yes definitely.I will definitely post it before tomorrow. Jun 07 18:16:11 the pics Jun 07 18:16:34 bradfa, No because the midsem evaluation are not that far away : ) Jun 07 18:18:29 bradfa, I will work on it.Push the code on github.Maybe then you could test it. Jun 07 18:20:16 chanakya_vc: I will take a look at your code, yes Jun 07 18:20:22 bradfa, Might have to struggle with sigrok.But I am going to get it working today : ) Jun 07 18:29:28 kiran4399: don't forget to post your progress report today! Jun 07 18:29:44 alexhiam: yeah.. sure.. Jun 07 18:29:51 [ 73.585284] inv-mpu6050-i2c: probe of 2-0068 failed with error -121 Jun 07 18:30:01 alexhiam: any idea? Jun 07 18:30:18 kiran4399: not without seeing what you did to get that... Jun 07 18:30:53 alexhiam: modprobe inv-mpu6050-i2c and then loaded my overlay into the slots.. Jun 07 18:31:40 ah, skip the modprobe Jun 07 18:31:52 that's probably what's generating that error Jun 07 18:32:19 do a reboot then just load the overlay Jun 07 18:34:39 does this compile? https://github.com/kiran4399/bb_blue_api/blob/master/install_files/2016-05-01/BBBMPU6050-00A0.dts#L47-L48 Jun 07 18:37:56 kiran4399: I really need to see the steps you're taking - i.e. the commands for compiling that overlay, loading the overlay, etc. and all the output those commands give, any relevant dmesg lines. Because this stuff doesn't involve writing much code you really need to be pushing a diary of what you're doing Jun 07 18:40:29 alexhiam: when I load the overlay.. Jun 07 18:40:44 does it automatically load the necessary kernel modules? Jun 07 18:41:04 yeah, that's what the compatible property is for Jun 07 18:43:49 alexhiam: can you please look at the overlay and see if you can spot some errors? Jun 07 18:43:50 https://github.com/kiran4399/bb_blue_api/blob/master/install_files/2016-05-01/BBBMPU6050-00A0.dts Jun 07 18:45:10 kiran4399: I'd take out the mount-matrix, I don't think the current version of the driver uses it Jun 07 18:46:13 alexhiam, You had referred me to this page http://git.ti.com/pru-software-support-package/pru-software-support-package/blobs/master/examples/am335x/PRU_access_const_table/PRU_access_const_table.c#line102 Jun 07 18:46:48 alexhiam, But this is not accessing shared DDR mem ? Jun 07 18:50:32 chanakya_vc: ah, no, that's not the DDR RAM Jun 07 18:50:55 that's the 12kB shared RAM in the PRU-ICSS Jun 07 18:51:28 is that not accessible from the ARM? Jun 07 18:52:21 alexhiam: are you sure about the interrupt mapping?? Jun 07 18:52:27 Yes.So the problem still remains.When you had told me to declare a pointer and do it ,I am not sure that the pointer that I declare will point to the shared DDR mem or this shared RAM? Jun 07 18:52:30 that <21 1> and gpio3?? Jun 07 18:52:37 does it corresponds to P9.25? Jun 07 18:52:59 alexhiam, ^^ I am not sure about that.Will have to check.I don't think so Jun 07 18:53:00 chanakya_vc: no, the DDR is accessed through the L3 interconnect Jun 07 18:53:19 kiran4399: I think so, it's GPIO3_21 Jun 07 18:53:42 alexhiam: what do you think of this? Jun 07 18:53:43 https://gist.github.com/gnitnaw/97ed8cdd220ede655490 Jun 07 18:53:58 alexhiam, Okay so simply declaring a pointer will work?I am a bit confused regarding this. Jun 07 18:54:20 chanakya_vc: no, a pointer will definitely not work Jun 07 18:54:47 chanakya_vc: Abhishek_ may know more, I think beaglelogic uses a chunk of DDR RAM, doesn't it? Jun 07 18:55:09 Yes. I should ping him. Jun 07 18:55:22 kiran4399: but as jic23 said, the probe will fail if there's no interrupt given Jun 07 18:55:37 kiran4399: also it's on I2C2 Jun 07 18:56:03 Abhishek_, Hey ! Can you please tell me the way you used in beaglelogic to let the PRU's communicate with the shared DDR mem? Jun 07 18:56:25 alexhiam: what about L16? Jun 07 18:56:40 I wrote mpu6050.. but in the gist it is inv-mpu6050 Jun 07 18:59:31 kiran4399: looks like mpu6050 is right: https://github.com/beagleboard/linux/blob/4.4/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c#L170 Jun 07 18:59:47 Abhishek_, ,alexhiam,I think the way to do that is via RPMsg and you can't actually create data buffers manually in the shared mem. Jun 07 19:02:51 Which is bad news in the new kernel :( Jun 07 19:03:22 kiran4399: ah, the second cell in the interrupts property configure the interrupt: http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt#L67 Jun 07 19:03:54 (the gpio modules do use 2 cell interrupts: https://github.com/beagleboard/linux/blob/4.4/arch/arm/boot/dts/am33xx.dtsi#L345) Jun 07 19:06:56 kiran4399: so I guess we want <21 2> for a falling edge interrupt Jun 07 19:07:22 kiran4399: and the first number is the gpio number, so 21 is right: https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio-omap.txt Jun 07 19:08:55 actually I'm note sure, I'm just assuming it's active low.... Jun 07 19:09:39 kiran4399: nope, looks like 1 is right, I guess it is active high: https://github.com/beagleboard/linux/blob/4.4/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt#L16 Jun 07 19:10:00 so <21 1> is correct Jun 07 19:10:07 alexhiam: ok.. Jun 07 19:10:51 alexhiam: where do you think the problem is? Jun 07 19:11:56 kiran4399: no clue, like I said, I need to see what you're doing, otherwise I'm just guessing... Jun 07 19:13:18 alexhiam: I am compiling the BBBMPU6050 overlay and putting it in /lib/firmware.. then loading it into the slots.. Jun 07 19:13:21 kiran4399: not sure about your mux mode - since the interrupt is active high you probably don't want a pullup Jun 07 19:13:25 that's it.. Jun 07 19:18:09 bradfa, Please open a pull request so that I megre your corrections Jun 07 19:18:23 Whenever you are free Jun 07 19:20:17 alexhiam, I am trying to get contents of __R30 whenever I input something in /dev/rpmsg_pru30 Jun 07 19:20:20 http://paste.debian.net/723472/ Jun 07 19:20:44 It does not seem to work Jun 07 19:20:52 chanakya_vc: my whitespace corrections aren't critical, you can ignore for now, but try to cleanup your style a little, please Jun 07 19:21:38 Hey Wormo ^^ Jun 07 19:21:41 kiran4399: when I say I want to see what you're doing, I mean these sorts of notes: https://gist.github.com/alexanderhiam/2c4187c710b2c409d8dde8c4015fe007 Jun 07 19:21:44 hi ZeekHuge Jun 07 19:21:59 I have put some pru examples. Jun 07 19:22:02 in the repo Jun 07 19:22:16 Trying to understand the rpmsg communication Jun 07 19:22:18 kiran4399: if you're not pushing code because you're fighting with kernel drivers, I want to see all the steps and stdout/stderr as it happens Jun 07 19:22:27 I saw you got LED working with your current baseline, that was good Jun 07 19:22:46 alexhiam: got it.. Jun 07 19:22:50 yeah, but fried some pins Jun 07 19:22:56 :( Jun 07 19:23:10 anyway, help with the fw . Jun 07 19:23:12 http://paste.debian.net/723472/ Jun 07 19:23:19 ZeekHuge: what is that firmware? Jun 07 19:23:28 it's a TI example? Jun 07 19:23:44 Long as you know what to do different next time, it's not too bad... I think all embedded devs fry something at some point ;) Jun 07 19:23:50 yep with a bit modification Jun 07 19:23:55 alexhiam, ^^ Jun 07 19:24:16 lin 122 - 124 Jun 07 19:24:19 *line Jun 07 19:24:25 ZeekHuge: first of all, have to point it out, 'void main()' isn't right Jun 07 19:24:31 should be int main Jun 07 19:25:00 thats exactly what TI did, i just added line 120-124 Jun 07 19:25:22 yuck, bad TI! Jun 07 19:26:31 ZeekHuge: for one R30 is a 32-bit register, and gpio_state is a uint16_t Jun 07 19:26:54 it's probably not a good thing to re-use 'len' from the received message to respond with a different message (rather tha the echo) Jun 07 19:27:12 oh yes ! Jun 07 19:27:19 that might be the mistake Jun 07 19:27:23 (we said the same thing in different ways...) Jun 07 19:27:23 just a sec Jun 07 19:27:48 you've got a problem with the lengths Jun 07 19:28:11 right, len is set to some unknown value returned by pru_rpmsg_receive Jun 07 19:31:14 weird, pru_rpmsg_receive takes a uin16_t buffer and pru_rpmsg_send a uint32_t buffer... Jun 07 19:31:26 seems like the uint16_t might be a mistake...? Jun 07 19:31:32 http://git.ti.com/pru-software-support-package/pru-software-support-package/blobs/master/include/pru_rpmsg.h#line133 Jun 07 19:31:35 http://git.ti.com/pru-software-support-package/pru-software-support-package/blobs/master/include/pru_rpmsg.h#line171 Jun 07 19:31:54 bradfa, Didnot understand why you committed the am335x_pru.cmd Jun 07 19:32:18 ? Jun 07 19:34:51 chanakya_vc: it's a linker command file, I had thought it was needed but it might not be, I haven't tried running the compiler without it Jun 07 19:35:03 alexhiam, Wormo : yep ! its working now .. Jun 07 19:35:08 probably ... Jun 07 19:35:11 most microcontrollers need a linker command file to tell them where to put all the various parts of the binary for a given micro Jun 07 19:35:28 it looks as it is working but need to convert it into readable form Jun 07 19:35:51 okay, Wormo , I am having a bit difficulty working with ctags in vim Jun 07 19:36:00 bradfa, Okay .I have pushed the modified code Jun 07 19:36:24 how can i permanently add the location of tags file for a source ? Jun 07 19:36:33 You can compile and see on your system : ) whenever you are free Jun 07 19:36:41 bradfa, ^^ Jun 07 19:37:00 Just modified the variable types and it works Jun 07 19:38:38 chanakya_vc: compiles fine for me :) Jun 07 19:39:56 chanakya_vc: I have to run now, but be back tomorrow, good luck with capturing the logic analyzer plots :) Jun 07 19:40:17 chanakya_vc: a couple nitpicks - no reason for mosi and miso to be declared volatile, and it's usually convention to declare all your local variables at the start of your function Jun 07 19:40:31 i.e. choice and i Jun 07 19:40:49 oh, and you ought have a default case... Jun 07 19:40:50 Okay bye bradfa. : ) meet you tomorrow : ) Jun 07 19:41:25 Okay alexhiam I will fix that. I am writing the report now. Before the meeting tomorrow. Jun 07 19:41:41 alexhiam, Can you help with sigrok? Jun 07 19:42:08 chanakya_vc: yeah, no rush on this stuff. Also, choice is really not a descriptive name at all... something like clock_mode would be much more clear Jun 07 19:42:26 chanakya_vc: idk, I have zero experience with sigrock... Jun 07 19:42:56 Okay alexhiam ,I will surely keep this in mind. Jun 07 19:47:30 ZeekHuge: sorry I have to head out, will you be online in about 9 hrs maybe? I think that's tomorrow morning for you... Jun 07 19:50:05 Wormo, I'll be up during the night Jun 07 19:50:40 Hey ZeekHuge_ How are you now? Jun 07 19:51:04 Hi chanakya_vc ! Quite better now :) Jun 07 19:51:09 ZeekHuge_: re the vim question, try "set tags=./tags,tags" Jun 07 19:51:19 can set in .vimrc Jun 07 19:51:36 Glad to know that! Jun 07 19:52:03 ZeekHuge_, ^^ Jun 07 19:52:36 foreverska_, Hey! Can you help me with sigrok? If you use that as a logic analyzer? Jun 07 19:52:42 mdp ^^ Jun 07 19:53:18 I have a Saleae Jun 07 19:53:41 So you must be using sigrok with it right foreverska_ ? Jun 07 19:53:59 Wormo, got it :) Jun 07 19:54:04 chanakya_vc, thanks :) Jun 07 19:54:11 Oh, right sigrok is a program. lol No, they ship with their own software that I used. Jun 07 19:54:33 I have the cheap fake version of it that I bought off eBay :P Jun 07 19:55:16 foreverska_, I have to capture the waveforms of my code and show it tomorrow. Jun 07 19:56:04 foreverska_, Can you please see if my code is generating any kind of sensible stuff on your logic analyzer? Jun 07 19:56:31 If you are free that is. Jun 07 19:57:48 Not sure I can get to that before tomorrow. Would take me nearly that long to find my logic analyzer again. lol Haven't seen it since the move. Jun 07 19:59:52 Okay whenever you free and you find your logic analyzer,please do :P Jun 07 20:00:35 foreverska_, Otherwise how do you think the project is progressing? Jun 07 20:01:38 alexhiam, Just wanted to ask,how will I load my code on the PRU? remoteproc? Jun 07 20:02:06 chanakya_vc: https://gist.github.com/alexanderhiam/2c4187c710b2c409d8dde8c4015fe007 Jun 07 20:02:35 And to test it I would need to modify a dt also :( I might not be able to do all this before tomorrow's meeting Jun 07 20:02:49 alexhiam, ^^ Jun 07 20:02:50 or just use config-pin Jun 07 20:02:52 kiran4399: any luck with your driver issues? Jun 07 20:02:56 I'm testing now... Jun 07 20:03:16 config pin? What's that? alexhiam Jun 07 20:04:00 an extremely use full thing ! chanakya_vc Jun 07 20:04:06 got bbb ? Jun 07 20:04:11 Yes Jun 07 20:04:12 just config-pin Jun 07 20:04:25 its really really really helpful Jun 07 20:04:36 I am just in love with that Jun 07 20:05:27 as an example http://paste.debian.net/723608/ Jun 07 20:05:48 ZeekHuge, Just booting up BBB now Jun 07 20:06:10 and another example https://github.com/ZeekHuge/BeagleScope/blob/master/examples/pru_triggered_output/deploy.sh#L31 Jun 07 20:06:44 chanakya_vc: you need to call __halt() at the end of main() Jun 07 20:06:55 chanakya_vc: Not sure I get the code 100% (I don't deal a lot with SPI much) but it's looking good. Jun 07 20:08:07 foreverska_, Okay thanks a lot. Jun 07 20:10:53 alexhiam, ZeekHuge So it is a way for setting the pins to be GPI/O on the go? Jun 07 20:11:31 way to mux the pins on the go. yes. Jun 07 20:11:59 alexhiam, told me about it ! its just amazing ! Jun 07 20:13:44 Okay ZeekHuge,so no need to disable HDMI and all for the PRU to get GPI/O in this? Jun 07 20:14:26 I didn't get your examples end part but I understood the paste Jun 07 20:14:37 hmmn alot of work to be done. Jun 07 20:15:32 alexhiam, Will it be a problem if I am unable to show the pics from the logical analyzer tomorrow?My code is compiling btw Jun 07 20:15:32 chanakya_vc: no go: http://pastebin.com/L628VMtm Jun 07 20:15:46 chanakya_vc: no, that's no problem Jun 07 20:16:24 I think that 'remoteproc1: header-less resource table' is the problem, never seen that before... Jun 07 20:17:02 alexhiam, So it is not working :( Jun 07 20:17:08 chanakya_vc, yep. disable hdmi Jun 07 20:19:00 chanakya_vc: https://github.com/beagleboard/linux/blob/698027482f34f2559d648a2994df98b6a98873ab/drivers/remoteproc/remoteproc_elf_loader.c#L240-L244 Jun 07 20:19:12 alexhiam, Even I donot have any idea about that problem.But it is something to do with a requirement with remoteproc. Jun 07 20:19:25 missing the resource table, seems like a linker issue Jun 07 20:20:27 chanakya_vc: look at the examples in the pru-software-support-package, they all include a resource table Jun 07 20:20:53 Hmmn so this resource table is required for the remoteproc to load the code to the PRU? Jun 07 20:20:57 alexhiam, ? Jun 07 20:21:00 I'll start taking a closer look at rpmsg this week onwards. Jun 07 20:21:19 Hey Abhishek_ ! Jun 07 20:21:55 Can you tell me if you used RPMsg or custom buffers in your project for access to the shared memory? Jun 07 20:22:15 chanakya_vc: http://git.ti.com/pru-software-support-package/pru-software-support-package/blobs/master/examples/am335x/PRU_Halt/resource_table_empty.h#line37 Jun 07 20:23:15 chanakya_vc: In the 3.8.13 kernel there was a concept of upcalls and downcalls but it's no longer there Jun 07 20:23:28 so I'd recommend going down the rpmsg way Jun 07 20:23:33 chanakya_vc: I'd recommend going by these steps and copying their makefile and the empty resource table: https://gist.github.com/alexanderhiam/2c4187c710b2c409d8dde8c4015fe007 Jun 07 20:24:00 and cmd file Jun 07 20:28:11 Okay so I will copy the resource table into my c code right? And then follow the steps that you have given there. Jun 07 20:28:58 alexhiam, The cmd file is the same as the one in my repo?Or this is something different? Jun 07 20:29:10 alexhiam, I will look for their makefile. Jun 07 20:29:16 don't know Jun 07 20:29:22 you could do a diff Jun 07 20:34:27 alexhiam, I will have to research a bit on this .Will take me some time.Should I say so in the report? Jun 07 20:36:18 chanakya_vc: yeah, you should put all relevant info in the report Jun 07 20:36:23 or summarize at least Jun 07 20:37:02 Okay .I will summarize the entire discussion in the report. Jun 07 20:37:46 alexhiam, I was hoping I would be done with the basic SPI framework by this meeting.Looks it's not going to happen :( Jun 07 20:40:39 chanakya_vc: well, this doesn't mean your firmware isn't working, the problem is with your build environment Jun 07 20:50:19 alexhiam, Yes true. But I won't be able to show that I am done with it.Now I understand what you meant by the unexpected delays that you mentioned during the proposal submission Jun 07 20:51:35 chanakya_vc: that's not that big of a deal. I just got it to load on the PRU by building it with that resource table header Jun 07 20:51:53 though I'm not seeing the signals... Jun 07 20:52:11 : ( Jun 07 20:53:13 chanakya_vc: this is where it helps to be developing right on the beaglebone from the start Jun 07 20:53:24 alexhiam, No signal on the logic analyzer? Jun 07 20:53:25 good to sort this stuff out as earlier as possible Jun 07 20:53:32 no, not seeing anything Jun 07 20:54:18 alexhiam, Okay I will sort this out.Let me complete the report first. Jun 07 20:56:20 chanakya_vc: oh wait, I got one low pulse on the clock line Jun 07 20:57:07 alexhiam, I am sending a fixed hex in the code . Jun 07 20:58:00 it's 110ns low pulse, so that would come out to about a 4.5MHz clock Jun 07 20:58:40 Nothing on the MOSI? Jun 07 20:58:59 alexhiam, It should work if the clock is working Jun 07 20:59:33 wait, nvm, that's on the data line, P8_11 Jun 07 21:00:50 chanakya_vc: choice=CPOL*2+CPHA - you should really do a proper bit shift instead of a *2, they compiler may not optimize that well Jun 07 21:01:07 i.e. choice = (CPOL<<1) | CPHA Jun 07 21:01:36 also, you have CPHA=2, but it should only be 0 or 1 Jun 07 21:02:06 so choice = 2*2+2 = 4 Jun 07 21:02:20 1*2+2 that is Jun 07 21:02:26 Hmmn that is probably the mistake.If you make both 0,compile again, you should see something? Jun 07 21:03:08 alexhiam, I made that with the thought that only but in a hurry I might have given those values Jun 07 21:03:27 Please change it and see if it works please alexhiam ? Jun 07 21:07:56 chanakya_vc: ok, with CPOL and CPHA set to 0 I get 32 positive pulses on the clock line and mosi stays low Jun 07 21:08:04 @10MHz Jun 07 21:08:28 10 Mhz is what we wanted as the initial target right? Jun 07 21:08:31 alexhiam, ^^ Jun 07 21:08:41 yeah, I think so Jun 07 21:08:52 Yes : ) Jun 07 21:09:41 alexhiam, But mosi staying low is bad. I wonder why that is the case Jun 07 21:10:06 also the 32 pulses - you're missing your break statements in the switch case Jun 07 21:10:41 Yes I will correct it immediately alexhiam Jun 07 21:13:02 chanakya_vc: the way you're doing mosi is kinda weird, I'm not too surprised it ain't working. Usually you have one variable storing the data, then each time through the loop you do something like 'if (data >> (7-i)) set mosi; else clear mosi;' Jun 07 21:13:44 er... 'if ((data >> (7-i)) & 0x1)' that is Jun 07 21:15:25 the '__R30=mosi| __R30;' is not doing what you want it to Jun 07 21:19:17 alexhiam, first can you tell me which makefile did you use? Mine or TI's? Jun 07 21:19:25 TI's Jun 07 21:19:38 I just stuck your code in the PRU_Halt example Jun 07 21:20:01 Okay wait let me do the same Jun 07 21:20:16 it is in the examples right? Jun 07 21:20:35 yeah, examples/am335x/PRU_Halt/ Jun 07 21:23:41 Okay got it. Jun 07 21:24:28 alexhiam, Then simply make or we have to give value to CGT variable too? Jun 07 21:25:52 yeah, just make Jun 07 21:26:01 then 'cp gen/PRU_Halt.out /lib/firmware/am335x-pru0-fw' Jun 07 21:26:31 then 'rmmod -r pru_rproc' if it's loaded and 'modprobe pru_rproc' to load and run the firmware Jun 07 21:29:13 alexhiam, "resource_table_empty.h", line 54: fatal error #1965: cannot open source file "rsc_types.h" Jun 07 21:29:28 this error is coming Jun 07 21:31:51 hmm, do any of the examples build? Jun 07 21:33:18 Yes this is weird Jun 07 21:39:44 chanakya_vc: if you followed all the steps in that gist it should be building... Jun 07 21:41:04 chanakya_vc: here's a simplified version thats working: http://pastebin.com/2tvV6EqM Jun 07 21:46:36 Mine is just not compiling for some weird reason.Take a look at this:http://pastebin.com/44BxvwTi Jun 07 21:46:57 This is the code that I am trying to compile ^^ Jun 07 21:47:10 alexhiam, ^^ Jun 07 21:48:26 alexhiam, Errors:http://pastebin.com/GGraJj0E Jun 07 21:48:40 I am at a loss Jun 07 21:49:25 chanakya_vc: missing a semicolon somewhere... Jun 07 21:51:19 chanakya_vc: oh, more strict compiler flags in their makefile, it's because you declare i in the for loops Jun 07 21:51:23 not really supposed to do that Jun 07 21:51:38 just declare 'uint8_t i' once at the top of the function Jun 07 21:51:46 Okay. Jun 07 21:53:12 Built it finally phewww Jun 07 21:53:17 alexhiam, ^^ Jun 07 21:57:53 chanakya_vc: awesome Jun 07 22:02:00 alexhiam, New problem:when I am trying to say rmmod -r pru_rproc,it says -r is an invalid option Jun 07 22:02:21 without it it says rproc module is not loaded Jun 07 22:02:45 and if say modprobe pru_rproc it says the module not found Jun 07 22:02:53 oops, just 'rmmon pru_rproc' Jun 07 22:03:08 chanakya_vc: what kernel version are you using? Jun 07 22:04:00 alexhiam, Not got it running it with that. Jun 07 22:04:07 modprobed it Jun 07 22:04:11 now what? Jun 07 22:04:18 config-pin? Jun 07 22:04:34 chanakya_vc: so modprobe pru_rproc did work? Jun 07 22:05:04 yep i first rmmod it Jun 07 22:05:11 then modprobed it Jun 07 22:05:22 so this time no error messages Jun 07 22:05:29 alexhiam, ^^ Jun 07 22:05:37 removed the r Jun 07 22:05:55 k, so as soon as you modprobe that it tries to load /lib/firmware/am335x_pru0-fw onto PRU0 and run it, so if your firmware was there it will have already fun Jun 07 22:05:58 dmesg to see Jun 07 22:06:23 so you want to mux the pins first the unload and load pru_rproc Jun 07 22:06:49 Yes but it is showing errors? Jun 07 22:06:53 alexhiam, ^^ Jun 07 22:07:04 what errors? Jun 07 22:08:12 http://pastebin.com/r9UXDj8J Jun 07 22:08:16 alexhiam, ^^ Jun 07 22:08:55 yeah, that's normal. That's it not finding /lib/firmware/am335x-pru1-fw to load onto PRU1. Look right before that Jun 07 22:10:12 Ohh Jun 07 22:10:23 Yes PRU 0 is up alexhiam Jun 07 22:10:32 awesome Jun 07 22:11:04 So now I mux the pins via the config-pin method? Jun 07 22:11:21 so your firmware has long since finished running. For some reason pru_rproc seems hang after running, so you have to rmmod it Jun 07 22:11:38 yeah, you can mux the pins with config-pin Jun 07 22:12:00 I am not sure of the syntax. Jun 07 22:12:21 config-pin -h Jun 07 22:12:30 Is this thing been introduced in this version of kernel?Or it exists in the previous versions also? Jun 07 22:13:26 alexhiam, On rmmod it says pru_rproc is still in use. Jun 07 22:13:54 rmmod -f them Jun 07 22:14:06 https://github.com/ZeekHuge/BeagleScope/blob/master/examples/pru_blinky/deploy.sh#L35 Jun 07 22:14:10 alexhiam, ^^ Jun 07 22:14:15 cant we do this ? Jun 07 22:14:18 Yup worked. -f is force Jun 07 22:14:23 config-pin and universal-io (the Device Tree overlay it uses) were introduced 4.1 I think Jun 07 22:14:23 I believe Jun 07 22:14:25 rather than -f ? Jun 07 22:14:46 it works perfectly fine Jun 07 22:14:53 ZeekHuge: ooo, that looks like a much better way to do it Jun 07 22:15:01 rmmod -f is the bad way to do it Jun 07 22:16:08 and while playing around, I think there is some problem with the drivers, they cause I/O error and no command is executable Jun 07 22:16:28 the only option - restart the board Jun 07 22:16:30 oof Jun 07 22:16:43 alexhiam, Okay got it .Just wanted to make sure for P8_11 I would say 11 or P8_11? Jun 07 22:17:35 ZeekHuge, ^^ Jun 07 22:17:38 this problem just appears some time, not sure how or what causes this .. Jun 07 22:17:45 chanakya_vc, P8_11 Jun 07 22:17:50 okay Jun 07 22:18:52 P8_11 is what you want right ? its bit_15 of r30 Jun 07 22:18:56 chanakya_vc, ^ Jun 07 22:18:58 Yes Jun 07 22:19:01 cool ! Jun 07 22:19:11 It is such a cool method Jun 07 22:19:17 ZeekHuge, alexhiam ^^ Jun 07 22:19:30 No more pain of writing a dt Jun 07 22:19:32 Wow Jun 07 22:19:37 'config-pin -l P8_11' will tell you what it can be Jun 07 22:20:13 Yeah ! It is ! As i said, I am just loving this thing ! Jun 07 22:20:26 well, this is basically just for prototyping, anything production will need to use DT Jun 07 22:20:33 hmmn..but what about modes alexhiam?I mean it is output in mode 6 Jun 07 22:20:54 have a cheatsheet for that ? Jun 07 22:20:57 pruout Jun 07 22:20:58 wait a sec Jun 07 22:21:41 config only works for pruout/pruin? Jun 07 22:22:04 chanakya_vc: what do you mean? Jun 07 22:22:52 for P8_11, it can be GPIO (mode 7), PRU out (mode 6) and eQEP (mode 4) Jun 07 22:23:11 the other modes on that pin aren't supported Jun 07 22:23:56 https://github.com/derekmolloy/boneDeviceTree/tree/master/docs Jun 07 22:24:01 chanakya_vc, ^^ Jun 07 22:24:08 it may help. Jun 07 22:24:57 alexhiam, Nothing I was just wondering that this works for stuff only in mode 6 or mode 5? Jun 07 22:25:34 yeah, it doesn't support every mode, depends on the pin Jun 07 22:25:57 just GPIO, PRU, I2C, SPI, UART, eQEP and PWM modes AFAIK Jun 07 22:25:59 Okay got it alexhiam Jun 07 22:26:23 Thanks for your help.I will improve this code Jun 07 22:26:46 np, glad you got it running on the PRU! Jun 07 22:27:01 And hopefully get it working b4 tomorrow's meeting alexhiam : ) Jun 07 22:27:32 chanakya_vc: ping me if you push new code you'd like tested, I may have a chance before the meeting Jun 07 22:27:41 * alexhiam goes afk Jun 07 22:27:54 Okay alexhiam .Will surely do that Jun 07 22:27:58 Gn ZeekHuge ! Jun 07 22:28:08 Thanks for the help **** ENDING LOGGING AT Wed Jun 08 02:59:59 2016