help: how to write 32 bits to 4 byte aligned address?
-
Hello! I'm working on ARM embedded device. I have Flash device mapped into memory space trough which I controll it. I have the following problem: I have to write some 32bit data to some address in memory. When I write to the location that is not modulo of number 4, I get exception; example: 0x01000000 - ok 0x01000001 - exception 0x01000002 - exception 0x01000003 - exception 0x01000004 - ok How to overcome this? Is it possible to write 32 bit data in atomic way and not first upper and then lower 2 bytes? Rostfrei -- modified at 3:30 Thursday 20th October, 2005
-
Hello! I'm working on ARM embedded device. I have Flash device mapped into memory space trough which I controll it. I have the following problem: I have to write some 32bit data to some address in memory. When I write to the location that is not modulo of number 4, I get exception; example: 0x01000000 - ok 0x01000001 - exception 0x01000002 - exception 0x01000003 - exception 0x01000004 - ok How to overcome this? Is it possible to write 32 bit data in atomic way and not first upper and then lower 2 bytes? Rostfrei -- modified at 3:30 Thursday 20th October, 2005
pragma pack 1 ? Haven't really thought this thru, but worth trying ~