#avr | Logs for 2015-09-01

Back
[05:54:43] <Herkol> Hi, is there a way to count interrupts while in sleep mode (ATSAM4L) ?
[05:55:16] <Herkol> ex. the number of times a person has pushed a button. The controller should stay asleep, only when it wakes again look at the total count.
[06:01:58] <Lambda_Aurigae> Herkol, not that I know of...wake up, add one to count, go back to sleep.
[06:02:54] <Lambda_Aurigae> but
[06:02:57] <Lambda_Aurigae> now that I think about it
[06:03:07] <Lambda_Aurigae> you maybe could use an externally clocked timer.
[06:03:14] <Herkol> Lambda_Aurigae: Yes, that is what I also think. Does feel like there should be some peripheral able to do this. This is for anemometer
[06:03:17] <Lambda_Aurigae> will need some good debouncing on the switch though.
[06:03:44] <Herkol> You mean trigger clock, on rise & fall ?
[06:04:19] <Lambda_Aurigae> there is usually a timer that can be told to increment from an external source.
[06:04:45] <Herkol> yes, sounds like what I am looking or
[06:05:29] <Herkol> TC_EVENT_ACTION_INCREMENT_COUNTER is available on the SAMD21, but I am on the SAM4L :(
[06:05:50] <Lambda_Aurigae> now, whether that is available in sleep mode, no clue.
[06:05:58] <Lambda_Aurigae> and absolutely no clue on ARM processors.
[06:06:12] <Lambda_Aurigae> you should ask in an ARM channel not an AVR channel.
[06:06:38] <Herkol> arm channel is dead
[06:06:58] <Herkol> almost the same :P
[06:07:09] <Lambda_Aurigae> they are nowhere near the same.
[06:07:24] <Lambda_Aurigae> other than being little black bits with metal bits sticking out of them.
[06:07:36] <Lambda_Aurigae> and being processors with peripherals and memory inside the black bits.
[06:10:55] <Jartza> it's true the arm channel seems quite dead
[06:13:59] <Xark> ...it has occasional spurts of life. :)
[06:15:20] <Xark> #asm is arguably better for arm low-level stuff though. :)
[06:21:50] <Jartza> world would be different if there were no other programming languages :)
[08:50:17] <Fleck> what is the correct way for stop/config/start timer1 atmega2560? For start/stop just set prescale to 0? Or any better way? The problem I have is, in PWM, Phase and Frequency Correct mode ICR1 gets changed sometimes after I have set it, sometimes not... happens more on "cold start"
[08:57:27] <zmo> hi!
[08:58:28] <zmo> can avrdude 6.1 linked against mingw be installed "as is" without actually having mingw installed?
[08:58:55] <zmo> I'd like to get some windows guys able to flash a firmware I wrote with the atmelice tool
[08:58:59] <zmo> but I don't have windows
[09:19:50] <theg4sh1> zmo: http://www.nongnu.org/avrdude/user-manual/avrdude_19.html
[09:25:06] <zmo> theg4sh1 - well, it's not really answering the question, as there is http://download.savannah.gnu.org/releases/avrdude/avrdude-6.1-mingw32.zip available on savannah, but I'm not sure if it'll work "as is" on a vanilla windows
[09:25:13] <zmo> or if you need the mingw32 stuff installed as well
[09:27:30] <zmo> n.b.: it suggests either to use winavr, which is not offering avrdude-6.1, or compiling from sources, which I obviously cannot ask a lambda windows user
[09:28:05] <zmo> (even a windows developer hardly understands how to build a gcc based program, because "baaaah... it needs the commandline"
[09:30:18] <theg4sh1> zmo: In really last time when I worked with windows is 7 years ago) don't try to compile for windows, but I think it possible.
[09:31:27] <zmo> theg4sh1 - still better than for me, besides testing stuff periodically in a windows petri tube^W^Wvirtual machine, I last installed windows as full OS of a computer before the y2k bug :-)
[09:31:45] <zmo> (damn, already 15 years)
[09:31:59] <zmo> so caring about windows users is kind of a new thing for me
[09:34:27] <theg4sh1> zmo: hm, also you can put DLLs of mingw to the folder with executable; and (if this functional still exists) run exe with emulation of 98 or other.
[09:35:25] <theg4sh1> "baaaah... it needs the commandline" :)
[09:38:47] <Fleck> #FirstWorldProblems - Windows dev needs commandline...
[09:39:08] <Fleck> #NoWhereToBeFound :D
[09:39:09] <theg4sh1> zmo: > but I'm not sure if it'll work "as is" on a vanilla windows Well, you will not know until you try.
[09:39:28] <theg4sh1> Fleck: :D
[09:41:02] <theg4sh1> Fleck: hmm, you mean cli(); sei(); ?
[09:41:17] <Fleck> nope
[09:41:33] <zmo> Fleck - about your issue, can you post a short concise example of what's not working?
[09:41:40] <zmo> on a pad somewhere
[09:43:49] <Fleck> zmo: nah, too lazy, ICR1 changes after I set it, thats all, but I have few ideas, will see how this goes
[09:44:15] <Fleck> the worst part of this is - It doesn't happen every time!
[09:44:55] <Fleck> errata says nothing about this, I even started to think that my atmega2560 is cheap china clone
[09:45:49] <zmo> Fleck - welcome to the timer's pleasers :-)
[09:46:07] <Fleck> who are timer's pleasers? :D
[09:46:24] <zmo> pleasures*
[09:46:36] <Fleck> ahh
[09:46:39] <Fleck> yeah...
[09:49:45] <zmo> BTW
[09:49:52] <zmo> avrdude on windows just works out of the box
[09:58:09] <zmo> I might actually get into the trouble of updating winavr so windows user stop being assholes
[10:03:16] <zmo> errrr is there actually sourcecode for winavr itself?!
[10:03:36] <theg4sh1> zmo: you can keep version 6.1 of avrdude on internal server and update it when checked what all ok with new version.
[10:04:50] <theg4sh1> zmo: dunno, may be here http://download.savannah.gnu.org/releases/avrdude/
[10:05:01] <zmo> I looked there
[10:05:24] <theg4sh1> or by svn http://savannah.nongnu.org/svn/?group=avrdude
[10:05:46] <zmo> but there's no real stuff, a bunch of patches some tcl files
[10:06:38] <zmo> oh, actually there's no gui in winavr
[10:06:42] <zmo> I thought there was :-)
[10:09:15] <theg4sh1> I thought you knew :)
[10:09:38] <zmo> as I said, I haven't really used windows since last millenium
[10:10:03] <zmo> so as it was a windows thing, I just figured it was coming with a gui :-)
[13:23:15] <majkrzak> Hi, is tere a way to handle all interupts in one metod?
[13:36:09] <LoRez> majkrzak: you can make one thing the ISR for everything, but then you have to figure out what you're being interrupted for
[13:36:16] <LoRez> Which, I think is possible
[13:44:26] <majkrzak> Interupt reson isn't stored, is it?
[13:44:39] <LoRez> which AVR are you using?
[13:45:07] <majkrzak> mega328p
[13:50:52] <LoRez> EIFR and PCIFR are there for externals, but internals it appears that doesn't happen
[13:51:32] <LoRez> majkrzak: trying to save space?
[13:53:08] <majkrzak> no, just playing with some kind of dynamic interupt handling :)
[14:08:28] <gorroth> you could install ISRs for each kind of interrupt and have it call your "master method" with an put, right?
[14:08:39] <gorroth> although, i'm not sure that's a good way of programming
[14:08:51] <gorroth> s/with an put/with an input/
[14:11:33] <LoRez> yeah, that's a pretty ugly hack, and would incur at least an additional stack push/pop for the new frame
[14:12:13] <gorroth> depends how you code it and/or use compiler optimizations
[14:13:16] <LoRez> well, if it's optimizing away the extra calls, you might as well just have the extra ISRs
[14:13:55] <LoRez> I'm a fan of updating volatiles in the ISR and bouncing back out quickly and letting an event loop look at the volatiles.
[14:14:04] <LoRez> (where appropriate)
[14:14:11] <gorroth> sounds good
[14:14:37] <gorroth> now that you've said that
[14:14:42] * gorroth steals that idea for his code
[14:14:44] <gorroth> :)
[17:02:39] <milk_base> http://listenonrepeat.com/watch/?v=rLNYhWpdSOo#Anon_-_I_Hate_Fucking_Niggers
[17:05:49] <Mr_Sheesh> Without even looking at that, the words "What sort of human would you be, if you really WERE human?" come to mind.
[17:11:21] <aandrew> 1/10 too obvious
[17:12:42] <Mr_Sheesh> Better to call a turd a turd than say nothing