Other Parts Discussed in Thread: IWR6843
Hi,
I am working on custom firmware based on the "Out-of-the-Box"-Firmware of the IWR6843AOP.
For a serial communication to an external device I try to use an interrupt on the UART.
For this, the pins are created as in the "out-of-the-box" demo and the UART is initialized.
/******************* PINMUX UART ******************************/ /* Setup the PINMUX to bring out the UART-1 */ Pinmux_Set_OverrideCtrl(SOC_XWR6843AOP_PINU16_PADBE, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR6843AOP_PINU16_PADBE, SOC_XWR6843AOP_PINU16_PADBE_MSS_UARTA_TX); Pinmux_Set_OverrideCtrl(SOC_XWR6843AOP_PINV16_PADBD, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR6843AOP_PINV16_PADBD, SOC_XWR6843AOP_PINV16_PADBD_MSS_UARTA_RX);
and
/* Setup the default UART Parameters */ UART_Params_init(&uartParams); uartParams.writeDataMode = UART_DATA_BINARY; uartParams.readDataMode = UART_DATA_BINARY; uartParams.clockFrequency = gMmwMCB.cfg.platformCfg.sysClockFrequency; uartParams.baudRate = gMmwMCB.cfg.platformCfg.commandBaudRate; uartParams.isPinMuxDone = 1; uartParams.readTimeout = 13; uartParams.readEcho = UART_ECHO_OFF; uartParams.parityType = UART_PAR_EVEN;
Before BIOS_start() is executed, a hardware interrupt is created with the following parameters:
Hwi_Handle hwi0; Hwi_Params hwiParams; Error_Block eb; Error_init(&eb); Hwi_Params_init(&hwiParams); hwiParams.arg = 64; hwiParams.enableInt = 1; hwi0 = Hwi_create(5, &hwi0Fxn, &hwiParams, &eb); if (hwi0 == NULL) { System_abort("Hwi create failed"); } Hwi_enableInterrupt(5); Hwi_enable();
The callback function is also inserted:
void hwi0Fxn(UArg arg){ System_printf ("HWI 0", 0); }
In a task the data is read bytewise from the Uart via
uartReadBytes = UART_read(gMmwMCB.commandUartHandle, &singleBuffer, 1);
However, the callback function is never executed.
The callback is to be used to toggle a GPIO for an rs485 communication later.
Do I have to set other values?
Best Regards
Felix
Further Information:
mmWave SDK: 3.5.0.4
Device: IWR6843AOP