what is MC912DG128CCPV mcu‘s  compiling envirement?

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

what is MC912DG128CCPV mcu‘s  compiling envirement?

Jump to solution
1,714 Views
mengzhang
Contributor II

Hello,we are programing a  mcu (MC912DG128CCPV) to accomplish our requirement. Because this mcu is out of date, we can obtain only a few materials,  we can not definite which developing/compiling envirement  we need to use is accurate. Someone suppose that Hello,we are programing a  mcu (MC912DG128CCPV) to accomplish our requirement. Because this mcu is out of date, we can obtain only a few materials,  we can not definite which developing/compiling envirement  we need to use is accurate. Someone suppose that we should use CODE WARRIOR V5.1,including some freescale FAE .But we can see  that CODE WARRIOR V5.1 is using to programme for MC912DG128A mcu on the freescale official website,and MC912DG128C mcu should be programing in COSMIC /ZAP BDM HCS12(paged). So,we want to definite which developing/compiling envirement  is accurate. Additionally,we need to using this chip on normal expended norrow mode,and programing to write/read a dual-port RAM.so we need a free example code,no matter that is programing in C.W. or COSMIC.  Thank you very much. should use CODE WARRIOR V5.1,including some freescale FAE .But we can see  that CODE WARRIOR V5.1 is using to programme for MC912DG128A mcu on the freescale official website,and MC912DG128C mcu should be programing in COSMIC /ZAP BDM HCS12(paged). So,we want to definite which developing/compiling envirement  is accurate. Additionally,we need to using this chip on normal expended norrow mode,and programing to write/read a dual-port RAM.so we need a free example code,no matter that is programing in C.W. or COSMIC.  Thank you very much.

Labels (1)
0 Kudos
Reply
1 Solution
1,479 Views
trytohelp
NXP Employee
NXP Employee

Hi,

You can use the development tool you want: Cosmic, CodeWarrior, IAR or Isystem.

As you can see below CodeWarrior is supporting the DG128 device.

pastedImage_2.png


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
10 Replies
1,480 Views
trytohelp
NXP Employee
NXP Employee

Hi,

You can use the development tool you want: Cosmic, CodeWarrior, IAR or Isystem.

As you can see below CodeWarrior is supporting the DG128 device.

pastedImage_2.png


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,479 Views
mengzhang
Contributor II

Hi,so i have described the mcu we are using is mc68hc912dg128ccpv in the title.but i can not choose the mcu mc68hc912dg128c,because there have not this option in codewarrior v5.1,but just select mc68hc912dg128a instead.so,we have a problem in the process of pllclk initial.

After that,we suppose that mc68hc912dg128ccpv should be programed in other environment,but we can not indentify this situation.

which country are you living ,my friend?

在 2015-06-09 19:36:23,trytohelp <admin@community.freescale.com> 写道:

|

|

|

|

what is MC912DG128CCPV mcu‘s compiling envirement?

reply from Pascal Irrle in CodeWarrior for MCU - View the full discussion

Hi,

You can use the development tool you want: Cosmic, CodeWarrior, IAR or Isystem.

As you can see below CodeWarrior is supporting the DG128 device.

https://community.freescale.com/servlet/JiveServlet/downloadImage/2-524053-36335/pastedImage_2.png

Have a great day,

Pascal

Freescale Technical Support

0 Kudos
Reply
1,479 Views
trytohelp
NXP Employee
NXP Employee

Hi,

In Switzerland.

CW doesn't list HC12DG128C devices.

However in the data sheet (http://cache.freescale.com/files/microcontrollers/doc/data_sheet/MC912DT128A.pdf ) I've found the following:

    The MC68HC912DG128C and MC68HC912DG128P are devices similar to the MC68HC912DG128A, but with different oscillator configurations.

    Sections of this book applicable to the MC68HC912DG128A also apply to the MC68HC912DG128C and MC68HC912DG128P, except for the

    differences highlighted in Section 13. Oscillator.

Unfortunately I don't know Third Party tools vendors.

May be for this HC12DG128C device they've better solution than CodeWarrior.

Cosmic has a solution:

      Cosmic Software - HC12 Products

I've contacted a colleague working in hardware team to know if we have more info to share.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,479 Views
mengzhang
Contributor II

Thank you for your continuous response to our problem.

We are comfused with the choice of the compiling envirement.Our application doesn't has any progress  for 4 weeks.

because we did not used freescare mcu before,so ,how to use project.prm to set a external ram space,or any other methods.

So when we set the mcu into normal expended narrow mode, we can not see any data change on the external expended bus.I think our mcu is operating on normal expended narrow mode,because MODE rigister is 0xB0. Our code needs a memory space of 100k, so we need to use memory paging fuction,the reason why we have no data on external bus is the mistake on external memory space setting.

I need to set this function ,but the fae engineer in china have not ever used this mcu before,so it is really really hard to fulfill the our goal .

I wonder whether you have any kind of demo code , no matter in 912c or 912A or 912P or 9s12 and so on, we need to treat ithis code as  examples.

Thank you vey much.

0 Kudos
Reply
1,479 Views
trytohelp
NXP Employee
NXP Employee

May be Cosmic is better option for this device.

I contacted colleague worked in Hardware team.

  The differences between DG128A and DG128C are related only to oscillator architecture, some features were added and improved on 1L05H maskset (DG128C).
Therefore i don't see any problem to select DG128A in CW51 and program/debug DG128C.

Under the installation some examples are delivered.

Please have a look to \CWS12v5.1\(CodeWarrior_Examples) folder.

We don't have specific examples for each device.

However, for S12 and S12X, Processor Expert feature is available.

Processor Expert is a code generator.

There are several examples available using this feature under the installation folder: \CWS12v5.1\ProcessorExpert\Projects\Test projects.

Other examples are available in the bean documentation too.

I've contacted hardware colleague.

Keep you informed.

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,479 Views
mengzhang
Contributor II

First of all,we have succeed in operating the external bus,to read or write the external dual-port ram,with the help of the demo code.

But we have a new problem,which is memory paging expended.

mc912has a 128K bytes of flash eeprom,we are not sure of whether this flash eeprom is read-only or read-write?

because we may have a code of 100K bytes,several bytes of them need to read-write,i think ram(0x2000-0x3FFF) is not adequate.

So i program a code below,in this code, i want to set page3,page4,page5 to be internal expended ram space to make the data can e read-write,just leave page0,page1,page2 to be internal rom.

some code below in project.prm:

SEGMENTS

RAM = READ_WRITE 0x2000 TO 0x3FFF;

/* unbanked FLASH ROM */

FLASH_PAGEC000 = READ_ONLY 0xC000 TO 0xFEFF;

/* banked EXTERNAL FLASH RAM */

FLASH_PAGE4000 = READ_WRITE 0x4000 TO 0x7FFF; //set 4000-7FFF to be external ram

/* banked FLASH RAM */

FLASH_PPAGE3 = READ_WRITE 0x38000 TO 0x3BFFF; //set page3,4,5 to be internal ram

FLASH_PPAGE4 = READ_WRITE 0x48000 TO 0x4BFFF;

FLASH_PPAGE5 = READ_WRITE 0x58000 TO 0x5BFFF;

/* banked FLASH ROM */

FLASH_PPAGE0 = READ_ONLY 0x08000 TO 0x0BFFF; //set page0,1,2 to be internal rom

FLASH_PPAGE1 = READ_ONLY 0x18000 TO 0x1BFFF;

FLASH_PPAGE2 = READ_ONLY 0x28000 TO 0x2BFFF;

EEPROM = READ_WRITE 0x0800 TO 0x0FFF;

END

PLACEMENT

_PRESTART,

STARTUP,

ROM_VAR,

STRINGS,

VIRTUAL_TABLE_SEGMENT,

NON_BANKED,

COPY INTO FLASH_PAGEC000/, FLASH_PAGE4000/; //original ram

DEFAULT_ROM INTO FLASH_PPAGE0, FLASH_PPAGE1, FLASH_PPAGE2;

SSTACK,

DEFAULT_RAM INTO RAM;

/* set banked EXTERNAL FLASH RAM */

MY_EX_RAM_PG INTO FLASH_PAGE4000; //external ram

.........................................

a part of the code in main.c:

#pragma DATA_SEG MY_EX_RAM_PG //set dataRAM array in external ram

uchar dataRAM[0x4000];

#pragma DATA_SEG __PPAGE_SEG FLASH_PPAGE3 //set ram01 array in page3

uchar RAM01[0x4000];

#pragma DATA_SEG __PPAGE_SEG FLASH_PPAGE4 //set ram02 array in page4

uchar RAM02[0x4000];

#pragma DATA_SEG __PPAGE_SEG FLASH_PPAGE5 //set ram03 array in page5

uchar RAM03[0x4000];

#pragma DATA_SEG DEFAULT

some code has been omit.......

RAM01[0] = 0x0A; //i want to use this array RAM01[0]

...............................

compiler tell me the mistakes as follows:

Link Error : L1102: Out of allocation space in segment RAM at address 0x2101

Link Error : Link failed

i have set the option :PPAGE is used for banking.

so i do not know how to set the internal expended ram,or rom. how to use anything in page3 or page2?

we can see the code in demo code:

pragma CONST_SEG __PPAGE_SEG MY_EX_RAM_PG0A

UBYTE dataROM_02[0x4000];

how to visit datarom_02[0]? read-only?

0 Kudos
Reply
1,479 Views
trytohelp
NXP Employee
NXP Employee

Hello,

Sorry for the delay.

For my understanding the data can not be placed in Flash.

The data allocation were not placed in FLASH_PPAGEx but in RAM.

This explains the linker error -> out of allocation.

Attached you will find a generic example showing how to use the pragma.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,479 Views
mengzhang
Contributor II

I agree with you ,i will try your method mentioned above.

I Had used processer expert once to generate the code we need,but i think it is all about typecial application without any operation on the extenal data bus.

I check over and over again what can be seen on freescale official website that 3 different envirement of 912c series mcu and 5 differernt envirement of 912a series mcu. cw51 is just shown on 912a mcu's list ,although we can not imagine there are anything wrong for programing 912c in cw51. I do not think it is a coincidence,because it is a offcial website and it should not made this mistake.

0 Kudos
Reply
1,479 Views
mengzhang
Contributor II

Thank you for your answer.

By the way,do you want to tell me that we should not to focus the mcu it is in dg128A series ,or in dg128C series,or in dg128P series? but only use dg128 in short.

I can tell you my situation, when we create a new project in CW V5.1,after that ,we choose the mcu MC68HC912DG128A.

We need to use a sub-function in our program to initial the PLLCLK to be the SYSCLK.

so we write like that:

void PLL_init()            

{

  CLKSEL = 0x00;           

  PLLPC  = 0x40;         

  SYNR   = 0x02;          

  REFDV  = 0x04;           

   while(!(PLLFLG&0X40));   

   CLKSEL = 0x40;          

}

when the program jump to the CLKSEL =0x40;

the program will be certainly   running away.

But if SYNR = 0x01,REFDV = 0x01,everything is ok.

Another problem,we want to use external dual-port ram,so we should configue some page to be an external flash space,can you tell me how can we do that?thank you

0 Kudos
Reply
1,479 Views
trytohelp
NXP Employee
NXP Employee

Hi,

Sorry but I don't understand the question/problem.

What is the devices used ?

    DG128, DG1238A or ... ?

May be your question is more for the hardware than software side.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply