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.

Reg- 9bit uart transmission

Other Parts Discussed in Thread: TM4C123GH6PM, CONTROLSUITE

Hello

           I am using TM4C123GH6PM microcontroller for my application, I am using Uart for external RS485 communication. In this i want to use UART 9bit address set communication mode. If anybody help how to configure it in my micro controller. Example code is better to understand for me.

With Regards
Yuvaraj

  • Control Suite might have an example (C:\ti\controlSUITE\device_support and www.ti.com/.../controlsuite).
  • Hello Yuvaraj,

    Did you check the peripheral driverlib documentation on the API call structure for 9-bit UART?

    Regards
    Amit
  • Hello

    Please tell how to generate UART Reception interrupt in TM4C123GH6PM micro controller, i am using CCS6.0. In my code, i check any data available in UART register then i read data from UART register, but i need when data received by UART register a interrupt should generate and i read data in that interrupt routine, so how to generate UART interrupt.

    MY CODE is

    int main(void)
    {
        //init_controller();
        //============ Init USART0 ====================================================================================================================
            SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);

            SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
            SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

            GPIOPinConfigure(GPIO_PA0_U0RX);
            GPIOPinConfigure(GPIO_PA1_U0TX);

            GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

            UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), 19200, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
            //UARTIntDisable(UART0_BASE, UART_INT_TX);
            UARTIntEnable(UART0_BASE, UART_INT_TX | UART_INT_RX);   //UART_INT_TX | UART_INT_RX)


            IntMasterEnable(); //enable processor interrupts
            IntEnable(INT_UART0); //enable the UART interrupt
        //============  End ofInit USART0 ====================================================================================================================

        while(1)
        {


            for(temp_int = 0; temp_int < 65534;)
            {
                temp_int++;
            }
        }

    }

    void UART0IntHandler(void)        /// This routine not working
    {
        temp = 0;
    }

    With regards

    Yuvaraj

  • Hello Yuvaraj,

    Did you check the API's and the interrupt bit setting when a 9-bit message is received?

    extern void UART9BitEnable(uint32_t ui32Base);
    extern void UART9BitDisable(uint32_t ui32Base);
    extern void UART9BitAddrSet(uint32_t ui32Base, uint8_t ui8Addr,
    uint8_t ui8Mask);
    extern void UART9BitAddrSend(uint32_t ui32Base, uint8_t ui8Addr);

    Regards
    Amit
  • Thank you AMit   I check it

  • Hello Yuvaraj

    You checked it and it does not work or are you going to check it?

    Regards
    Amit
  • Hello AMit

        I working on it, but it does not work properly still now

    Regards

    Yuvaraj

  • Hello Yuvaraj

    How are you testing the 9 bit mode? I.e. what is the device that TM4C12x device is communicating with?

    Regards
    Amit
  • Hello Amit

    I am communicating with TM4C123 same device.

    Regards
    Yuvaraj