Hello, 

 

is there any way to find out why this error occurs ??

 

kind regards

sven

0 (0 Votes)
RE: HardFault_Occured_going to reset the processor
Answer
10/8/18 8:59 AM as a reply to Sven Kabitzki.
Hello Sven,

I will gladly help you to find cause for this error. For that, it would be very helpful if you could provide information when this is actually happening.

Are you trying an example of the Welcome Screen, which is throwing this error? If I am right with that, could please provide the information about the example you are trying to use?

Otherwise, are you using an own application?

Kind regards,
Franjo
0 (0 Votes)
RE: HardFault_Occured_going to reset the processor
Answer
10/8/18 3:38 PM as a reply to Franjo Stjepandic.

Hello Franjo, 

 

thanks for your reply.

 

Sadly i am somehow over this point and the error currently does not appear anymore. 

i will get back to this, if it will happen again :-)

 

kind regards

sven

 

0 (0 Votes)
RE: HardFault_Occured_going to reset the processor
Answer
10/9/18 2:34 PM as a reply to Sven Kabitzki.
Hello Sven,

I'm glad that you were able to find a solution for your issue.

Please let me know if you have any kind of further concerns or questions.

Kind regards,
Franjo
0 (0 Votes)
RE: HardFault_Occured_going to reset the processor
Answer
10/9/18 3:24 PM as a reply to Franjo Stjepandic.

Ups, i did it again ;-) 

now it happens when i read the sd card.

i wrote successfully some xml structure to a file on the sd card. 

the data is there. 

The i try to read the data with this little script:

FILINFO fileInfo;
	FIL fileObject;
	FRESULT fileSystemResult;
	UINT bytesRead;

	printf("Open file\r\n");
	f_open(&fileObject, FILENAME, FA_OPEN_EXISTING | FA_READ);
	printf("Seek start\r\n");
	f_lseek(&fileObject, 0x00);

	printf("read files\r\n");
	char ramBufferRead[UINT16_C(fileInfo.fsize)]; // Temporary buffer for read file
	fileSystemResult = f_read(&fileObject, ramBufferRead, fileInfo.fsize,&bytesRead);

	if((fileSystemResult != FR_OK) || (fileInfo.fsize != bytesRead)){
	  printf("Error: Cannot read file %s \n\r",FILENAME);
	}
	else{
	  ramBufferRead[bytesRead] = '\0';
	  printf("Read data from file %s of the SD card \n\r",FILENAME);

	  printf(ramBufferRead);
	  printf("\n\r");
	  printf("Read %d Bytes from file %s of the SD card \r\n",bytesRead, FILENAME);
	}
	f_close(&fileObject);

 

The outcome is:

INFO | XDK DEVICE 1: Open file
 INFO | XDK DEVICE 1: Seek start
 INFO | XDK DEVICE 1: read files
 INFO | XDK DEVICE 1: HardFault_Occured_going to reset the processor  
 INFO | Port 'COM8' has been disconnected

 

Do you have any idea ??

 

kind regards

sven

0 (0 Votes)
RE: HardFault_Occured_going to reset the processor
Answer
10/10/18 5:58 AM as a reply to Sven Kabitzki.

Hello, 

nevermind - i guess it has something to do, with the fileinfo size. 

changed it to linewise reading and it works now :-) 

 

kind regards

sven

0 (0 Votes)
RE: HardFault_Occured_going to reset the processor
Answer
10/10/18 8:36 AM as a reply to Sven Kabitzki.
Hello Sven,

I am glad to hear, that you were able to solve the error by yourself.

Please feel free to ask if you have any further concerns or questions.

Kind regards,
Franjo
0 (0 Votes)