#emc | Logs for 2009-03-02

Back
[00:00:47] <jmkasunich> there are three mesa example configs
[00:01:20] <jmkasunich> actually there are more than three
[00:01:25] <leito14> excelent
[00:01:31] <jmkasunich> there are three directories of mesa examples
[00:01:47] <leito14> and the second is, that when i see the pins connected to the signals for the axis, i see that they are DAC pins, i was wondering if this pins are really DAC outputs, or if they are only digital out pins for connect them to the 7i33
[00:01:52] <jmkasunich> hm2-servo uses hostmot2, and has several examples for several boards
[00:02:06] <jmkasunich> hm2-stepper uses hostmot2 and has several examples for several boards
[00:02:21] <jmkasunich> m5i20 does NOT use hostmot2
[00:02:36] <jmkasunich> it uses the old (pre-hostmot2) firmware
[00:03:00] <jmkasunich> hmm
[00:03:08] <jmkasunich> actually I may be leading you astray
[00:03:19] <jmkasunich> I'm looking at the files on the CVS server, which are the most recent
[00:03:33] <jmkasunich> I think the hm2-servo and hm2-stepper configs aren't in the 2.2 release
[00:04:03] <jmkasunich> I'm not telling you anything that you can't find by browsing around on your own system
[00:04:13] <jmkasunich> (and if you do that, you will know it applies to the version you have)
[00:04:36] <jmkasunich> re: the 2nd question
[00:04:54] <jmkasunich> the 5i20 and similar boards don't have actual hardware DACs
[00:05:13] <leito14> sorry, but i was confused about that FPGA thing, i red in the mesanet page that the fpga config has to be loaded into the board before doing anything
[00:05:25] <jmkasunich> they generate a pwm signal, then filter and amplify it (on the 7i33) into a +/-10V signal
[00:05:38] <jmkasunich> yes, a config needs to be loaded
[00:05:51] <leito14> but when i load the m5i20 example
[00:05:53] <jmkasunich> sorry, I should speak more precisely
[00:05:58] <jmkasunich> a firmware needs to be loaded
[00:05:59] <leito14> no problem
[00:06:03] <jmkasunich> and the sample config probably does that
[00:06:05] <leito14> i understand you
[00:06:29] <leito14> excelent i was thinking that but i wasn't sure
[00:06:56] <leito14> and the fpga config stays on the board once i loaded the m5i20 config?
[00:07:21] <jmkasunich> yes, once the firmware is loaded it remains till replaced by something else
[00:07:22] <leito14> or the config is loaded everytime the emc2 starts
[00:07:43] <jmkasunich> I believe the hal_m5i20 driver loads the config every time it starts
[00:08:22] <leito14> and that thing about the DAC outputs.. is only the name, i mean.. i can use that outputs for make steps or pwm or anything that i want right?
[00:08:38] <jmkasunich> yes and no
[00:08:57] <leito14> is there any risk ?
[00:09:04] <jmkasunich> you can literally do just about anything with the FPGA, _if_ you write the FPGA firmware (VHDL) and the associated driver code
[00:09:26] <jmkasunich> if you are using the standard firmware and driver, you can do whatever that firmware and driver provides
[00:09:43] <jmkasunich> which I don't have memorized - that is why we have a manual
[00:09:55] <leito14> right.. so i have to write my own fpga configuration if i want to change that outputs
[00:10:07] <jmkasunich> yes
[00:10:14] <leito14> i need to build my own kernel module too right?
[00:10:19] <jmkasunich> stop
[00:10:27] <jmkasunich> why are you asking this?
[00:10:37] <jmkasunich> writing fpga firmware is NOT a simple thing to do
[00:10:55] <jmkasunich> and normally, the people who know how to do that wouldn't be asking this kind of question
[00:11:09] <leito14> no, i don't know how to do it, i'm new on this
[00:11:13] <jmkasunich> typical users shouldn't have to mess with the fpga firmware
[00:11:17] <leito14> that's why i'm in this irc
[00:11:56] <jmkasunich> if you don't already know VHDL, or have a burning desire to spend weeks learning electrical engineering and digital logic stuff, forget about custom FPGA firmware
[00:13:04] <leito14> my brother is who knows this... i'm just learning but he had programed several things with microcontroler and he has built his own pcb control board, but he doesn't know english so i'm here
[00:14:04] <jmkasunich> your questions are too general
[00:14:08] <leito14> sorry
[00:14:18] <leito14> i'm not an expert i'm learning
[00:14:34] <jmkasunich> can your brother read either english or french?
[00:14:53] <leito14> english yes he can read a little
[00:15:03] <jmkasunich> he should be reading the manual
[00:15:10] <leito14> the m5i20 manual?
[00:15:18] <jmkasunich> the EMC2 manual
[00:16:19] <leito14> yes we read it but we didn't find about creating our fpga configuration
[00:16:38] <jmkasunich> thats because creating your own FPGA configuration is _VERY_ advanced
[00:17:00] <jmkasunich> you need the xilinx FPGA development tools (about a 2 gigabyte download), and you need to know VHDL
[00:17:07] <jmkasunich> you should NOT be doing that
[00:17:46] <leito14> but why do you say that?
[00:18:07] <jmkasunich> why do you want to make your own FPGA configuration?
[00:18:08] <leito14> i want to learn i'm not doing anything without learning
[00:18:30] <jmkasunich> there are limits to everything
[00:18:53] <leito14> well, i need to change for example the encoder inputs..
[00:18:57] <jmkasunich> you could make a car by starting with an engine, or you could start with a lump of iron and make the engine
[00:19:14] <jmkasunich> writing your own FPGA configuration is like starting with a lump of iron
[00:19:32] <jmkasunich> you can do anything you want (5-cylinder engine ;-) but it will take a long time and a lot of learning
[00:19:48] <leito14> we have camshaft factory so i know about iron machining
[00:20:06] <leito14> and i have the interest in learning
[00:20:16] <leito14> about this, that is why i'm asking
[00:20:30] <jmkasunich> do you know what VHDL is?
[00:20:32] <leito14> because i know here are people who knows a lot
[00:20:36] <leito14> no
[00:21:00] <jmkasunich> VHDL = V(something) Hardware Description Language
[00:21:09] <jmkasunich> it is the language used to define the FPGA
[00:21:32] <jmkasunich> the FPGA source for the standard m5i20 configuration is in CVS
[00:21:54] <leito14> right, it comes with emc2 source? or separate?
[00:22:04] <jmkasunich> if you want to modify it, you need to download the tools, download the source, learn enough VHDL to modify the source, then build the firmware using the xilinx tools
[00:22:24] <leito14> thanks, but if i use the hostmot 2
[00:22:34] <jmkasunich> same thing
[00:22:43] <jmkasunich> except that hostmot2 is easier to modify
[00:22:55] <jmkasunich> and we have several different configurations of hostmot already made
[00:23:09] <jmkasunich> s/hostmot/hostmot2
[00:23:16] <leito14> well what i was planning is to modify the hostmot 2 with the inputs and outputs that i need
[00:23:39] <leito14> oh, i didn't know that
[00:23:50] <jmkasunich> http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/drivers/mesa-hostmot2/
[00:24:07] <jmkasunich> click on firmware, then 5i20
[00:24:13] <jmkasunich> that will get you to here:
[00:24:17] <jmkasunich> http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/drivers/mesa-hostmot2/firmware/5i20/
[00:24:30] <jmkasunich> 4 different bitfiles
[00:24:50] <jmkasunich> SV12 = 12 servo axes - 12 x DAC + 12 x encoder counter
[00:25:12] <jmkasunich> SVST2_8 = 2 servo axes and 8 stepper axes
[00:25:15] <leito14> thank you very much
[00:25:38] <leito14> and i have to read it again but, if i'm not wrong in the console you can load the fpga config into the board ?
[00:25:41] <jmkasunich> if you look in the .PIN files you'll see the pinouts that are available
[00:25:55] <jmkasunich> for hostmot2, you tell the driver what firmware to load
[00:26:18] <leito14> that!, sorry for the confusion, so
[00:26:28] <jmkasunich> man hostmot2
[00:26:30] <jmkasunich> man hm2_pci
[00:26:31] <leito14> what i need to do is not to write an fpga config
[00:26:40] <leito14> i need to write a firmware
[00:26:50] <jmkasunich> those two will explain how to specify which firmware you want
[00:27:14] <leito14> thanks, so what i need to do is not that impossible right? i mean to configure my own firmware
[00:27:22] <jmkasunich> I still don't know why you want to write your own firmware
[00:27:42] <jmkasunich> you are making things very very much harder for yourself
[00:27:56] <leito14> but how can i change the encoder inputs
[00:27:58] <leito14> for exapmle
[00:28:02] <leito14> to general inputs
[00:28:19] <jmkasunich> any encoders that you are not using automatically become general purpose I/O
[00:28:43] <jmkasunich> the same is true with any DAC or stepgens that you are not using
[00:28:59] <jmkasunich> read "man hostmot2" and "man hm2_pci"
[00:29:11] <leito14> thanks you, is that in the emc2 manuals?
[00:29:32] <jmkasunich> "man" is the unix/linux man page command
[00:29:41] <jmkasunich> just type "man hostmot2" at the command line prompt
[00:30:18] <leito14> thanks again, sorry for all the trouble but i'm new on linux, and it's difficult to write so fast in english
[00:30:28] <jmkasunich> you are doing fine with the english
[00:30:41] <jmkasunich> I didn't know it wasn't your first language until you told me
[00:30:53] <leito14> thanks, but if you could understand spanish this would be easier :)
[00:30:59] <jmkasunich> heh
[00:31:09] <leito14> or if my english would be better
[00:31:41] <leito14> because the 80% of the confusion on this conversation is because i'm not used to speak in english
[00:31:58] <jmkasunich> it looks like the pdf integrators manual doesn't say much about hostmot2, it mostly talks about the older m5i20 firmware and driver
[00:31:58] <leito14> but nevermind, so all the Inputs and Outputs of the card are GPIO
[00:32:12] <jmkasunich> yes
[00:32:42] <leito14> but when i write the hal for my config... i assign the function for every input and output of the card?
[00:32:49] <jmkasunich> when you invoke the hostmot or hm2_pci driver, you give it things like "num_encoders=1"
[00:33:10] <leito14> i remember, i red about that
[00:33:19] <jmkasunich> if the firmware has 8 encoders, but you say "num_encoders=1", then 1 will be an encoder and the other 7 will be GPIO
[00:33:54] <leito14> excelent
[00:35:11] <leito14> and what's the difference in the two hostmot drivers?
[00:35:17] <leito14> modules
[00:35:30] <jmkasunich> you use both
[00:35:42] <leito14> i have to invoke one after the other ?
[00:36:19] <jmkasunich> hostmot2 is the generic driver for all hostmot2 stuff, it makes the HAL pins and does most of the realtime work
[00:36:36] <jmkasunich> hm2_pci is the specific driver for the PCI based cards - 5i20, 5i22, 5i23, etc
[00:36:49] <jmkasunich> it loads the firmware and handles communication between hostmot2 and the board
[00:36:54] <leito14> so the hal_m5i20 it's useless for me?
[00:37:09] <leito14> because it has the config already in
[00:37:12] <jmkasunich> hal_m5i20 is an older driver that works with an older firmware
[00:37:17] <leito14> right
[00:37:42] <jmkasunich> there is only one firmware that works with that driver
[00:37:44] <leito14> well i will try tomorrow (here is the 22:37)
[00:38:02] <jmkasunich> where are you? Brasil?
[00:38:07] <leito14> Argentina
[00:38:17] <leito14> and you ?
[00:38:18] <jmkasunich> wow, my geography is really bad
[00:38:23] <leito14> hahah don't worry
[00:38:29] <jmkasunich> middle of the USA - 19:37 here
[00:38:42] <jmkasunich> I thought Argentina was a little west of me, not 3 hours east
[00:39:05] <leito14> well now i think is 2 hours because
[00:39:19] <leito14> since 2 years ago the goverment started with summer time change
[00:39:30] <jmkasunich> I guess South America isn't exactly straight south from North America, but quite a bit east too
[00:39:40] <jmkasunich> we will have that change next week
[00:39:58] <leito14> i don't know when we have to change it yet :)
[00:40:21] <jmkasunich> you are changing from summer to winter :-( we will be changing from winter to summer ;-)
[00:40:26] <leito14> but almost any clock that i use (cellphone, pc ) changes the hour automatically so i don't matter
[00:40:48] <leito14> hahaha, well i'm a little bit tired about this summer, it was very hot
[00:41:03] <leito14> and working in the factory with that temperature is like hell
[00:41:09] <jmkasunich> summer here is only medium hot
[00:41:20] <jmkasunich> winter is very cold
[00:41:26] <leito14> you are so lucky
[00:41:41] <leito14> here in buenos aires this summer we had 42º C
[00:41:42] <leito14> one day
[00:41:52] <jmkasunich> ouch
[00:42:10] <leito14> and in the north of our country the temperature reached the 50º C
[00:42:13] <jmkasunich> here, average summer is probably 30-35C
[00:42:37] <jmkasunich> 38C would be rare - maybe 1 day every year or two
[00:42:43] <leito14> and in the winter you have snow for sure
[00:42:44] <jmkasunich> 40C very rare
[00:42:44] <leito14> ?
[00:42:47] <jmkasunich> yes
[00:42:50] <leito14> i love it
[00:42:55] <jmkasunich> in January we had about 1meter total
[00:43:02] <jmkasunich> not all at once fortunately
[00:43:15] <jmkasunich> but I had 1/2 meter on the ground at one time
[00:43:26] <leito14> that's very much
[00:43:38] <leito14> here it's very rare the snow here in my city
[00:44:03] <jmkasunich> -7C average temperature for January, -24 minimum
[00:44:04] <leito14> but 2 year ago falled snow
[00:44:15] <leito14> very cold
[00:44:51] <jmkasunich> it isn't usually that bad, usually -15C or so is the lowest
[00:44:58] <leito14> here in the winter we have minimun of -3 or -5 but not less than
[00:45:36] <jmkasunich> that is about what it is today
[00:45:36] <leito14> but it's very rare, most days we have 2ºc or 3ºc in the winter
[00:47:26] <leito14> well i hope soon i can make the machine work with the mesa board :) you've been very helpful with me
[00:47:27] <jmkasunich> http://en.wikipedia.org/wiki/Cleveland,_Ohio#Climate
[00:47:39] <jmkasunich> heh, wikipedia knows more about my weather than I do
[00:47:43] <leito14> hahaha
[00:48:36] <leito14> the picture is nice :), i hate buenos aires, i would like to live in mendoza is in Los Andes
[00:49:07] <leito14> where the plane of the ALIVE film crashed
[00:49:16] <leito14> the film and the real plane
[00:49:33] <jmkasunich> mountains are nice
[00:49:46] <leito14> yes, i love it.. i hate my city because is full
[00:49:48] <jmkasunich> as long as you aren't in a plan crash
[00:49:57] <leito14> you can't even walk in some places
[00:51:09] <jmkasunich> 13 million population - that is big
[00:51:27] <leito14> here in bs as ?
[00:51:32] <jmkasunich> yes
[00:51:37] <leito14> i think that's the entire Province
[00:51:39] <jmkasunich> wow, my geography is _really_ bad
[00:51:47] <leito14> but yes, it's a madness
[00:52:01] <leito14> that's why this country is so bad
[00:52:03] <jmkasunich> I had argentina and chile mixed up
[00:52:07] <leito14> hahaha
[00:52:20] <leito14> but here in the capital city, there like 8 million people
[00:52:41] <leito14> i'm next to the capital, but very near, about 15 blocks
[00:53:37] <leito14> and i don't know what's going to happen this year with the situation, because every day gets worst
[00:53:46] <leito14> economical situation
[00:53:59] <jmkasunich> yes, it is bad everywhere
[00:54:11] <leito14> yes, but here we're used :)
[00:54:31] <leito14> every 10 years we have a economical trouble
[00:55:28] <leito14> but, you have to live here to know, the matter is that here the most of the people wants to have everything without work
[00:56:06] <leito14> fortunately there people that make things work, but it's hard because the laws and the goverment seems to support the people that doesn't work
[00:56:36] <leito14> it's always the same.. the power
[00:57:14] <leito14> the need people who don't think to stay in the power as long as they can
[00:57:20] <jmkasunich> strange - shortage of coins?
[00:57:28] <jmkasunich> (reading wikipedia)
[00:57:32] <leito14> hahaha
[00:57:37] <leito14> what is the shortage
[00:57:40] <leito14> i don't know that word
[00:58:04] <jmkasunich> http://en.wikipedia.org/wiki/Buenos_Aries#Buses_-_Electronic_Ticketing
[00:58:04] <leito14> short (short) age (old)
[00:58:09] <jmkasunich> coins? metal money
[00:58:20] <leito14> let me see
[00:58:23] <jmkasunich> oh, shortage = not having enough
[00:59:33] <leito14> yes, because for some reason, people was keeping the coins for selling a package with i don't know 100 $ of coins, but the sold to you in the 120$
[00:59:42] <jmkasunich> ah
[00:59:56] <jmkasunich> the metal in the coins is worth more than the face value
[01:00:10] <jmkasunich> that happened a little bit here in the 1970s I think
[01:00:27] <jmkasunich> our pennies ( one cent coin) used to be made of copper
[01:00:37] <jmkasunich> the copper was worth 2 or 3 cents
[01:00:54] <leito14> haha, that's ironic
[01:00:57] <jmkasunich> now pennies are made of zinc and plated with a tiny amount of copper
[01:01:13] <leito14> but yes, it happens all around the world
[01:01:39] <leito14> i don't know what metal are our coins made from
[01:01:50] <jmkasunich> our larger coins (10 and 25 cents) were made of silver 50+ years ago, but that changed long ago
[01:02:37] <leito14> in the future we will have our credit card number in our fingertip :)
[01:04:43] <jmkasunich> heh - Buenos Aries: 13680 persons/km^2 Cleveland: 2380 persons/km^2
[01:04:49] <jmkasunich> I guess it is crowded there
[01:04:54] <leito14> haha i told you, you're lucky
[01:05:26] <jmkasunich> it says the suburbs of Buenos Aries are about 2400/km^2
[01:05:29] <leito14> but fortunately i live in a kind of suburb... the capital is very near but here is not that extreme situation
[01:07:12] <leito14> but yes, the capital is like hell, is like tokio in some places
[01:07:36] <leito14> the best places to live here is near the mountain :)
[01:07:42] <leito14> ARE
[01:08:24] <jmkasunich> wikipedia doesn't know population density in Mendoza
[01:08:46] <jmkasunich> but only 110993 people, must be better than BA
[01:08:57] <leito14> yes, a lot better
[01:09:03] <leito14> i was there and it's wonderful
[01:09:24] <jmkasunich> ah, area = 54km^2, so density is about 2000/km^2
[01:09:27] <leito14> and also the cities are cleaner than here
[01:11:06] <leito14> mendoza is like another country
[01:11:07] <jmkasunich> here is a mountain city that I visited once - it was very nice: http://en.wikipedia.org/wiki/Flagstaff,_Arizon
[01:11:52] <leito14> nice place :)
[01:12:51] <leito14> there in usa are very nice places to meet
[01:13:07] <leito14> i hope someday i can go and visit there
[01:15:14] <jmkasunich> hmm, my UPS is beeping at me
[01:15:17] <jmkasunich> very loud
[01:16:43] <leito14> haha
[01:19:04] <jmkasunich> it has been good talking to you - good luck with your project
[01:19:12] <jmkasunich> I must get busy on my project now
[01:19:26] <leito14> thank you it has been good for me too :)
[01:19:36] <leito14> good luck with that
[01:19:40] <leito14> we'll talk later :)
[01:27:37] <jmkasunich> now where did I put my hole-mover?
[01:28:54] <JymmmEMC> jmkasunich: In the last home you moved
[01:28:59] <JymmmEMC> s/home/hole/
[01:29:33] <jmkasunich> I'd like to apply a clue-bat to the person who made this thing I'm trying to fix
[01:30:06] <JymmmEMC> whatcha fixin?
[01:31:17] <jmkasunich> a test fixture
[01:31:24] <JymmmEMC> ah
[01:31:51] <jmkasunich> it's a copy of something that I made - the buyer bought one from me, then wanted more and had copies made by a local shop
[01:32:18] <jmkasunich> calling the local shop a bunch of amateurs is an insult to amateur machinists everywhere
[01:32:44] <jmkasunich> holes drilled in the wrong places, stuff shimmed to make up for being cut wrong
[01:32:50] <JymmmEMC> and why didn't he just come back to you in the first place
[01:33:09] <jmkasunich> either I wanted too much money, or too much time, dunno which
[01:33:18] <JymmmEMC> heh
[01:33:37] <jmkasunich> or it might have been while I was in the middle of getting divorced, and simply wasn't accepting any jobs
[01:34:22] <JymmmEMC> ah gotcha. Wasn't aware of the divorce, sorry (or congrats) on that (as it applies).
[01:35:17] <jmkasunich> heh
[01:35:47] <jmkasunich> bit of both I think
[01:37:17] <JymmmEMC> Yeah, divorce is just kinda one of those things... heartbreaking, ballbreaking, or both
[19:05:26] <ChanServ> [#emc] "This is the #emc channel - talk related to the Enhanced Machine Controller and general machining. Website: http://www.linuxcnc.org/, wiki at http://wiki.linuxcnc.org/"
[19:05:44] <dgarr> thanks!
[19:05:54] <alex_joni> np, thanks for letting me know it's not working
[20:38:02] <alex_joni> archivist_attic: filled the house up?
[20:38:14] <alex_joni> started archiving in the attic?
[20:38:29] <archivist_attic> at the Magic Attic
[20:39:55] <archivist_attic> where I disappear Mondays and Thurdays http://www.magicattic.org.uk/
[21:17:55] <leito14> hello everybody, i bought a mesa 5i20 interface and i was wondering if i need to load the fpga driver with the command hm2_pci everytime that i execute the config of the machine?
[21:23:32] <BJT-Work> what version of EMC are you using
[21:25:03] <leito14> 2.2.8
[21:25:44] <BJT-Work> I'm guessing that you would need the hm2_5i20 I have a 5i20 but it is on 2.3 beta
[21:26:15] <BJT-Work> http://www.linuxcnc.org/docview/html//man/man9/hostmot2.9.html
[21:27:10] <leito14> so i load first the hostmot2 module with the fpga config and then i load the m5i20 module?
[21:29:46] <BJT-Work> I think so... there should be a sample config to look at with your install
[21:29:53] <BJT-Work> gotta go now
[21:31:15] <leito14> thank you
[21:31:23] <leito14> have a nice day
[21:32:05] <skunkworks> http://imagebin.ca/img/zF4TSFr.jpg
[21:32:08] <alex_joni> leito14: yes, you need to load it every time you use it
[21:32:30] <alex_joni> leito14: there is no persistent memory on the board to hold the fpga data, so on every load it gets loaded
[21:32:50] <leito14> thank you very much, that was what i need to know :)
[21:32:51] <alex_joni> leito14: the correct order is to load hostmot2, then hm2_pci with the link to the proper firmware
[21:33:24] <alex_joni> leito14: it would be very appreciated if you can read http://www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html
[21:33:36] <leito14> excelent, i will read it now
[21:33:37] <alex_joni> and also comment if something can be made more clear
[21:33:56] <alex_joni> or if something is not easy to understand for someone who doesn't know how it's supposed to work
[21:34:18] <leito14> alright, i'll tell you if i find something difficult to understand
[21:34:55] <skunkworks> http://imagebin.ca/img/mngnnRy1.jpg
[21:36:45] <alex_joni> skunkworks: your pic?
[21:38:33] <skunkworks> yes - stitched togather
[21:38:45] <leito14> everything seems clear for me :)
[21:39:13] <alex_joni> leito14: ok.. well if you still have questions.. we're around
[21:40:36] <alex_joni> skunkworks: a bit gray for my taste (the scenery.. not the pics)
[21:40:41] <alex_joni> but looks very nice :)
[21:41:29] <skunkworks> one of these days I need to get a real camera
[21:42:07] <skunkworks> I did nothing to the pictures
[21:45:31] <jepler> panoramas are fun
[21:46:04] <skunkworks> yes - first time I have played with it. :)
[23:12:55] <tomaw> [Global Notice] Hi all. A couple of our hubs lost connectivity for a minute or so there resulting in a rather large and noising split. We have worked around the issue for now and are hopeful things will now settle down. Sorry for the inconvenience and thank you for using freenode!
[23:23:39] <geo01005> seb_kuzminsky: Are you around right now?
[23:23:58] <seb_kuzminsky> hi
[23:24:56] <geo01005> So I have made a list of what code I need to write for SPI in HM2 here: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?SPI_Sub-Driver_For_Hostmot2
[23:25:13] <geo01005> I was wondering if you could let me know if I'm missing anything.
[23:25:45] <geo01005> Just the last section labeled "Code TODO"
[23:26:35] <seb_kuzminsky> there's no prepare_tram_read or process_tram_write
[23:26:53] <geo01005> It seams there would need to be?
[23:27:20] <seb_kuzminsky> you prepare a buffer to write to the tram, but you get nothing back so there's nothing to process afterwards
[23:27:43] <seb_kuzminsky> the processing happens after you read the tram, hence process_tram_read
[23:28:05] <geo01005> I can see that one. But wouldn't we need a prepare_tram_read?
[23:28:05] <seb_kuzminsky> similarly, there's nothing to prepare for when reading from the tram, you just process what you read afterwards
[23:28:57] <geo01005> perhaps you want to change what you are sending? (during initialization)
[23:29:18] <seb_kuzminsky> reading from the tram doesnt involve sending anything ;-)
[23:29:26] <seb_kuzminsky> that's writing to the tram ;-)
[23:29:38] <seb_kuzminsky> and for that, yes, you do perpare what you want to write
[23:29:53] <geo01005> But we do need to send a data to the SPI buffer if we expect to get anything back right?
[23:30:20] <seb_kuzminsky> i dont know how that work
[23:30:22] <seb_kuzminsky> works
[23:31:18] <seb_kuzminsky> does the hm2 bspi do the read-while-writing thing? i think i read about that while i was skimming some spi docs
[23:31:51] <seb_kuzminsky> but i didnt read it very carefully :-/
[23:31:52] <geo01005> Yes it does.
[23:32:12] <seb_kuzminsky> in that case maybe tram-read/tram-write isn't a very good abstraction for bspi
[23:32:36] <seb_kuzminsky> you're free to do whatever you think would be appropriate in hm2_read() and hm2_write(), it doesnt have to be tram-ish
[23:33:16] <geo01005> so where can I get some information on translation ram?
[23:33:25] <seb_kuzminsky> regmap is about all there is afaik
[23:33:35] <seb_kuzminsky> but note that the hm2 driver doesnt *actually* use the tram yet
[23:33:43] <geo01005> thats what I thought.
[23:33:55] <seb_kuzminsky> it's setting itself up for using it but then faking the tram access with normal i/o
[23:34:27] <seb_kuzminsky> tram is on my todo list but i haven't gotten to it yet :-(
[23:34:41] <seb_kuzminsky> it mostly would benefit the 7i43, not so much the PCI boards
[23:35:16] <geo01005> Well so I have been thinking the communication between EMC and the mesa board (for SPI) is split up into four phases.
[23:36:24] <geo01005> One phase (phase A) to send to the write buffer during hm2_read, one phase (phase B) for getting the results from the buffer durring hm2_read.
[23:36:41] <geo01005> phase B, not phase :)
[23:37:18] <geo01005> phase C writes to the buffer durring hm2_write, and phase D reads the buffer durring hm2_write.
[23:37:55] <geo01005> so no, that doesn't really fit into the tram idea i suppose.
[23:39:33] <seb_kuzminsky> i haven't really studied bspi so i'm not sure what the best way to drive it would be
[23:39:40] <seb_kuzminsky> you probably know better than i do
[23:46:14] <geo01005> that doesn't seam to be likely :)
[23:47:29] <PCW> geo: Yes you always have to send something to receive with SPI...
[23:48:28] <geo01005> and all 32 bit, right?
[23:48:31] <seb_kuzminsky> PCW: with bspi, do you define a channel descriptor for each slave?
[23:48:43] <PCW> In the simplest case the SPI slave (BSPI is the master) is nothing but a shift register
[23:49:19] <PCW> Yes, a descriptor for each slave device
[23:49:34] <seb_kuzminsky> then you put a bunch of entries in the bspi fifo, where each entry consists of a channel descriptor index and the data to send to the slave for that fifo entry?
[23:50:15] <PCW> Yes though the index is encoded in the write address
[23:50:43] <geo01005> isn't it really one descriptor for each SPI frame you send? So if you have a 4 channel ADC, you need 4 descriptors?
[23:51:52] <PCW> No, the descriptor would just be setup for the ADC hardware channel particulars (number of bits etc)
[23:53:12] <seb_kuzminsky> for the AD5754, do you send it four 16-bit frames, with each frame going to a different DAC channel?
[23:53:13] <geo01005> PCW: So I missed the boat here, how do you send multiple "frames" to one device?
[23:54:11] <PCW> Seb: For AD5754 channel is embedded in data, so I have 2 descriptors for DACs on 7I65
[23:55:08] <PCW> Geo: Just write them to send FIFO (at proper address so correct descriptor is chosen)
[23:57:03] <PCW> Seb yes four frames so for updating all channels on a 7I65 I write 4 frames to one address (for one chip) and frames to another address (for the other chip)
[23:59:36] <seb_kuzminsky> PCW: the channel descriptor for each 5754 chip has 24 bits/frame?