S12G128 bootloader

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

S12G128 bootloader

571 Views
407214944
Contributor I

I use S12G128 for the BOOTloader update program, which is done in reference to the 4528 document.Currently, when you want to run the APP, you receive the update program command from the serial port, and it executes the bootloader code itself.The current situation is that during the implementation of the APP, we hope to update the program, open the watchdog immediately, and reset.The program doesn't know where to go.Any similar information.thank you

0 Kudos
Reply
1 Reply

427 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

if I understand you well you want to just see the text "downloaded succesfully" and the system automatically resets itself. In this case, go to main an adjust the code to this form:

 case 'b':
      c = ProgramFlash();
      if (c != 0)    //go program the Flash
        OutStr(GetErrorString(c));    //and report an error if there was one
      else
        OutStr("\r\nDownloaded successfully!\r\n");
     

          CPMUCOP = 0x47;       // enable COP
          CPMUARMCOP=0x00; // trigger COP reset
          while(1);                          // not necessary

   

    break;

Best regards,

Ladislav

0 Kudos
Reply