#avr Logs

Apr 06 2021

#avr Calendar

07:59 AM PublicWiFi: so long as my clock is damn stable is the _delay_ms() library pretty accurate? is am I better off using the AVR timer?
08:07 AM PublicWiFi: long story short I'm building a LED cube and I'd like to be able to do "30 frames per second" haha, obviously the avr can do way more than that if the array data is already calculated
08:39 AM cehteh: PublicWiFi: never use delay
08:40 AM PublicWiFi: yeah you're right lol
08:48 AM specing_ is now known as specing
02:41 PM exp: cehteh: what's wrong with delay?
02:41 PM exp: it's not like you have many alternatives
02:41 PM exp: (just use a RTOS is not really a fair alternative)
02:42 PM polprog: it's blocking, it's not very accurate, its better to use a timer
02:42 PM polprog: i only use delay for testing stuff and when it really needs to "just wait, whatever"
02:46 PM exp: ISRs also block
02:46 PM exp: and timers require much more setup and consume hardware resources
02:47 PM LeoNerd: I usually do longer delays with my scheduler
02:47 PM exp: i just felt that it was a bit of a blunt and arguably incorrect statement
02:47 PM exp: if you have a scheduler, use it, if you have a tick based event queue, use it
02:48 PM nohit: yes, i wouldnt say "never use delay"
02:49 PM polprog: yes but if you have a timer isr set every 100ms it will trigger every 100ms (unless other isrs trigger), and if you have some code and a delay_ms(100); it will not run every 100ms
02:49 PM polprog: there are cases where its fine to use it
02:51 PM exp: yeah using a timer ISR might be fine, but equally you can end up writing horrible spaghetti code and making a terrible mess of thing
02:52 PM exp: blocking code is almost always much easier to reason about, and a delay does not stop an ISR from firing, so unless you need to service other events in the meantime, it might be a legitimate approach
04:13 PM cehteh: well at least only use it when you really need you need to, whcih in practice is pretty low, esp delays longer than a few µs always have some better alternative
04:13 PM cehteh: even a polling loop would be better because its more accurate
05:07 PM aggrav8d: hello!
05:07 PM aggrav8d: I hope you're doing well today.
05:08 PM aggrav8d: I've got an STM32F103CB on my desk connected via USB to Windows10 with VSCode and PlatformIO. Win10 doesn't recognize the device, says there's no device descriptor.
05:08 PM aggrav8d: does this mean there's no bootloader?
05:26 PM nohit: we dont take kindly...
05:28 PM twnqx: don't the STM32s have that in ROM?
05:29 PM twnqx: but you have to connect a pin correctly to have it run or something like that
08:47 PM specing_ is now known as specing