This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am3359 register write (beaglebone - linux angstrom)

Other Parts Discussed in Thread: AM3359

Hi,

I`m trying to use the dmtimers of the am3359 as clocks for external devices.

In order to do this I`ve been trying to use "mmap" in order to alter the registers with the values I require.

I began by toggling pins and that seems to be working. However, when I try to alter the pin mux registers or the clock register, I am not able to write (I read the values before and after I do the writing and they are the same).

Here are the steps I took:

1. define the start address of the register I want to alter (ex 0x44E00000 - clock module peripheral registers)

2. int fd = ("/dev/mem", O_RDWR)

3. volatile * u_int32_t register = mmap(0, LENGTH, PROT_READ | PROT_WRITE, MAP_SHARED, fd, ADDRESS)

4. read the area I`m interested in: printf("%X\n",register[OFFSET/4]

5. write my value: register[OFFSET/4] = my_value

6. 4. read the area I`m interested in again: printf("%X\n",register[OFFSET/4]

Any ideas on what I`m doing wrong?!
Anybody has some info on how I can set the dmtimers (timer4,5,6,7) other than mmap (while in linux)? 

Thanks,
Bogdan S