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.

Activation UART4 in AM3517

Other Parts Discussed in Thread: AM3517

Hi,

I tried almost all possible ways to activate UART4 in AM3517, but failed. I tried either 0x4806e000 and 0x4809e000 (as in TRM 0b), but

whenever I tried to read one of registers in UART4, AM3517 generates exception. So, I tried to turn on power, but I couldn't find it,

so I applied it same as OMAP3630 (18th bit), but I failed. So, my questions are

1) memory base is 0x4806e000 is correct?

2) IRQ is 80 or 84?

3) fck is same as uart1 except bit is 23. is it correct?

4) UART4 is in other module domain (like VPFE), but I couldn't find any bit field or registers for UART4. Is it necessary for turn it on?

Thanks in advance

James

  • Hello James,

    1) the base address for UART4 is 0x4809 E000.   There is an issue in the Technical Reference Manual that shows the base address for each of the registers.  You wil need to add the offset to the base address to get the correct address. 

    2)  IRQ for UART4 is 84

    3) fck is enabled on bit 23 of PRCM.CM_FCLKEN1_CORE

    4) you can find the registers for UART4 in the Technical Reference Manual section 14.6.  I am still working to get the base address issue mentioned above fixed, but here is the link to the latest manual: http://www.ti.com/litv/pdf/sprugr0b

     

  • Dear Jeff

    See below your posting to Jennier. It is a little bit confused. In the main text you said base address is 0x4809e000, but In your example on MCR_REG, you use 0x4806E000 instead of 4809E000. Please confirm that 0x4809E000 is correct.

    Second,  I knew that new TRM is there, but when I access one of registers, fault exception happens. So, I am trying to turn UART4 on.

    Is there any registers to turn it on except fck and ick ? Did you have a report someone use UART4 successfully?

    Thanks in advance

    James

     

    Hello Jennifer,

    I see what you are talking about now.  In the actual register description section (14.6.2) where it shows the Physical address of UART1, 2, 3, and 4 it always shows UART4 as it's base address (0x4809 E000) instead of the true physical address.  I will work to get this fixed in the next release of the TRM. 

    The Address offset is the same for all UARTs so you can just take and add the offset of the registers to the base address.  For example:  The MCR_REG (section 14.6.2.10) has an address offset of 0x010. 
    UART1 = 0x4806 A010
    UART2 = 0x4806 C010
    UART3 = 0x4902 0010
    UART4 = 0x4806 E000 + 0x010 = 0x4806 E010

    Best regards,
    Jeff

  • Hi James,

    sorry for the confusion.  The 0x4806E000 was a mistake and I will update that thread.  It should be 0x4809E000 as the base address.  Once you enable the clocks you should be able to read/write the registers. 

    here is a link to another forum post that has some sample code at the end for getting uart4 working:

    http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/int_sitara_am35x/f/422/p/46605/212628.aspx#212628

  • Hi Jeff

    Thank you for update; it helps, but could you double check for your link.

    It says that
    Group Not Found
    The requested Group cannot be found.
    Do I need some permission to read the link?
    James 
  • oops, that is a TI internal link.  I will check to see if I can release the sample code that is there and if so, I will post it here.

  • Hi,

     

    I solved the issue.

    I confirmed that irq is 84, base is 0x4809e000 and both ick and fck should be activated to avoid exception.

    Thanks

    James

  • hi freinds!!

     

    can you me tell in which register do you store the ISR address.

    Please let me know ......

    i have the following code for Irq.c

    #include "am35xx.h"
    #include "types.h"
    #include "irq.h"



    UL32 install_irq( UL32 IntNumber, void *HandlerAddr, UL32 Priority )
    {

            UL32 *vect_addr;
            UL32 *vect_prio;

        if(IntNumber <= 0  && IntNumber >= 31)
        {

         
         INTCPS_MIRC0 = 1 << IntNumber ;                                     /* Disable Interrupt */

        }

        else if(IntNumber <= 32  && IntNumber >= 63)

            {
               

                INTCPS_MIRC1 = 1 << (31 - IntNumber);                    /* Disable Interrupt */


            }

            else if(IntNumber <= 64  && IntNumber >= 95)                /* Disable Interrupt */

            {

       
                   
               INTCPS_MIRC2 = 1 << (63 - IntNumber);                        /* Disacble Interrupt */

            }

            if ( IntNumber >= MAX_NUM_INT )
            {
           
            return (FALSE);
           
            }
            else
            {

          

           vect_addr = (UL32* )(which register + (what index addr * 4));  <----             i need help at this statement.


            vect_prio = (UL32 *)(ILRM_BASE_ADDR + (IntNumber * 4));
            *vect_prio = Priority;
            *vect_addr = (void)Timer0Handler;
            // code to enable interrupt
            return(TRUE);
            }


       return (0);
    }

  • http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/416/p/106085/373798.aspx#373798

     

    Link for .h file