how to reduced interrupt priority of TC1?

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

leo.ni
Posts: 52
Joined: Mon Jun 06, 2016 4:20 am

how to reduced interrupt priority of TC1?

Tue Jul 05, 2016 12:28 pm

Hi,all! i want to reduce interrupt priority of TC1,because when i start the TC1(it just toggle a gpio in it's ISR),my usb port can't be recognized by the system. So,i want to reduce it's priority.How to do this? Thanks!
blue_z
Location: USA
Posts: 2128
Joined: Thu Apr 19, 2007 10:15 pm

Re: how to reduced interrupt priority of TC1?

Tue Jul 05, 2016 9:17 pm

What's the context? Is this bare metal, SoftPack, some OS?

Regards
leo.ni
Posts: 52
Joined: Mon Jun 06, 2016 4:20 am

Re: how to reduced interrupt priority of TC1?

Wed Jul 06, 2016 3:29 am

Thanks a lot! i use ucos.There is a conflict between the TC1 and USB,when i start TC1,usb failed. i resolved this problem but faced an other issue:i want TC1 interrupt per 4ms,but it interrupted about 25us,and if i changed the number "250",the interval has no any changes.Something am i missing?my configure as follow(my board is sama5d3,and BOARD_MCK is 12,000,000/3/2*66 = 132,000,000):

Code: Select all

void _ConfigureTc1( void )
{
    uint32_t div, tcclks;

    /* Enable TC1 peripheral */
    PMC_EnablePeripheral(ID_TC1);
    /* Configure TC0 for 250Hz frequency and trigger on RC compare */
    TC_FindMckDivisor(250, BOARD_MCK, &div, &tcclks, BOARD_MCK);
    TC_Configure(TC1, 0, tcclks | TC_CMR_CPCTRG);
    TC1->TC_CHANNEL[0].TC_RC = (BOARD_MCK / div) / 250;
    /* Configure and enable interrupt on RC compare */
    IRQ_ConfigureIT(ID_TC1, 0, ISR_TC1);
    IRQ_EnableIT(ID_TC1);
    TC1->TC_CHANNEL[0].TC_IER = TC_IER_CPCS;
}
Thanks a lot again!
blue_z
Location: USA
Posts: 2128
Joined: Thu Apr 19, 2007 10:15 pm

Re: how to reduced interrupt priority of TC1?

Wed Jul 06, 2016 9:53 pm

leo.ni wrote:i want TC1 interrupt per 4ms,but it interrupted about 25us
If the IRQ_ConfigureIT() is the same as the SoftPack library, then the second parameter should specify mode and priority. Zero is the lowest priority.

But that doesn't seem to be a priority issue at all.
It seems like you're reporting a fast recurring interrupt?
Then it's not a priority issue, but the interrupt condition is not acknowledged.
Instead of the initialization code, you need to look at the ISR named ISR_TC1.

Regards
leo.ni
Posts: 52
Joined: Mon Jun 06, 2016 4:20 am

Re: how to reduced interrupt priority of TC1?

Mon Jul 11, 2016 3:18 am

Thans for your reply!

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest