Loading code into S12X problems

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

Loading code into S12X problems

Jump to solution
2,021 Views
ThomasG
Contributor I
Hello,
 
I am working with a MC9S12XDT256 part with Codewarrior for HC12 Professional Edition and am having trouble after I load the code into flash.
 
The loading of the S19 file seems to go ok but once the program starts running, it stops and says an ILLEGAL_BP error occurred.  This seems to be occuring right away in the startup code (before I get to main).
 
I then looked at the hardware schematics and noticed MODB and MODA are not tied to ground or VDD.  The hardware designer left one of the pins open while using another pin as a GPIO pin to an external hardware chip.
 
My question is there anything else I should be making sure I setup as part of the startup process or is it not working because the MODB and MODA pins are not connected properly.  If this is the case, am I out of luck or is there a possible workaround?
 
Thank you,
 
Thomas
 
Labels (1)
Tags (1)
0 Kudos
1 Solution
921 Views
CrasyCat
Specialist III
Hello
 
  ILLEGAL_BP just notifies you that the application reaches an invalid code position.
  First thing I would suspect here is that an un-initialized interrupt arises somewhere in your code.
 
  But there might be other reason for that behavior.
  From here you have two solutions:
     1- Try to debug from the application entry point to figure out what is happening before main
          To tell the debugger it should stop at the application entry point:
            - Start the debugger the usual way
            - Select File -> "Configuration"
            - Switch to the "Load" tab.
            - Uncheck the box "Run after successful load"
            - Close the debugger and restart it.
         Application should now stop directly at application entry point. You can step from here and
         check what is happening.
    2- You can submit a service request  for that.
        To log the issue please go to following URL: 
            http://www.freescale.com/TechSupport
        and click on "Submit a service request"
        Make sure to attached a reproducible project to the request. You can collect information
        needed for the service request using the Pack and Go wizard.
        Just select Help -> "Pack and Go" and follow the instruction on the screen.
 
CrasyCat

View solution in original post

0 Kudos
3 Replies
921 Views
ThomasG
Contributor I
Thank you for the replies.
 
I may try to somehow ground the MODA and MODB signals lines on power-up and see if anything changes.
0 Kudos
921 Views
Alban
Senior Contributor II
Hello Thomas,
 
It is imperative that MODx pins are at appropriate level when a reset occurs.
There is no workaround as the hardware will decide which mode (External Bus, Single Chip, BDM...) the MCU should run in when reset is happening. At that point no software is executed yet.
 
Sorry...
 
Alban.
922 Views
CrasyCat
Specialist III
Hello
 
  ILLEGAL_BP just notifies you that the application reaches an invalid code position.
  First thing I would suspect here is that an un-initialized interrupt arises somewhere in your code.
 
  But there might be other reason for that behavior.
  From here you have two solutions:
     1- Try to debug from the application entry point to figure out what is happening before main
          To tell the debugger it should stop at the application entry point:
            - Start the debugger the usual way
            - Select File -> "Configuration"
            - Switch to the "Load" tab.
            - Uncheck the box "Run after successful load"
            - Close the debugger and restart it.
         Application should now stop directly at application entry point. You can step from here and
         check what is happening.
    2- You can submit a service request  for that.
        To log the issue please go to following URL: 
            http://www.freescale.com/TechSupport
        and click on "Submit a service request"
        Make sure to attached a reproducible project to the request. You can collect information
        needed for the service request using the Pack and Go wizard.
        Just select Help -> "Pack and Go" and follow the instruction on the screen.
 
CrasyCat
0 Kudos