Programfault when dereferencing a 64bit int on due
I concur with Majenko's comment: it's probably a memory alignment
problem. I don't know the specifics of the Due, but when you access
memory in chunks of 32&nbsp;bit data words on a 32&nbsp;bit CPU, it can
happen that the architecture requires the data words to be aligned to
32&nbsp;bit (i.e. 4&nbsp;byte) boundaries. This means that the address
of an uint32_t or uint64_t should be a multiple of&nbsp;4. Maybe
even&nbsp;8 for a uint64_t, you will have to check.

The only solution to this issue is to fill the packet byte by byte:

void putData64(byte* packet, int pos, uint64_t data)
{
    union {
        uint64_t integer;
        byte bytes[8];
    } h = { .integer = data };
    for (int i = 0; i &lt; 8; i++) {
        packet[pos+2+i] = h.bytes[i];
    }
}


Note that the AVR (in the Nano) is an 8 bit architecture with no
alignment constraints whatsoever.