Illegal BP

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

Illegal BP

1,053 Views
abhijithshankarenn
Contributor I

Hi NXP Team,
   I am using S12GA64 µC in my project.
   While I am trying to flash, the program is going to ILLEGAL_BP.
    Suppose if I am calling MCU_init just before calling the flash program driver command, the program is NOT going to illegal BP.
   Kindly let me know any insights or suggestions to solve this problem.

Regards
Abhijith Shankar

0 Kudos
2 Replies

1,031 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Abhijith Shankar,

I understand that the issue is solved if you call the MCU_init() function.

So, what does the function do?

I can only guess, but since you mentioned a flash program command, do you set FDIV correctly?

danielmartynek_0-1646043635185.png

 

Regards,

Daniel

 

0 Kudos

862 Views
abhijithshankarenn
Contributor I

This issue is solved when you disabling the interrupt before writing the flash memory.
And re-enabling the interrupt as soon as the write is over. 
 
TE register needs to be made 0 before any flash operations are carried out. And re-enabled after the flash operation is done

0 Kudos