A newbie question I'm afraid.
LPC2294 ARM
I am trying to read a word, ie a short int, from an ethernet controller. It's in 8 but mode and can't do much about it at the moment.
unsigned short *ptr //say read from device *(ptr + OFFSET)
The BCFG2 is set up 8 bit mode.
When compiled, the value of "OFFSET" is doubled, and the data fetch command is "ldrh r3, [r3]".
Why does gcc double "OFFSET"? There's no need for this even in word fetches!
Does "ldrh" expect a word aligned peripheral? Would there normally be 2 - byte fetches or a single erroneous word fetch?
Sorry if this has an obvious answer.