Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

What else should I do to enable UART interrupt in SYSBIOS 6

$
0
0

Hi,

I modify OMAL L138 LCDK starterware Uart-2 interrrupt example prject code (C674x DSP side)  to SYSBIOS. The SYSBIOS project is from example static project. It is not seen Uart Interrupt function run with breakpoint setting there.

I use GUI set HWI. Here is the code line part:

var hwi0Params = new Hwi.Params();
hwi0Params.instance.name = "hwi_uart2";
hwi0Params.eventId = 69;
hwi0Params.maskSetting = xdc.module("ti.sysbios.interfaces.IHwi").MaskingOption_ALL;
Program.global.hwi_uart2 = Hwi.create(6, "&uart2_ISR", hwi0Params);

(Please visit the site to view this file)

Can any expert point out what is wrong/missing in my code?

Void main()
{
// unsigned int intFlags = 0;
unsigned int config = 0;

/* Enabling the PSC for UART2.*/
PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_UART2, PSC_POWERDOMAIN_ALWAYS_ON, PSC_MDCTL_NEXT_ENABLE);

/* Setup PINMUX */
UARTPinMuxSetup(2, FALSE);

/* Enabling the transmitter and receiver*/
UARTEnable(SOC_UART_2_REGS);

/* 1 stopbit, 8-bit character, no parity */
config = UART_WORDL_8BITS;

/* Configuring the UART parameters*/
UARTConfigSetExpClk(SOC_UART_2_REGS, SOC_UART_2_MODULE_FREQ, BAUD_115200, config, UART_OVER_SAMP_RATE_16);

/* Enabling the FIFO and flushing the Tx and Rx FIFOs.*/
UARTFIFOEnable(SOC_UART_2_REGS);

/* Setting the UART Receiver Trigger Level*/
UARTFIFOLevelSet(SOC_UART_2_REGS, UART_RX_TRIG_LEVEL_1);

/*
** Enable AINTC to handle interrupts. Also enable IRQ interrupt in ARM
** processor.

SetupInt();
*/


/* Configure AINTC to receive and handle UART interrupts. */
// ConfigureIntUART();


Swi_post(swi0);
Swi_post(swi1);
Clock_start(clk1);
Hwi_enable();
Hwi_enableInterrupt(6);
BIOS_start();
}

// breakpoint is set here: (not stop though at emulator)
void uart2_ISR()
{

}


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>