So would I do it like this to read PLL2 Registers? (PLL2 regs start at
0x01C40C00, see page 94 of TMS320DM6446 datasheet)

 

int memfd;

memfd = open("/dev/mem", O_RDONLY | O_NONBLOCK, 0);

 

if (memfd == -1) {

ERR("Cannot open /dev/mem (%s)\n", strerror(errno));

return FAILURE;

}

                

unsigned char *memread;

memread = (unsigned char*)malloc(512);

memread = (unsigned char*)mmap(NULL, 16, PROT_READ, MAP_SHARED, memfd,
0x01C40C00);

printf("PLL Values %08x\n", *(unsigned int*)memread);  

 

Thanks

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to