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
Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Martytoof posted:

e: Oh man. Apparently it's all in the datasheet as well, only for some reason Atmel decided to call it straight up TWI instead of I2C. Oh, the follies of being inexperienced :downs:

I2C is trademarked by phillips or something.

I2C isn't a too bad to get working if you have any sort of hardware support, though be careful, I think the reference implementation on STM32s had some potential lock-ups. I did a work project a few years ago using i2c to talk to an eeprom and for the first couple of days we would get intermittant lock-ups until we fixed something.

Zaxxon fucked around with this message at 19:47 on Jun 3, 2013

Adbot
ADBOT LOVES YOU

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Victor posted:

Hey can you explain more about this? I came across some reddit comments to the same effect and couldn't trace their source. This is particularly important, as I fly a quad on an STM32F4! I haven't run into any lock-ups.

On a related topic, any idea what the cheapest I2C protocol analyzer is? I'm guessing an 8-bit AVR might not be quite up to the task. I wonder how hard it would be to do with an STM32F4 running at 168Mhz... Yeah, I'm at a startup. We don't have the funds for a proper logic analyzer, yet. Yay buggy Bitscope!

as I said this was a few years back I was working on an embedded project using an STM32vet6 I think. ST provided a library of sorts to make things like SPI and I2C easy to implement in C. I remember the other dev first encountered sporadic lockups on his board, we traced it to some kind of interrupt issue in the I2C code, so at first we just put a whole chunk of it in a critical section. Later on, with a second board we found the exact spot, and crit sectioned that.

This was on a board that was running a lot of interrupt based stuff (spi,i2c,usb,freeRTOS.) and other various junk.

I'm sorry I'm not more detailed, this was an old job, at a company I don't work for anymore in a city I don't live in.

Zaxxon fucked around with this message at 02:20 on Jun 4, 2013

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Martytoof posted:

Hey Dragon users. Mine finally arrived and it is basically pretty awesome. Do you guys use the board itself to power your target or do you typically run external power to your target and just rely on the dragon to run ISP/debugWire? I read that the voltage regulators on the Dragon are fragile as a teenager's self esteem, and people are recommending using them via a powered USB hub instead of a direct connection to a computer's USB port. Is this a real thing I should be worried about?

I have to throw mine in a case anyway, and I have a big-ish project box I'm planning on using, so I'm thinking about just killing two birds with one stone and making one projectbox that holds the AVR, and has a small standalone circuit that steps a separate wall wart down to 5v for powering my target.

Just wondering how you guys are handling your fragile baby dragons.

typically I just make the board I'm going to put the AVR on and get it's power supply working first. Then I just use the dragon for it's ISP or JTAG with an IDC cable. I've had mine for years, and never bothered putting it in a case or anything and it works fine like this.

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Victor posted:

Out of curiosity, how careful of a person are you in general? For example, would you trust yourself with a shiny new iPhone such that you wouldn't put a screen protector on it even though you hate scratches? :-)

If I thought the thing was super delicate I'd protect it. I've never had that kind of a problem with an AVR dragon. I might be the weird one, and I certainly don't think it's unreasonable to put the thing in a case, I've just never had to, but I'm also never programming chips powered by the dragon itself.

  • Locked thread