Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
a cyberpunk goose
May 21, 2007

Bloody posted:

explaining spi is nice because it's so loosely defined. the poo poo i have seen, man. i have seen some poo poo. lvds spi. ddr spi. spi where chip select actually does nothing and god help you if you have anything but the most pristine clock line from power up until forever.

gently caress spi.

i2c is nice if you don't mind some slow as rear end upper limit and don't have to talk to it with an fpga

spi isnt spi isnt spi

you got to configure poo poo like what edge do the slaves need to latch on, what polarity etc. if the diagram is drawn out you dont even need to read the (possibly lying) technical summary of the spi configuration, you can take a glance at the signal diagram and know how to configure your master.

i worked on a stack at my last job that had a fuckload of things sharing a single spi bus (we had a multiplexing chip to handle the 8+ devices listening to that bus) and different slaves had different mandates like the DACs and ADCs did different things w/ spi, along with boards that had other mcus that wanted more stringent timing etc. so i had a bunch of dumb logic that would configure spi for each target communication

madness

madness

Adbot
ADBOT LOVES YOU

movax
Aug 30, 2008

kwinkles posted:

i2c ultra fast mode can do 5Mb/s, oooh yeaaaaaah, i did pre-silicon verification of the i2c and displayport aux channel controller in bay trail and i used to have dreams about i2c i spent so much time fiddling with it in the day for a few weeks there

i have sometimes woken up in bed and laid there unmoving for several minutes before realizing that i do not, in fact, require a clock signal to function properly

movax
Aug 30, 2008

Star War Sex Parrot posted:

dude get on my level



not an arduino, ++ points

movax
Aug 30, 2008

Mr Dog posted:

spi is "anything with at least one shift register that connects to the outside world and maybe a select line", yes

let me tell you about the shift register known as jtag

jtag owns bones.

hobbesmaster
Jan 28, 2008

movax posted:

i have sometimes woken up in bed and laid there unmoving for several minutes before realizing that i do not, in fact, require a clock signal to function properly

yeah running on lvds is pretty great, though I would check out your wake interrupt line

a cyberpunk goose
May 21, 2007

rec

movax posted:

let me tell you about the shift register known as jtag

jtag owns bones.

recommend me an all purpose JTAG debugger I could use with OpenOCD or something of that ilk

ideally not the jlink because it's kinda expensive imo

Bloody
Mar 3, 2013

pretend this is added to my list of bullshit spi interfaces: an interface which is change rising/capture falling when writing registers, and is capture rising/change falling when reading registers

Sapozhnik
Jan 2, 2005

Nap Ghost

Bloody posted:

pretend this is added to my list of bullshit spi interfaces: an interface which is change rising/capture falling when writing registers, and is capture rising/change falling when reading registers

:staredog:

Jerry Bindle
May 16, 2003

Bloody posted:

pretend this is added to my list of bullshit spi interfaces: an interface which is change rising/capture falling when writing registers, and is capture rising/change falling when reading registers

what would this get you? full duplex spi with 1 shared IO pin, 1 clock pin and 1 cs?

Bloody
Mar 3, 2013

one fewer spin of your chip by saying ah gently caress it good enough ship it

movax
Aug 30, 2008

Mido posted:

rec


recommend me an all purpose JTAG debugger I could use with OpenOCD or something of that ilk

ideally not the jlink because it's kinda expensive imo

ft2232 based things are decent and inexpensive, if used with a non-lovely userspace application

not sure how they do with adaptive clocking tho

a cyberpunk goose
May 21, 2007

movax posted:

ft2232 based things are decent and inexpensive, if used with a non-lovely userspace application

not sure how they do with adaptive clocking tho

is adaptive clocking up to the host doing the debugging? or the processor/soc/debugging architecture you're interacting with?

i know nothing baout jtag and am trying not to if ic an help it

my mission is to have a general purpose debugger i can plug into w/e headers i want and it's okay if it can't autodetect just as long as i can ask OpenOCD to talk to the target devicea s if it were $SOME_SPECIFIC_PROCESSOR at $SOME_SPECIFIC_CLOCK and have it work most of the itme

EIDE Van Hagar
Dec 8, 2000

Beep Boop

movax posted:

i have sometimes woken up in bed and laid there unmoving for several minutes before realizing that i do not, in fact, require a clock signal to function properly

always @ (posedge sun) begin
toilet <= poop:
end

EIDE Van Hagar fucked around with this message at 02:44 on Apr 4, 2015

movax
Aug 30, 2008

Mido posted:

is adaptive clocking up to the host doing the debugging? or the processor/soc/debugging architecture you're interacting with?

i know nothing baout jtag and am trying not to if ic an help it

my mission is to have a general purpose debugger i can plug into w/e headers i want and it's okay if it can't autodetect just as long as i can ask OpenOCD to talk to the target devicea s if it were $SOME_SPECIFIC_PROCESSOR at $SOME_SPECIFIC_CLOCK and have it work most of the itme

iiuc it's up to the debugger -- it will wait for the first tdo bit to come back before the next clock edge thus compensating for any cable delay or synchronizer flop delays (useful when you're trying to debug an arm target that comes up at say 32khz and then jumps up in speed to 50mhz+)

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull
what a magnificent thread i did not know about before

anyone trying to use xilinx ise for anything: don't, it's bad. use vivado, it's still bad but much less so. of course this means you have to use at least 7 series parts and i feel bad for you if you can't do that

also jfc guys who were complaining about writing port lists 3x, verilog 2001 port declarations are a thing, google dat poo poo and stop suffering with the 20 year old version of the language

Arcsech
Aug 5, 2008

BobHoward posted:

what a magnificent thread i did not know about before

anyone trying to use xilinx ise for anything: don't, it's bad. use vivado, it's still bad but much less so. of course this means you have to use at least 7 series parts and i feel bad for you if you can't do that

also jfc guys who were complaining about writing port lists 3x, verilog 2001 port declarations are a thing, google dat poo poo and stop suffering with the 20 year old version of the language

Agreed on Vivado

My work uses vhdl for everything. Kinda wish I could use verilog but oh well

Jerry Bindle
May 16, 2003
xilinx ise 12.4 is great. it supports the Spartan 3E on digilent's nexys2 board, AND schematic entry!

movax
Aug 30, 2008

Arcsech posted:

Agreed on Vivado

My work uses vhdl for everything. Kinda wish I could use verilog but oh well

vivado / xilinx still doesn't understand the concept of people wanting to version control stuff though.

why the gently caress do i have to hand-write my own tcl scripts to run the entire build flow because you fucks are unwilling to jump into the 21st century and embrace source control :mad:

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

movax posted:

vivado / xilinx still doesn't understand the concept of people wanting to version control stuff though.

why the gently caress do i have to hand-write my own tcl scripts to run the entire build flow because you fucks are unwilling to jump into the 21st century and embrace source control :mad:

This so hard

fucken drives me UP THE WALL

i'm nuts-deep into automating my group's vivado flow and getting it to play nicely with source-control - holy poo poo what a colossal pain in the rear end. ISE, for all of its quirks and general shittiness, somehow easier to source-control than Vivado.

also just found out that data2mem Doesn't. Even. Work. For an Artix-7 part. WHAT THE gently caress

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull
there aren't enough :agreed:'s for the above two posts

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull
the sad thing is i've gone to xilinx "meet the vivado devs" events and they seem like nice people who get the importance of this but it's still a giant loving pain in the rear end. especially if you have to use (or have inherited a design which uses) xilinx ip integrator. (shudder)

big shtick energy
May 27, 2004


we're doing our next product with an stm32f4, and since Kiel uvision 4 kind of sucks, it looks like we might go with gcc/eclipse/openocd. it's not a horrible idea is it?

also how does an ide in tyool 2015 only rarely have text completion actually work. and also store what windows you have open in the same file as project options you care about so you have to version control that file and then of course you have an incompatible change every time you even open a window in the bloody project. wtf keil.

JawnV6
Jul 4, 2004

So hot ...

DuckConference posted:

we're doing our next product with an stm32f4, and since Kiel uvision 4 kind of sucks, it looks like we might go with gcc/eclipse/openocd. it's not a horrible idea is it?
don't expect any support. they were pretty clear with us that keil & IAR get first priority, if you're some open source scum they might bother with an internal search for you but any genuine effort is expecting way too much

movax posted:

vivado / xilinx still doesn't understand the concept of people wanting to version control stuff though.

why the gently caress do i have to hand-write my own tcl scripts to run the entire build flow because you fucks are unwilling to jump into the 21st century and embrace source control :mad:
i've been using source control outside my IDE for a while now. the IDE's up on one screen and the terminal's on the other, is even that unsupported or do you want some hint of modernness like "commit hooks" or w/e?

movax
Aug 30, 2008

JawnV6 posted:

i've been using source control outside my IDE for a while now. the IDE's up on one screen and the terminal's on the other, is even that unsupported or do you want some hint of modernness like "commit hooks" or w/e?

so in a vivado zynq design, you can do a block design to easily stitch together axi peripherals and stuff

this is fine, and i would expect that i should be version control the two text files that control and spawn the auto-generation of hdl from them

but no, oh loving now. every. goddamned. time. you build, it happily increments a number and renames the core. so, *_design_auto_pc_1 eventually becomes *_design_auto_pc_161 and it's a bunch of utterly loving useless commits. they're a bunch of cocksuckers, unless it's been secretly fixed in the background

i'm this close to just cribbing off what adi did for their hdl libraries

movax
Aug 30, 2008

don't even get me started on trying to version control the shitshow that's version controlling the export process over to their sdk tool as well (an eclipse-based system)

at least eclipse has some user community that's figured out ways to deal with that special brand of bullshit

JawnV6
Jul 4, 2004

So hot ...

movax posted:

so in a vivado zynq design, you can do a block design to easily stitch together axi peripherals and stuff

this is fine, and i would expect that i should be version control the two text files that control and spawn the auto-generation of hdl from them

but no, oh loving now. every. goddamned. time. you build, it happily increments a number and renames the core. so, *_design_auto_pc_1 eventually becomes *_design_auto_pc_161 and it's a bunch of utterly loving useless commits. they're a bunch of cocksuckers, unless it's been secretly fixed in the background

i'm this close to just cribbing off what adi did for their hdl libraries

lmao oic

c# does some of that with autogenerated files from the GUI designer, but i haven't had to merge too many of those

just do pure verilog imho

Star War Sex Parrot
Oct 2, 2003

I think I set my fuses wrong on my ATMega32 while trying to get it working with an external crystal. I'm not sure if it's expecting an external clock signal or what but it doesn't work anymore. Gonna try either a function generator or another ATMega to generate a clock and see if that gets it back to life long enough to program the fuses again

Lesson learned

a cyberpunk goose
May 21, 2007

DuckConference posted:

we're doing our next product with an stm32f4, and since Kiel uvision 4 kind of sucks, it looks like we might go with gcc/eclipse/openocd. it's not a horrible idea is it?

also how does an ide in tyool 2015 only rarely have text completion actually work. and also store what windows you have open in the same file as project options you care about so you have to version control that file and then of course you have an incompatible change every time you even open a window in the bloody project. wtf keil.

we avoided iar and stuff at my last job and went with Kinetis and the Kinetis Design Studio thing which is just Eclipse with a bunch of plugins they made for configuring the cpu and generating some C stuff which wasn't as bad as i expected it to be

i have set up basic gcc toolchains in eclipse for building ARM targets and stuff and once you get past how annoying eclipse is to configure it's generally serviceable :shobon: this was internal product poo poo that wouldn't see the light of day though, so the onus was different for me

JawnV6
Jul 4, 2004

So hot ...
i thought TI's CCS eclipse skin was perfectly serviceable. even atmel's VS skin is decent enough

just drives me crazy when the Cube won't spit out a gcc-compatible BSP, or atmel's eval kit demo programs are written to IAR instead of their own tooling

seems time to mention i'm also looking for my next job, so if y'all need a verilogger or firmware dev hit me up

Jerry Bindle
May 16, 2003

Star War Sex Parrot posted:

I think I set my fuses wrong on my ATMega32 while trying to get it working with an external crystal. I'm not sure if it's expecting an external clock signal or what but it doesn't work anymore. Gonna try either a function generator or another ATMega to generate a clock and see if that gets it back to life long enough to program the fuses again

Lesson learned

i know very little about AVRs, it is surprising to learn that you can brick a part that easily. on dspic/pic24's you can clock the CPU from the programming port to recover from situations like that (flash is always clocked from the internal oscillator). it looks like you might be able to do something similar on atmega32's, http://www.atmel.com/images/doc2503.pdf page 261. welp good luck

maniacdevnull
Apr 18, 2007

FOUR CUBIC FRAMES
DISPROVES SOFT G GOD
YOU ARE EDUCATED STUPID

Star War Sex Parrot posted:

I think I set my fuses wrong on my ATMega32 while trying to get it working with an external crystal. I'm not sure if it's expecting an external clock signal or what but it doesn't work anymore. Gonna try either a function generator or another ATMega to generate a clock and see if that gets it back to life long enough to program the fuses again

Lesson learned

What programmer are you using? I think it uses the external clock from the programmer regardless of the fuse settings. If not, high voltage programming to force it to listen. I forget, it's been a while since I messed with that stuff.

Star War Sex Parrot
Oct 2, 2003

maniacdevnull posted:

What programmer are you using?
Atmel-ICE Debugger

http://www.atmel.com/webdoc/atmelice/atmel-ice.preface.html

Bloody
Mar 3, 2013

JawnV6 posted:

i thought TI's CCS eclipse skin was perfectly serviceable. even atmel's VS skin is decent enough

just drives me crazy when the Cube won't spit out a gcc-compatible BSP, or atmel's eval kit demo programs are written to IAR instead of their own tooling

seems time to mention i'm also looking for my next job, so if y'all need a verilogger or firmware dev hit me up

we're definitely hiring your type, where do you live and/or are you interested in relocating to boston area

hobbesmaster
Jan 28, 2008

i thought boston was destroyed by snow

Bloody
Mar 3, 2013

it is surprisingly unfortunately still standing

hobbesmaster
Jan 28, 2008

that is unfortunate

were the patriots at least destroyed?

Star War Sex Parrot
Oct 2, 2003

hobbesmaster posted:

were the patriots at least destroyed?
on the contrary,

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
i'm getting interested in taking the arduino training wheels off and using big boy developer tools for embedded systems

but like, where do i even begin? part of the issue is that I have no real reason for needing to go to better tools because the stuff we do at work is usually very simple so things like port manipulation etc are really overkill, so I don't have a lot of practical things to try right now but I really want to get to use the nicer debug tools

so, i get that if I want to do AVR stuff i'm going to need to learn more C/C++ (i'm okay with that)

but like, is there a book or something for embedded systems out there? what will change for me?

hobbesmaster
Jan 28, 2008

start with the big AVRs that go in the arduinos... but you don't know any C? that may be a problem

Adbot
ADBOT LOVES YOU

a cyberpunk goose
May 21, 2007

Fanged Lawn Wormy posted:

i'm getting interested in taking the arduino training wheels off and using big boy developer tools for embedded systems

but like, where do i even begin? part of the issue is that I have no real reason for needing to go to better tools because the stuff we do at work is usually very simple so things like port manipulation etc are really overkill, so I don't have a lot of practical things to try right now but I really want to get to use the nicer debug tools

so, i get that if I want to do AVR stuff i'm going to need to learn more C/C++ (i'm okay with that)

but like, is there a book or something for embedded systems out there? what will change for me?

it depends where you are at, I learned a lot by just taking the programming manual for a SoC and making my own linker script and C bring up code with determination and self hatred and esoteric examples

understanding what the clocking pathways are and how to configure them and what modes various pins are listening to or are on when it comes up from power off is pretty cool. it helps to ask an unfortunate rear end in a top hat a poo poo ton of dumb questions too. C toolchains for embedded are horribly convoluted and it's hard to decipher what is helpful cruft and what is truly essential

  • Locked thread