SPC5604BCLQ GPIO output control MIOS, program run error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPC5604BCLQ GPIO output control MIOS, program run error

441 Views
22992113
Contributor I

I have encountered some problems in the use of SPC5604BCLQ  144pin .

I want to control Enable/Disable 5V out for sensor. 

I select PG2 to set GPIO Output to control it.

There will be some error occur when I Enable the  SIU.GPDO[98].B.PDO = 1; as the picture below.

I redo a minimal system circuit, no other input and output pins connected, the program can run normally

Now I want to know if there is a problem with my hardware or software program, how can I solve the problem?

problem1.png

problem2.png

void IOInit(void)

{

   SIU.PCR[98].B.ODE = 1;
   SIU.PCR[98].B.OBE = 1;   
   SIU.PCR[98].B.IBE = 0;
   SIU.GPDO[98].B.PDO = 1;

}

void main(void)

{

      asm(" wrteei 0");   // DisableInterrupt; 
      disableWatchdog(); 

      

      

   ME.RUNPC[0].R = 0x000000FE;

   /*****************************************
   enable PIT_RTI
   *****************************************/
   ME.PCTL[92].R = 0x00;

   / *****************************************
   enable SIUL
   *****************************************/
   ME.PCTL[68].R = 0x00;

  

    SetupPll();

    IOInit();

      

SIU.GPDO[98].B.PDO = 0;   //5v output

     for (;;) 

     {

         ......

         ......

      }

    

      

}

0 Kudos
1 Reply

332 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

you are not initializing the Mode Entry module correctly, so the SIU module is still freezed and not accessible.

Please take a look at this SW example where you can find how to do that (function FMPLL_init):

Example MPC5604B PinToggleStationery CW210 

Regards,

Lukas

0 Kudos