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
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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!
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
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!
-----------------------------------------------------------------------------------------------------------------------