Hi,
I have a problem about NETCP and PA. My aim is to write a bootloader that can take the binary code over ethernet and copying it to the DDR. So it configures NETCP and PA. But the application (copied) code also configures NETCP and PA. In order to simulate the situation I load the application code to my custom board over the emulator, and run. Then I restart the code after passing the initializing routines. Unfortunately there are errors like "Error Allocating Rx Free Descriptors", "Error Allocating Tx Free Descriptors" and "Timeout waiting for the reply from PA to Pa". All these errors mentions that something missing in initialization.
In the forum, the post "714284.aspx#714284" (disable "Network Coprocessor" powerdomain after reloading outfile to DSP) is about the same problem, so that I add the following code to the starting point. Therefore if PASS power domain is not OFF, I try to reset it :
CSL_PSC_PDSTATE pdstate=PSC_PDSTATE_OFF;
pdstate=CSL_PSC_getPowerDomainState(CSL_PSC_PD_PASS);
if (pdstate!=PSC_PDSTATE_OFF)
/*if PASS power domain is not OFF then reset*/
{
*pa_padma_txchconf0|=0x40000000; /*teardown the 9 TX channels and the 24 RX channels*/
*pa_padma_rxchconf0|=0x40000000;
*CPSW_CTRL = 0;// disable port 0 of the Gigabit Ethernet Switch
*PDSP0_CTRL &= 0xFFFFFFFD;// disable PDSP0
*PDSP1_CTRL &= 0xFFFFFFFD;// disable PDSP1
*PDSP2_CTRL &= 0xFFFFFFFD; // disable PDSP2
*PDSP3_CTRL &= 0xFFFFFFFD; // disable PDSP3
*PDSP4_CTRL &= 0xFFFFFFFD;// disable PDSP4
*PDSP5_CTRL &= 0xFFFFFFFD;// disable PDSP5
// disable the clocks for PASS modules
CSL_PSC_setModuleNextState (CSL_PSC_LPSC_PKTPROC, PSC_MODSTATE_DISABLE);
CSL_PSC_setModuleNextState (CSL_PSC_LPSC_CPGMAC, PSC_MODSTATE_DISABLE);
CSL_PSC_setModuleNextState (CSL_PSC_LPSC_Crypto, PSC_MODSTATE_DISABLE);
CSL_PSC_disablePowerDomain(CSL_PSC_PD_PASS);
CSL_PSC_startStateTransition(CSL_PSC_PD_PASS);
while (!CSL_PSC_isStateTransitionDone(CSL_PSC_PD_PASS));
}
/* Set PASS Power domain to ON */
CSL_PSC_enablePowerDomain (CSL_PSC_PD_PASS);
/* Enable the clocks for PASS modules */
CSL_PSC_setModuleNextState (CSL_PSC_LPSC_PKTPROC, PSC_MODSTATE_ENABLE);
CSL_PSC_setModuleNextState (CSL_PSC_LPSC_CPGMAC, PSC_MODSTATE_ENABLE);
CSL_PSC_setModuleNextState (CSL_PSC_LPSC_Crypto, PSC_MODSTATE_ENABLE);
/* Start the state transition */
CSL_PSC_startStateTransition (CSL_PSC_PD_PASS);
/* Wait until the state transition process is completed. */
while (!CSL_PSC_isStateTransitionDone (CSL_PSC_PD_PASS));
In the first run everthing is OK, but when I restart the code, I have encountered the same error messages. When I restart the program at that point again, it stucks in state transition while loop. So how can it be reset suitable?
If someone gives me any suggetions, I will be very happy.
Alpaslan