Hello,
I have some problem with DSP BIOS, RTI and interrupt 5
Actually i'm using timer 1 and compare 1,2 and 3 registers, and the interupt 5 to send a frame - via McASP1 in CPU polling mode – at specified dates
The frame is sent via the same McASP link for the 3 case, only the content change.
It work fine when compare register values are spaced enough.
But a problem appears when two compare register values are two close.
The first compare register active the interrupt properly ; So in the interrupt I clear the correponding interrupt flag in RTIINTFLAG register, the i send my frame via McASP1.
If during this interrupt the second compare register set the corresponding RTIINTFLAG the interrupt is not re-latch in the IFR even if it is latched in the RTIINTFLAG register (I checked with a modified version of my software) and I can't send the corresponding frame.
At the begining I thought it was a problem of my DSP BIOS setting.
I'm using the dispatcher for this Interrupt 5 and I checked also with Interrupt mask set to « all » or « no », but there is no difference.
I also thought about checking by myself the RTIINTFLAG register and use ISR register to set the interrupt 5.
It solved the probleme now, but It's not an option for us because if the RTIINTFLAG updated after the test we will got the same problem.
Is that a normal operation I mean the fact that the same interuption cannot be automaticly relatched if your are already in the interuption sub routine ?
I'm using.
DSP bios 5.41.9.34
Code generation tool 6.1.11
DSP TMS320C6727B
Here the code
Variable with first letter capital are global variables.
void INT5_real_time_timer (void)
{
//Use for later debuging
Int5_routine_execution_counter++;
//A
if (RTIINTFLAG & 0x00000002)
{
RTIINTFLAG = 0x00000002; // Release interrupt flag
RTICLEARINT = 0x00000002;
// Update frame content
Stage_1_order[Selected_channel] |= 0x001;
Stage_2_order[Selected_channel] |= 0x001;
//save sent date and update counter
Command_sent_counter[Selected_channel][A_INDEX]++;
Command_sent_dsp_timer[Algo_selected_channel][A_INDEX]
= TIME_dsp_timer_datation_correction(RTIFRC1);
}
//B
if (RTIINTFLAG & 0x00000004)
{
RTIINTFLAG = 0x00000004;
RTICLEARINT = 0x00000004;
// Update frame order
Stage_1_order[Selected_channel] |= 0x010;
Stage_2_order[Selected_channel] |= 0x010;
//save sent date and update counter
Command_sent_counter[Selected_channel][B_INDEX]++;
Command_sent_dsp_timer[Selected_channel][B_INDEX]
= TIME_dsp_timer_datation_correction(RTIFRC1);
}
//C
if (RTIINTFLAG & 0x00000008)
{
RTIINTFLAG = 0x00000008;
RTICLEARINT = 0x00000008;
// Update frame order
Stage_1_order[Selected_channel] |= 0x100;
Stage_2_order[Selected_channel] |= 0x100;
//save sent date and update counter
Command_sent_counter[Selected_channel][C_INDEX]++;
Command_sent_dsp_timer[Selected_channel][C_INDEX]
= TIME_dsp_timer_datation_correction(RTIFRC1);
}
// Send M4 frame with order(s)
Command_order_duration = Command_order_duration[Selected_channel]*100;
Send_McASP1_frame();
State_machine_updating ();
}
regards
Julien