Hi, I am using UDOO Neo board. From A9 , I am trying to write to the AIPS 1 configuration register to give peripheral access to M4. Following is my piece of code which runs on A9. When I write a to virtual address returned by mmap the program control goes out of control. May I know why the control is getting lost? AIPS is located at 0x0207C000 with offset address 0x40000000 #define AIPS_MODULE_1 0x4207C000 virtual_addr = (uint32_t *)mmap(0,(getpagesize() * 1),PROT_READ|PROT_WRITE,MAP_SHARED,fd1,AIPS_MODULE_1); if(virtual_addr == (void *)-1) { printf("\n mmap fail %s\n", strerror(errno)); } else { printf("\n AIPS_MODULE_1 Address %d\n", virtual_addr); } *virtual_addr=0x77777777; if((munmap((void *)virtual_addr, (getpagesize() * 250))) < 0) { printf("munmap failed AIPS_MODULE_1: %s\n", strerror(errno)); exit(1); }
Not sure what your trying to achieve but on the A9 side AIPS 1 start/end is 0x02000000 to 0x020FFFFF see below: 0200_0000 020F_FFFF 1 MB Table 2-3 AIPS-1. See IP listing on separate map. Code: #define AIPS_MODULE_1 0x4207C000 So 0x4207C000 is out of range. Access to these memory region ideally should be done through a kernel driver.
Hi Jas, I am trying to write a bare metal program on M4 using A9 user application. Following ppt explains this, I am using GNU tools from launch pad. https://community.nxp.com/message/607222?commentID=607222#comment-60722 AIPS 1 of M4 is at 0x0207C000 & Offset adrress 0x40000000. I am new to linux.
Your getting confused the address range is 0x02000000 to 0x020FFFFF. If your new to linux then this may not a good exercise to start with, as launching M4 while running linux A9 has some (or many) pitfalls to overcome. You can launch the M4 from uboot which is easier to achieve.
Hi Jas, Thank you for your valuable suggestions. Can you provide me the web link or some document on how to launch the M4 from Uboot?.
Links below may help, if your not understanding the terminology in the links then you will have a steep learning curve and this may not be productive. I.MX6SX M4 on U-Boot-FSLC IMX6SX problem running M4 and A9 both on DDR