SCI and ATD setup registers not declared? What? - HCS12C32

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

SCI and ATD setup registers not declared? What? - HCS12C32

1,864 Views
gruuvin
Contributor II

I am familiar with CW version 3.1 programming the HCS12C32. I wrote code that uses SCI and ATD registers for the C32, which works fine on that platform. However, for my project, I needed much more RAM for variables (8 arrays of 200 elements each), so I ordered the S12XDT512 project module for use with my student learning kit with breadboard. This new MCU module came with CW IDE version 5.7.0. I installed this because I needed the derivitive for this new MCU. So now I have fired it up and am porting my program over for the new MCU. I figure it should be pretty easy, because I have read the pertinent info in the XDT512 data sheet, and it looks like the register specs are the same as the C32. I have started a new project including the correct derivitives. So, this is where I am, and so now here is the problem. I get compile errors on the following lines, which are the first lines in "main": SCIBDL=9; SCICR1=0x04; SCICR2=0x08; ATDCTL2=0b10000000; ATDCTL3=0b00011000; ATDCTL4=0b00000001; (please ignore the switching between decimal, hex, and binary values, as it should not matter) The compile errors I get are all the same: "SCIBDL not declared (or typname)". Of course, each compile error is the same complaint about each respective register. In other words, it seems CW doesnt recognize these as registers for the XDT512 MCU and assumes they are some sort of variable that has not been declared. This is silly! I have also tried this with a new project using the XDP512 derivitive (since it is the only data sheet actually available), but same problem. For good measure, I tried to compile my code in a new project with C32 derivitive on this new codewarrior, and it has no problem with those registers. Ok, sorry this is long winded. It is not a complicated problem. I just wanted to be perfectly clear about what is going on. I actually need help pretty quickly on this because I am now behind schedule in trying to port this over to a newly aquired MCU. Please help!

 

 

Added p/n to subject.



Message Edited by NLFSJ on 2008-04-03 06:08 PM
Labels (1)
0 Kudos
Reply
3 Replies

730 Views
Steve
NXP Employee
NXP Employee
The XD512 has 6 SCIs and 2 ATDs so you need to be able to identify which ones you are talking about. There's probably a number missing in the register name macro - do what peg suggested and pick the macro that describes the actual SCI and ATD you are using OR define your macros in terms of the header file declarations.
0 Kudos
Reply

730 Views
gruuvin
Contributor II
Sorry about the newbiness; it was my first post.

PLEASE NOTE: the part number added to the subject line is incorrect.

The MCU I am trying to program is the S12XDT512... not the C32.

This is just a very silly problem. CodeWarrior can be so infuriating at times! It cant get past the compile because it doesnt recognize these registers? Even with the correct derivatives in a project created for this specific MCU. grrrr!!!
0 Kudos
Reply

730 Views
peg
Senior Contributor IV
Hi,
Take a look at the actual derivative header file.
You will probably find they are defined with the newer style.
Basically the name is slightly different.

0 Kudos
Reply