How to determine origin of Default ISR error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to determine origin of Default ISR error

跳至解决方案
3,069 次查看
michaelkoller
Contributor III

Hey there,

in my project I am using the UART capability of the K64F board. I didn't use it for a couple of days, and now when I restart it the program stalls it stalls. I have reduced my program to the following line (plus a win the main while loop for example:

    UART_DRV_SendData(UART_INSTANCE_1, test, 4u);  

 

 

If I go into the debugger and press pause, it shows me line 349 in the startup_MK64F12.S file, which has something to do with the default ISR.

 

Whitch includes, project settings and setup code in the program should I check to fix that?

The only thing I changed is the debugger, because somehow the board had become unresponsive and I had to repair it by dropping a PEMicro .bin file into the bootloader.

 

Thanks for any help and information,

Michael

标签 (1)
0 项奖励
1 解答
2,538 次查看
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Michael Koller

When the Default ISR is called it means that you missed to put a handler in your project, for example, you enable a interrupt but you don't have a handler that attends this interrupt, or other case is that you try to use a module without enable the corresponding clock.

You can normally determinate what handler you missed by debugging your project step by step, and when you stuck in the default handler, you see what line is the one that caused the default handler. I see that you are using ksdk in your project, do you include a corresponding UART init? UART_DRV_Init(BOARD_DEBUG_UART_INSTANCE, &uartState, &uartConfig);

The UART module is set up here, and if you don't include it, it doesn't enable uart clock, neither the tx and rx and the baudrate is no defined.

Did you already check the example code that is included in ksdk? you could check the example code for UART and then clone it and change it as you need.

Hope this information coudl help you, please tell me if you have any other question.


Have a great day,
Jorge Alcala

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
3 回复数
2,538 次查看
michaelkoller
Contributor III

Hey there,

So, I found the problem: I was using the debug uart in two different ways (printf() and UART_DRV_Init(BOARD_DEBUG_UART_INSTANCE, &uartState, &uartConfig))

I only initialized the usage of the printf() and thought it would do the other kind of call as well. you were right, that I simply missed the other Uart initialization.

Thanks!

0 项奖励
2,538 次查看
michaelkoller
Contributor III

Hey, thanks for that help!

I will check all you said and try the  single step debug. The thing is, the original project was a ksdk example driver project for uart. Maybe I changed something unnoticingly.

Thanks again, I'll tell whether it worked.

Best,

Michael

0 项奖励
2,539 次查看
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Michael Koller

When the Default ISR is called it means that you missed to put a handler in your project, for example, you enable a interrupt but you don't have a handler that attends this interrupt, or other case is that you try to use a module without enable the corresponding clock.

You can normally determinate what handler you missed by debugging your project step by step, and when you stuck in the default handler, you see what line is the one that caused the default handler. I see that you are using ksdk in your project, do you include a corresponding UART init? UART_DRV_Init(BOARD_DEBUG_UART_INSTANCE, &uartState, &uartConfig);

The UART module is set up here, and if you don't include it, it doesn't enable uart clock, neither the tx and rx and the baudrate is no defined.

Did you already check the example code that is included in ksdk? you could check the example code for UART and then clone it and change it as you need.

Hope this information coudl help you, please tell me if you have any other question.


Have a great day,
Jorge Alcala

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励