#avr Logs

Sep 28 2019

#avr Calendar

02:32 AM polprog: rue_mohr: no idea, 32pin, ill take a lookat them today maybe
01:06 PM captain_morgan9 is now known as captain_morgan
02:37 PM mark4: can anyone tell me if a debug ice arm debugging capabilities will work with ANY arm device?
02:49 PM cehteh: this is avr not arm :D
02:52 PM mark4: and the debugice supports the arm chip
02:52 PM mark4: well it supports SOME arm chips
02:52 PM mark4: i was hoping i could debug an nxp chip with it
02:59 PM twnqx: the answer is "no"
02:59 PM twnqx: though the keil stuff maybe can
03:05 PM mark4: im not spending 20k usd on development tools
03:06 PM mark4: keil used to produce awesome compilers, then arm bought them, shelved their arm development tools and told them use our tools
03:06 PM mark4: arms assembler is absolutely the single worst development tool i have ever used
03:06 PM mark4: period
03:15 PM vmt: i was just barely too late, i gotta msg him
03:15 PM vmt: i wonder if he's the same guy who was planning a civil lawsuit years ago
03:15 PM vmt: ah yes, he answered. turns out he is. he said it was easy million $$$ :D
03:16 PM vmt: shouldn't be a problem buying KEIL with a million buckaronis
03:16 PM vmt: ah yeah i remember. he wanted to sue the state because a cop pulled over and he was driving while high
03:18 PM vmt: oh wait no it wasn't because he was driving high. it was because he claimed a truck wanted to ram him over in his car, and he gunpointed the truck driver. then a cop pulled over and went over his car and then he wanted to sue the state for a million
03:21 PM vmt: he was a funny guy
03:39 PM Steffanx: the atmel-ice does have aCMSIS-DAP mode/inerface, so i think it can do other mcus just fine. Using openocd for example. (never tried it though)
03:39 PM Steffanx: *interface
03:46 PM twnqx: i'll have to deal with atmel^Wmicrochip ARM soon enough...
04:57 PM soreau: how do I use the DAC on stm32f1?
04:59 PM soreau: Should piping PCM bytes to analogWrite work?
05:01 PM cehteh: wtf
05:01 PM LeoNerd: That sounds like an STM32 question or an Arduino question,.. or maybe both. But neither sounds very AVRish
05:01 PM cehteh: doublebuffering, dma, timer ..
05:02 PM soreau: cehteh: but will writing PCM data with analogWrite work?
05:02 PM soreau: I mean at all
05:03 PM soreau: LeoNerd: stm32 is supported here per topic
05:03 PM LeoNerd: Ahh OK
05:03 PM LeoNerd: Ohright, yes I see now
05:04 PM soreau: also this channel is awesome :)
05:04 PM cehteh: who added stm32 to the topic? :D
05:04 PM cehteh: soreau: that will have the same problem as analogRead()
05:05 PM soreau: cehteh: so you're saying it will work
05:05 PM cehteh: you get jitter, high frequnecy distortions and way too much processing overhead to be sane
05:06 PM cehteh: *but* the stm32 is fast it may handle it, so at least the processing overhead may not bother you *for now* .. while signal quality (first points) will go down the drain anyway
05:06 PM soreau: so my data is probablt borked then
05:06 PM soreau: probably*
05:06 PM cehteh: still its the worst way to do so even when it works, mkay when you just want to test something quick and dirty, but completely inapprobiate for real world apps
05:07 PM cehteh: also i have no idea how you time/syncronize it and if it really keeps up with processing overhead or starts lagging/dropping samples, thats up to you to figure out
05:07 PM soreau: well I'm getting something ever so slightly audible over the highpitched static
05:08 PM cehteh: ah moment analogWrite only sets a relative low frequency pwm
05:08 PM soreau: yes
05:08 PM soreau: hence my question
05:08 PM cehteh: on a 2nd thought that may not work
05:08 PM cehteh: no idea if thats connected to DAC's
05:08 PM soreau: Is there a way to set a contant voltage on an analog pin?
05:09 PM soreau: constant*
05:09 PM cehteh: depends on the mcu you are useing, few have a DAC
05:09 PM cehteh: but that needs to be programmed correctly as well
05:09 PM cehteh: the datasheet is your friend
05:09 PM LeoNerd: The 1-series xtiny chips have a DAC, but I recently found out how fscking annoying it is to use. It can't use VCC as a reference voltage, only one of the internal VREF generated values :(
05:10 PM cehteh: well better start with eleminating your analogRad() first :D
05:10 PM soreau: I'm not seeing any examples yet though I see what looks like an unused function group in the library
05:10 PM soreau: just have to figure out how dac is supposed to be used
05:11 PM cehteh: usually you want some amp after it and prolly some filter as well else you get switching noise, with opamp/active filter you can nicely integrate that into one thing
05:11 PM cehteh: soreau: first make the sampling correct before you progress
05:11 PM cehteh: you'll already lean most of the things how playback works while doing so
05:11 PM soreau: cehteh: I made it configurable with mon and stereo also configurable
05:11 PM cehteh: using timers and dma.. and doublebuffer
05:11 PM soreau: works great, I just have to change the rate in the sketch
05:12 PM cehteh: but you still use analogRead or?
05:12 PM soreau: no
05:12 PM cehteh: ah ok
05:12 PM soreau: the ADC lib I'm using does DMA stuff I beleive so maybe I can look there
05:12 PM cehteh: yes
05:12 PM LeoNerd: In general: if whatever you're doing is not "a quick and nasty hack", you don't want to be invoking arduino code at all
05:13 PM cehteh: playback is kindof that in reverse
05:13 PM cehteh: haha i saied that days ago
05:14 PM cehteh: has the F1 you use a DAC anyway? iirc not all have
05:15 PM soreau: stm32f103c8 https://www.st.com/content/ccc/resource/technical/document/application_note/6f/35/61/e9/8a/28/48/8c/DM00129215.pdf/files/DM00129215.pdf/jcr:content/translations/en.DM00129215.pdf
07:14 PM cehteh: which f1 are you using?
07:14 PM cehteh: there are about 50 or more variants
07:29 PM soreau: cehteh: stm32f103c8
07:29 PM soreau: maybe libmaple just doesn't have it implemented
07:29 PM rue_mohr: blue pill no DAC
07:29 PM cehteh: get a red pill :D
07:30 PM soreau: well I can make it a usb speaker but outputting the data using analogWrite gives contant static
07:30 PM soreau: seems like the data is wrong
07:31 PM cehteh: or your understanding of the thing
07:31 PM cehteh: did you try to send zeros or sawtooth? :)
07:31 PM cehteh: possibly its just the noise of the system
07:31 PM soreau: well I assume mute would be 0's
07:32 PM soreau: but in that case I get mostly 127 values
07:32 PM cehteh: i dont know, is it signed or unsigned?
07:32 PM soreau: hm
07:32 PM soreau: well it should be PCM8
07:33 PM cehteh: whatever
07:33 PM soreau: maybe I just need to subtract that much
07:33 PM cehteh: 'maybe' ...
07:33 PM cehteh: how about reading first whats expected there?
07:34 PM vmt: soreau: likes to do debugging by trial-and-error, it's his favorite:D
07:34 PM vmt: the : should not be there
07:35 PM vmt: PCM8 can be *interpreted* either as S8 or U8. you should know how your system is set up.
07:37 PM vmt: it's a quick way to get assfucked just getting something to work by sheer luck fiddling with stuff and having no clue about the configuration of the system. the variables that you need/are important should be available and known
07:37 PM vmt: otherwise either your design is bullshit or you're doing it wrong
07:37 PM cehteh: until it crumbles under your ass :)
07:38 PM vmt: and this is partly because you're using some libarduinomaplebirchsprucefirtree, and who the hell knows anything about its state
07:39 PM vmt: it's just "PCM8"
11:51 PM day__ is now known as day