Undefined error after several time of running mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Undefined error after several time of running mode

942 Views
mariospelekis
Contributor III

Hi,

I am working on a K22FN512 MCU and implemented a program that reads from on uSD Card using FATFS(SPI) and send data to the I2S Channel of the microcontroller through one DMA Chanel. Firmware also use malloc functions 2xADC and I2C.

During the development of the code and the initial tests I got no problem at all, but after some hours of continues working that vary from 8 to 48 I get some problems I try to identify.

In order to catch my problem in my firmware I have set 16 levers of errors so if something goes wrong I ll be there to catch it. For Example I refer to some of them, f_mount, f_read , SAI-DMA Transfer, SAI-DMA Transfer Timout, Malloc Error etc.

Except this method I have also use a system that will pause my execution of code and record the problem according the ARM registers I found around the community.

Also I set the program under Debug session on the mcu in order to catch the problem.

Unfortunately the next day I found out that the debug session had been paused?? and the IDE (KDS 3.0.0) it was stacked in the state showing in th attach file (v1.png).

I am afraid that even the problem with the debug solve the undifiented problem will reamain so I would like to here a second opinion on what could probably create the problem of stop execution after several time in a firmware tha handle so much peripherals.

Let me add some extra information about the current debug made result I found.

After the Debug had paused at 0xffffffff imidietly I captures several suspicious point of my code in order to get a more clear vie of it. So in the Images attached we can found all this state when the problem came out.

The most impresive in that phase is that most of the ARM's register are loaded with 0xffff value.

Furthermore, surprisingly I was able to to continue my execution and I found out that the next lines of code that the system execute were inside the my Error Function demostrating the error 16 that meens  SAI-DMA Transfer Timout. you can see all the error list from the attached excel.

v2.png

v1.png

Best Regards,

Pelekis Marios,

Intelco Electronics

Labels (1)
0 Kudos
1 Reply

813 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

This problem is not easy to check.

I can't define this problem is due to your code or IDE right now.

However I was aware you use IDE version KDS3.0 which is too old. I would suggest you try KDS3.2 instead

Kinetis® Design Studio Integrated Development Environment (IDE)|NXP 

If the problem still exists in KDS3.2, please let me know how to reproduce your issue on our side. thus we can check it further.

Thanks.

Jennie Zhang

0 Kudos