This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM: 16-bit RAM non-byte addressable

I have a 16-bit wide RAM that doesn't have the ability to be byte addressed. However, the compiler is compiling the code with instructions that write single bytes. This is resulting in data overriding other data. Is there a way to tell the compiler that the memory can only be accessed using 16-bit data so that my RAM doesn't get corrupt?

Parents
  • I guess I should clarify that statement. What I mean, is that there is some code that uses the char data structure, which is 8-bits. So, the compiler spits out a bunch of STRB instructions, which are 8-bit stores. So, if I wanted to write the value of 0x04 to address 0x0 and then 0x28 at address 0x1. The compiler does a STRB 0x04 to location 0x0. My SDRAM gets the value 0x0404 on its data pins and locations 0x0 and 0x1 get the data 0x0404. Then it does a STRB 0x28 at location 0x1. This repeats overriding the original data at location 0x0. In the end I get 0x28 at addresses 0x0 and 0x1.

Reply
  • I guess I should clarify that statement. What I mean, is that there is some code that uses the char data structure, which is 8-bits. So, the compiler spits out a bunch of STRB instructions, which are 8-bit stores. So, if I wanted to write the value of 0x04 to address 0x0 and then 0x28 at address 0x1. The compiler does a STRB 0x04 to location 0x0. My SDRAM gets the value 0x0404 on its data pins and locations 0x0 and 0x1 get the data 0x0404. Then it does a STRB 0x28 at location 0x1. This repeats overriding the original data at location 0x0. In the end I get 0x28 at addresses 0x0 and 0x1.

Children