Switching from MC9S12XET256MAA to MC9S12XEQ512MAA

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Switching from MC9S12XET256MAA to MC9S12XEQ512MAA

1,992 次查看
arkadiuszjankow
Contributor I

Hi Guys,

we're using MC9S12XET256MAA mcu for an automotive project and we would like to switch current platform to MC9S12XEQ512MAA.

On the 256 mcu version the application runs smoothly without any problems (we use FreeRTOS). However after switching the hardware to the 512 mcu version and changing the project configuration in CodeWarrior the application doesn't work anymore. I'm getting Ilegal BPs after each run with the debugger. When I use a breakpoint in the main funcion and do some manual stepping the application starts to run, however it's behavior is not correct, it seems that the CPU is overloaded - the can messages are send with delays and there are overruns. We use large memory model. I'm attaching my PRM file (we use it similarly in the 256 mcu version). We would appreciate any tips on how to move projects to the bigger mcu.

Best

Arkadiusz

Original Attachment has been moved to: Project.prm.zip

标签 (1)
标记 (4)
0 项奖励
回复
8 回复数

1,351 次查看
RadekS
NXP Employee
NXP Employee

Hi Arkadiusz,

There should be minimum differences between S12XET256 and S12XEQ512.

In fact, differences should be only in amount of Flash (BLOCK 0 size and BLOCK 1N) and RAM.

S12XEQ512 in 80 QFP package adds additionally CAN2.

Could you please specify version of your CodeWarrior?

Could you please check errata lists for your S12XEQ512 and S12XET256 masksets?

Illegal BPs typically means losing of connection with debugger. Typical root cause is MCU reset or unexpected interrupt (program gets lost). In attachment you could find simple example code for catch unexpected interrupts.

I do not see ROM_C000(PAGE_FD) in you linker file. Is it correct?

Are you sure that both MCUs have the same hardware setup and clock configuration?

Did you modify XET256 project for XEQ512 or did you created new XEQ512 project and modified it according existing XET256 project? I would like to recommend second option despite on fact that there is higher chance that we miss some project settings.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,351 次查看
arkadiuszjankow
Contributor I

Thanks for the replay Radek.

We use CodeWarrior IDE Version 5.9.0. The mask for S12XEQ512 is 3M25J and for S12XET256 is 2M53J.

The project was modified from the version 256. We used to do the same thing with our older XEG128 when moving to XET256 and everything worked out perfectly.

We have checked our software from every angle and it looks that the problem comes directly from IDE.

We can upload our code with the 256 project settings to the 512 mcu and everything works fine, but the same code with the 512 project settings gives Illegal_BP every time.

best

Arkadiusz

0 项奖励
回复

1,351 次查看
RadekS
NXP Employee
NXP Employee

Hi Arkadiusz,

Thank you for more details,

Unfortunately CodeWarrior IDE Version is not equal to CW version (CodeWarrior IDE Version 5.9.0 is common for several CW releases). Please look at menu-Help-About Freescale CodeWarrior-Installed Products. In highest part of new window will be version of your CW release.

Moving from XEG128 to XET256 is specific case since both derivatives are built on the same maskset.

According your description, there must be probably something wrong in your project settings.

Some problems could be based on enabled/disabled optimizations.

You could try adding the following compiler option: “-Onb=b”. It disable the optimization that changes JSR's into BSR's.

Since your using user segments in linker file, you could try adding following compiler option: “-PSegObj”. This will disable assuming that data are in the same page inside user segments.

Unfortunately I could not explain this behavior without your project (mainly project settings). If you cannot share here your project, please create new “case”/”issue”/”service request” at https://nxpcommunity.force.com/community/CommunityContactSupport

Note: it will probably need new registration (systems are not yet consolidated after Freescale/NXP merge).


I hope it helps you.


Have a great day,
RadekS


-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,351 次查看
arkadiuszjankow
Contributor I

Hi Radek,

thanks for the feedback.

I've tried suggested compiler options but unfortunately with no luck. There's a constant Illegal_BP after each run with the debugger.

I'm attaching a zip folder with my project settings along with a list of installed products and plugins. I hope it will help.

Should you need any other files please let me know.

Thank You

Arkadiusz

0 项奖励
回复

1,351 次查看
RadekS
NXP Employee
NXP Employee

Hi Arkadiusz,

I shortly looked at your files. I am not sure whether it helps you (you selected large memory model), but I cannot see “-D__FAR_DATA” in your compiler settings (I tried search it in your project.mcp file without success).

Please compare your compiler/linker settings between XET256 and XEQ512 projects (open project, press Alt+F7 and select Compiler for HC12 on left side …).

It should not have any influence, but you could try replace original Mcu02da.fpp file by attached file (please make backup). This updated file is now formatted in similar way as fpp files for XET256 or XEP100.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,351 次查看
arkadiuszjankow
Contributor I

Hey,

I run some tests - both with the new fpp file and with the compiler options that you've suggested. None of these work :smileysad:

Our compiler/linker options for 256 and 512 are identical. In 256 ecu we don't use -D__FAR_DATA either.

Best

Arkadiusz

0 项奖励
回复

1,351 次查看
RadekS
NXP Employee
NXP Employee

Hi Arkadiusz,

thank you for your tests.

Do you use any libraries? If yes, these libraries should be compiled with the same settings as main application.

Do you know which instruction causes Illegal_BP?

Is it possible that MCU go into reset? Do you use any external watchdog? Could you try disabling internal COP watchdog?

You could try complete erase MCU by unsecure procedure:

In Code Warior debugger menu ->MultilinkCyclonePro->Unsecure…

If not work you can use unsecure12 from P&E:

http://www.pemicro.com/downloads/download_file.cfm?download_id=16

Just for sure, is hardware configuration completely the same or there is something different?

Did your application contain any P-Flash/D-Flash/EEE routines? Is this code updated for different memory map?


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,351 次查看
arkadiuszjankow
Contributor I

Hello again Radek,

sorry for getting back to you that late but I had some other matters to attend to and the Cpu 256/512 switching task was put on hold.

We finally resolved the issue but we think that behaviour of CodeWarrior software is a little odd here. Maybe you could explain it?

After adding a new component to our project - cpu S12XEQ512 and setting up its configuration the same way as we have in the S12XET256 the first compilation is not possible. We're getting an error about component setting regarding HUB_CAN_External module. Originally we set it to Pins PM4 and PM5 (the same as in 256 project). However the error in CodeWarrior says that the "Peripheral is unknown" and forces us to switch to the pins PM6 and PM7. After that the compilation works flowlessly but when we run the software with the debugger we are getting Illegal_BPs each time.

No one from our team checked this thing twice as we thought CodeWarrior should take care of such things, and when it says that the old configuration is not possible with the new Cpu then that's the way it is. Anyway, after the fist compilation we are able to manually change Can Pins back to the PM4 and PM5 and everything works perfectly.

I'm attaching some screens to depict the problem:

512_problem2.jpg512_problem3.jpg

Best,

Arkadiusz

0 项奖励
回复