How to I assign a Device Address to MC9RS08 chip ?

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

How to I assign a Device Address to MC9RS08 chip ?

885 Views
joonsinchu
Contributor II

Dear all,

 

How should i assign a Device address to my MC9RS08 chip in CodeWarrior 10.6 ? According to the data sheet, it doesn't have any particular device address on the chip ? or i should hardcore it ? is anyone have some idea/coding to share ?

 

I been trying to assign a memory address to the chip, but it didnt work.

 

Your sharing is much appreciated.

Thank you.

Labels (1)
0 Kudos
5 Replies

580 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Joonsin,

RS08 mcu doesn't have Device address. each MCU peripheral has register that has register memory address.

why do you need Device address?


Have a great day,
Jennie Zhang

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

0 Kudos

580 Views
joonsinchu
Contributor II

Hi Jennie Zhang,

The reason why i need the device address is for my moxa gateway to detect it. By then, I can retrieve data from the MCU and display on my pc.

My current situation is that the Txd of MCU is able to transmit the signals via RS485. But the gateway is unable to identify which particular device is sending the signal. That's why I need the gateway to recognize it device address.

Do you have any example on hardcore the device address into the chip ?

Thanks. hope to hear from you soon.

0 Kudos

580 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

hi,

You may create a rs485 protocol to identify a device.

here is a example of it

Bootloader for HCS08


Have a great day,
Jennie Zhang

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

0 Kudos

580 Views
joonsinchu
Contributor II

Hi,

how about the Cpu_identification function in the MC9RS08 chip ? I cannot assign the address to this function ?

is there any other simple device address configure code ?

What i need is just for my gateway to identify the chip address.

Thank you. Hope to hear from you soon.

0 Kudos

580 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

to assign an address to a specific function Cpu_identification() is a different question.

user need

1. define a section in prm file

for example

SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */

... ...

    MYROM                      =  READ_ONLY    0x2000 TO 0x25FF;

... ...

END

PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */

... ...

    CPUIDF_ROM              INTO MYROM;

END

in code

#pragma CODE_SEG   CPUIDF_ROM

Cpu_identification()

Cpu_identification()

{

//YOUR CODE

}

#pragma CODE_SEG DEFAULT

Thus function  Cpu_identification is allocated to address starting from 0x2000. Hope this helps!


Have a great day,
Jennie Zhang

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

0 Kudos