Other Parts Discussed in Thread: SYSBIOS
I need to find SYS/BIOS6 HWI examples for C6748 or C6746 to be able to understand how to configure an HWI.
I need to configure interrupts for the UART.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Other Parts Discussed in Thread: SYSBIOS
I need to find SYS/BIOS6 HWI examples for C6748 or C6746 to be able to understand how to configure an HWI.
I need to configure interrupts for the UART.
Hi Marko Siponen,
Unfortunately there is no specific HWI example. However there is a SWI example that you can look at.
The SWI configuration in the Swi example would be nearly identical to the configuration required for Hwi. Please have a look at the Swi example and try from there.
Steve
I got the following error message (assertion failure) when the board receives the first byte on the UART:
ti.sysbios.gates.GateMutex: line 97: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.
xdc.runtime.Error.raise: terminating execution
When I looked in the GateMutex.c file on row 97 I saw the following:
/* make sure we're not calling from Hwi or Swi context */
Assert_isTrue(((BIOS_getThreadType() == BIOS_ThreadType_Task) ||
(BIOS_getThreadType() == BIOS_ThreadType_Main)),
GateMutex_A_badContext);
It looks like the interrupt generated is not a HWI.
I put a breakpoint in the HWI. I could se that it was called when the URAT received a byte.
The problem was that I had a printf() in my HWI. When I removed it the HWI worked. Problem solved.
Marko,
It looks like you resolved your issue, so we will mark this thread as Closed.
One comment: printf() is a non-realtime function call and is generally inappropriate for insertion into ISRs. If you want to instrument your time critical processing, you should look into using the SYS/BIOS Log functions for this purpose.
Dave