#avr | Logs for 2016-01-06

Back
[04:31:53] <gevorg> anybody alive ?
[05:58:25] <Lambda_Aurigae> nope
[05:58:30] <Lambda_Aurigae> we are all computer simulations
[09:19:03] <rue_house> what would you like to simulate today?
[09:19:50] <rue_house> remember, the difference between simulation and stimulation are just a matter of crossing your t
[09:23:17] <rue_house> #define NOP() asm volatile ("nop"::)
[09:23:17] <rue_house> #define ABS(a) ((a) < 0 ? -(a) : (a))
[09:23:17] <rue_house> #define SIGN(x) (x)==0?0:(x)>0?1:-1
[09:35:35] <cyphos> Hi all
[09:36:27] <rue_house> high
[09:36:46] <rue_house> cyphos, got a good project?
[09:38:29] <cyphos> Yes.
[09:38:39] <cyphos> I'm part of a team making a flowmeter.
[09:38:50] <rue_house> ah, for rice?
[09:39:06] <cyphos> Air and other non-corrosive gasses.
[09:40:01] <rue_house> oh
[09:40:17] <rue_house> so, not rice.
[09:40:25] <cyphos> It's a nice piece of technology.
[09:40:29] <cyphos> No rice ;)
[09:40:39] <rue_house> I suppose not water either?
[09:40:44] <cyphos> No.
[09:40:47] <rue_house> oh
[09:40:49] <rue_house> hmm
[09:41:02] <rue_house> its not gonna help me make a supper machine
[09:41:13] <cyphos> I'm having some trouble though. I use xboot as bootloader and avrdude as host side updater. All works just fine when I'm using a program 56000 bytes in size, but the verification fails when I'm trying to flash 175700 bytes of program code. And when doing the large program, the first corruption already occurs at 0x00, not somewhere far into the flash range.
[09:41:13] <rue_house> unless
[09:41:35] <rue_house> that dosn't sound like a 8 bit microcontroller
[09:41:54] <cyphos> atxmega256a3bu
[09:42:08] <rue_house> hmm, I cant help with xmega
[09:43:15] <rue_house> sounds like an overflow
[09:44:09] <cyphos> Yes that was my first impression as well, but how, where and why is not yet resolved and I'm stuck.
[09:44:20] <cyphos> Do you have any ideas?
[09:44:57] <rue_house> no, I dont do xmega, what I cant do with an 8 bit avr, I do with an x86 computer
[09:46:02] <rue_house> does avrdude say it was successfully written?
[09:49:41] <rue_house> http://www.avrfreaks.net/forum/xboot-avrdude-problems
[09:49:41] <rue_house> ?
[10:35:49] <cyphos> No errors on write.
[10:36:23] <cyphos> It's validation where the faults are detected.
[10:36:56] <cyphos> I've been examining a dump of my flash and it seems the writing loops a 0x1FFFF
[10:38:53] <cyphos> However since flash cells can only be set from 1 to 0 in a write sequence, when it starts over it doesn't just write the same pattern you would expect from 0x20000 onwards but a bitwise and of that data on what's already at 0x00.
[10:41:13] <cyphos> Flash cells can only be set to 0xFF in an erase sequence. So when the write sequence loops from 0x1FFFF back to 0x00 only 1's can become a 0 but 0's do not become a 1.
[10:41:57] <cyphos> Moments like these make me want to dynamite these things :P
[10:56:32] <Jartza> well, I only have atxmega32a4u
[10:57:29] <Jartza> and it seems I can flash 32kB of random data to it
[10:57:59] <Jartza> but as far as I know, the flash >64kB is accessed differently
[10:58:30] <Jartza> cyphos: what you can try is to create binary that's exactly 64kB and then binary that's like 1 byte longer than 64kB and see if it makes any difference
[10:59:03] <cyphos> Yes, my idea too.
[10:59:09] <Jartza> because that "0x00" could as well be "0x00 after first 64kB" if there's some kind of overflow
[10:59:45] <cyphos> With 0x00 I mean what my memory dump says
[11:01:37] <Jartza> are you sure you're not dumping bootloader area?
[11:01:40] <cyphos> However I must say, it fails to write after 131.071 bytes, not at 65.536 bytes.
[11:03:02] <cyphos> Jartza: I believe the bootloader area is adressed just like any other memory, in my case 0x040000
[11:03:29] <cyphos> So my bootloader would also show up on that adress in my flash dump
[11:05:16] <Jartza> yea, bootloader is at the end of flash
[11:10:08] <cyphos> Meh, tomorrow brand new day
[11:10:20] <cyphos> 17:45 here, time to go home.
[11:10:33] <cyphos> Good evening everybody!
[21:16:33] <rue_bed> hi
[21:17:26] <rue_bed> wait wait Jartza
[21:17:33] <rue_bed> 256kbit
[21:17:54] <rue_bed> is 32kbyte
[21:18:25] <rue_bed> are avrs rated in bits or bytes
[21:18:29] <rue_bed> its bits isn't it?
[21:41:45] <Jartza> wut
[21:41:57] <Jartza> atxmega32a4u is 32k bytes
[21:42:14] <Jartza> atxmega256a3bu is 256k bytes :)
[23:15:52] <inflex> eh? wth... can't seem to reflash my Tom_itx programmer using dfu-programmer :(