Post Created date
32768Hz Crystal... 100ms ticks possible?
If you just need a tick counter that increments at 10Hz, you can do something like this: volatile uint32_t tick; void isr_32768() { static uint16_t little_tick; little_tick...
Tuesday, 17 July 2018 - 21:39
Remove unused function warning for functions for #include files
theusch wrote:[How did Cliff deduce C++?] My guess is the "_Z3foov" in the listing. That's a C++ mangled name.
Wednesday, 11 July 2018 - 21:41
NaN macros not working correctly?
If the variable is uninitialized, anything goes. That's because using the value of an uninitialized variable is undefined behavior. The compiler can make any kind of...
Wednesday, 11 July 2018 - 20:32
Issues with memcpy on SAML21
Did you mean to use memset rather than memcpy? Otherwise you're copying data from address 0, which is probably not what you want.
Tuesday, 12 June 2018 - 23:28
will using eeprom_update_block be more efficient?
clawson wrote: Well two things:   1) If you are going to perist over versions do it like this: typedef struct { int width; int height; uint8_t rate; uint8_t...
Wednesday, 23 May 2018 - 17:09
SAMD21G18 - Bug in MUL instruction? Extensive testing indicates hardware.
Maybe I'm missing something, but if you want to multiply two 32-bit signed values to get a 64-bit signed value, shouldn't $FFFFFFFF multiplied by $FFFFFFFF give you $...
Friday, 6 April 2018 - 23:34
Confusing behaviour of pointers
I'm going to question the purpose of declaring __hp1 and __hp2 as pointers in the first place. Why not simply make them instances of struct __heaplist like this? struct...
Thursday, 11 January 2018 - 15:52
Preemptive vs. Cooperative Multitasking
That appears to use the same technique as Protothreads, which was first released in 2005.
Friday, 22 December 2017 - 15:32
Linked Lists & ISRs
aarcane wrote: It won't perform an out of bounds read on the actual internal array named Buffer, but it will allow you to read past the end of the circular buffer data type to the...
Wednesday, 6 December 2017 - 23:41
Linked Lists & ISRs
aarcane wrote:That code is beautiful, but it leaves some interesting loopholes, such as double reading from the buffer, I don't see any double reading from the buffer. Which...
Wednesday, 6 December 2017 - 23:07
RET after doing BRCC
The "DEC" instruction doesn't affect the "C" flag. You have an infinite loop if carry is clear before the loop starts.
Monday, 4 December 2017 - 17:36
Write Arduino conditional branches in AVR ASM
sparrow2 wrote: One of the benefits with ASM is that you can evaluate in the order you want and that way speed the code up. in your example it could be that j very often is above...
Monday, 4 December 2017 - 15:54

Pages