Hi,
I'm working on my TMS320C6748 with a project that is a mix of L138_am_poll (audio) and gpio. The building process works fine, but I'm having problems on the debuging process. I don't get any errors (just three warnings), but the program gets stucked in some point and it doesn't work. I've debug the program through the XDS100v2 emulator connected to my board using the "step into" and "step over" and I have seen this problems:
1- When the main function calls the psc.c file on the sentence /* The Local PSC number for GPIO is 3. GPIO belongs to PSC1 module.*/
PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_GPIO, PSC_POWERDOMAIN_ALWAYS_ON,
PSC_MDCTL_NEXT_ENABLE);
It stays indefinitly on this while loop:
if (timeout != 0)
{
timeout = 0xFFFFFF;
status = flags & PSC_MDCTL_NEXT;
do {
timeout--;
} while(timeout &&
(HWREG(baseAdd + PSC_MDSTAT(moduleId)) & PSC_MDSTAT_STATE) != status);
}
Each time I click on Step Into, the value of timeout decreases, but its initial value is very high. I could decrease the value to 0 by changing the value of timeout, but I don't think that's the solution.
2- After that loop, I get into another loop on evmomapl138.c and I can't get out of it:
while (CHKBIT(psc->MDSTAT[in_module], MASK_STATE) != in_next_state) {}
For what is that timeout and why am I getting stuck in the second while loop?
Thanks in advance,
Miguel.