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.
Now I use uart1 RX interrupt. UART0 keep the SDK code and it can wok as console. I can send data by PIN58 and also can get data by PIN57 on UART1. But it always go in FaultISR when i receiver data from UART1.
The following is code.
PinMuxConfig(void)
{
//
// Enable Peripheral Clocks
//
MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK);
MAP_PRCMPeripheralClkEnable(PRCM_UARTA1, PRCM_RUN_MODE_CLK);
//
// Configure PIN_55 for UART0 UART0_TX
//
MAP_PinTypeUART(PIN_55, PIN_MODE_3);
//
// Configure PIN_57 for UART0 UART0_RX
//
MAP_PinTypeUART(PIN_57, PIN_MODE_3);
//
// Configure PIN_58 for UART1 UART1_TX
//
MAP_PinTypeUART(PIN_58, PIN_MODE_6);
//
// Configure PIN_59 for UART1 UART1_RX
//
MAP_PinTypeUART(PIN_59, PIN_MODE_6);
}
int initUart1(void)
{
uartRxBuff[0] = 0;
uartRxLength = 0;
MAP_UARTConfigSetExpClk(UARTA1_BASE,MAP_PRCMPeripheralClockGet(PRCM_UARTA1),
UART_BAUD_RATE, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
UART_CONFIG_PAR_NONE));
MAP_UARTFlowControlSet(UARTA1_BASE, UART_FLOWCONTROL_NONE);
MAP_UARTFIFODisable(UARTA1_BASE);
MAP_UARTIntRegister(UARTA1_BASE, Uart1IntHandler);
MAP_UARTIntEnable(UARTA1_BASE, UART_INT_RX);
MAP_UARTIntEnable(UARTA1_BASE, UART_INT_RX|UART_INT_RT);
return SUCCESS;
}
void Uart1IntHandler(void)
{
unsigned long intStatus = MAP_UARTIntStatus(UARTA1_BASE, TRUE);
if((intStatus & UART_INT_RX) && MAP_UARTCharsAvail(UARTA1_BASE))
{
uartRxLength++;
uartRxBuff[uartRxLength] = (unsigned char)MAP_UARTCharGetNonBlocking(UARTA1_BASE);
}
else if(intStatus & UART_INT_RT)
{
uartRxBuff[0] = uartRxLength;
uartRxLength = 0;
}
MAP_UARTIntClear(UARTA1_BASE, intStatus);
}
Can anybody tell me what I'm wrong here? Thanks!
Hi Praveen,
I am using FreeRTOS. The TI_RTOS will be used if i remove the USE_FREERTOS in Preprocessor, right?
Best Regards!
James
James,
I can't access shared files from my workplace. Could you please upload it to this e2e forum thread.
Here is how to do it : http://e2e.ti.com/group/helpcentral/w/e2e/148.4-5-attaching-a-file\
Thanks and Regards,
Praveen
James,
With your code I could easily receive 200 characters without any issue into uartRxBuff.
One next key press it goes to FaultISR. Can you please confirm if this condition is not hitting in your setup.
Simply change this uartRxBuff[uartRxLength] to uartRxBuff[uartRxLength%MAX_RX_BUFF] in the interrupt handler.
Best Regards,
Praveen
James,
Apologies for that, I missed the IAR version you mentioned, we had a known issue with IAR 7.20 for which the patch was released.
I tried your code on IAR 7.30.4 (a fresh installation), CC3200SDK_1.0.0, CC3200-LAUNCHHXL REV 4.1 but still I am not able to recreate your issue.
From your shared code you are using UARTA0 only for Displaying banner, there is only one task 'ZigbeeUartParse' which keeps printing something on UARTA1 and the interrupt handler is responsible for receiving on UARTA1. Is my understanding correct?
I am only feed characters to UARTA1 interface.
See the image below, I used the wlan_ap.out file you had shared instead of compiling it on my setup. I could receive 10 characters without any issue, the code is still looping in prvIdleTask not in FaultISR.
Thanks and Regards,
Praveen
Hi James,
RT interrupt is only for FIFO mode. Since you are disabling your FIFO you are not receiving this.
See the description at section 6.2.3.3 Interrupts in the CC3200 TRM.
Thanks and Regards,
Praveen