Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. help: how to write 32 bits to 4 byte aligned address?

help: how to write 32 bits to 4 byte aligned address?

Scheduled Pinned Locked Moved Managed C++/CLI
helptutorialadobehardwareperformance
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rostfrei
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • R Rostfrei

      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

      J Offline
      J Offline
      Joey Bloggs
      wrote on last edited by
      #2

      pragma pack 1 ? Haven't really thought this thru, but worth trying ~

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups