MAC address in KW36

cancel
Showing results for 
Search instead for 
Did you mean: 

MAC address in KW36

Jump to solution
738 Views
no6524
Contributor II

Hi,

I am currently working on a BLE product using a KW36 MCU.

In order to build the advertisement data we want to send, we are trying to get the MAC address of the chip in the RSIM->MAC_LSB and RSIM->MAC_MSB registers.

Unfortunately, the two registers return respectively 0xFF and 0xFFFFFFFF when read.

Is there a reason for the MAC address not to be present and / or readable ?

Regards

Labels (2)
0 Kudos
1 Solution
510 Views
estephania_mart
NXP TechSupport
NXP TechSupport

hello,

Are you testing this in the freedom board? Or is it in your custom board?

If you are working in the freedom board it is most likely the marking of your chip starts with a P, could you please help me confirm if that it's the case?

If it is, you will  need to have the IC with the marking starting with an M in order to have a different MAC address

Regards,

Estephania

View solution in original post

0 Kudos
6 Replies
510 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

I believe that what you might be looking for it's mostly the BDAddress.

For more information about this, could you please check this other post ?

That will help you in the understanding of the addressing, nonetheless, the function you are looking in the latest stack version and the KW36 would be the following function

ControllerSetBD_ADDR 

You can find this function in the ble_controller_task.c

Regards ,

Estephania

0 Kudos
510 Views
no6524
Contributor II

Thank you for your response.

Looking at the ControllerSetBD_ADDR, it uses the function BOARD_GetMACAddr.

This function reads the RSIM->MAC_LSB and RSIM->MAC_MSB registers I have talked about in my post.

When executing ControllerSetBD_ADDR on a Freedom KW36 board, I see that the function also reads 0xFF from the RSIM registers.

The rest of the function then reads the MCU UID, uses the lower part of this ID, computes an SHA of the UID and uses that as MAC address.

            /* Get MCUUID and create a SHA256 output */
            BOARD_GetMCUUid(uid, &len);
            SHA256_Hash(uid, len, sha256Output);
            FLib_MemCpy(gHardwareParameters.bluetooth_address, sha256Output, mBD_ADDR_RandPartSize_c);

I do not understand why the MAC address registers are full or 0xFF. From my understanding, NXP garantees that a unique MAC address for all its KW series MCU are stored in these registers, as explaned in AN12272 :

NXP's Kinetis wireless microcontroller series (KW) include a unique 40-bit MAC address factory programmedwhich can be used to form a global unique address for BLE and IEEE 802.15.4 based wireless protocols. Itisincluded in KW40Z/30Z/20Z, KW41Z/31Z/21Z, KW35A/36A, KW35Z/36Z and K32W0x microcontrollers.

0 Kudos
511 Views
estephania_mart
NXP TechSupport
NXP TechSupport

hello,

Are you testing this in the freedom board? Or is it in your custom board?

If you are working in the freedom board it is most likely the marking of your chip starts with a P, could you please help me confirm if that it's the case?

If it is, you will  need to have the IC with the marking starting with an M in order to have a different MAC address

Regards,

Estephania

View solution in original post

0 Kudos
510 Views
no6524
Contributor II

We are testing on both Freedom KW36 and our own PCB.

ICs on both Freedom and our PCBs are indeed marked as PW36 (provided directly by NXP for a new package version).

Until we have a MWK marked IC we will not really have a MAC address in the MAC_LSB register, is that it ?

0 Kudos
510 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Yes,  that it's correct. Just to confirm , when you bought the MKW36 chip, was it marked with the "P"? Was it a sample ? Do you have only one chip with that marking or is your complete badge marked like that ?

Regards,

Estephania

0 Kudos
510 Views
no6524
Contributor II

We have a couple of MKW36 (marked 'P') that are indeed samples from NXP.

We are still in development phase and have not yet bought the batch that we will use for our series of products. These should then be 'M' maked and contain a MAC address.

Thank you for your responses.

0 Kudos