AnsweredAssumed Answered

IMX6UL stopped booting.

Question asked by naveen menaria on Jan 30, 2017
Latest reply on Jan 31, 2017 by Yuri Muhin

Hello Everyone,

 

I am using IMX6UL EVK board, I was working with secure ram(CAAM) read/write. I used following code.

 


//You can access to physical address from user space using mmap.

#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>

#define PHY_ADDR 0x00100000

int main()
{
int i;
int j = 0;
unsigned int *addr;

int fd = open( "/dev/mem", O_RDWR | O_SYNC );
if( fd < 0 )
{
perror( "Error opening file /dev/mem" );
return 1;
}

addr = (unsigned int *) mmap( 0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, PHY_ADDR );
if( addr == NULL )
{
perror( "Error mapping" );
return 1;
}
for( i = 0; i < 1024; i++,j++ )
{
//*(addr + i) = j;
printf( "addr: %X\tval: %X\n", addr + i, *( addr + i ) );
}

if( munmap( addr, getpagesize() ) == -1 )
{
perror( "Error unmaping" );
return 1;
}
}

 

I was trying to write in secure ram of caam, it happened. but when i restarted the board it didnt boot. there comes nothing on the terminal. I checked the secure ram address from imx6ul evk reference manual. Can someone please tell me what should i do about it?

Outcomes