3 Replies Latest reply on Jan 7, 2020 4:33 AM by PY_21

    Where is the PSOC 4 BD/MAC address saved?




      We are using PSOC 4 MCU: Cypress CYBLE-224110-00

      I was wondering where the PSOC 4 BD/MAC address is actually saved?

      I read all the documentation related to the MAC/BD address and I couldn't find where it is saved.

      I am NOT saving my own MAC address in the secure flash. I am just retrieving the address using the command CyBle_GetDeviceAddress where I am setting the type to be PUBLIC_DEVICE_ADDRESS (=0).

      The reason I ask is that we are saving some information of our device in the secure flash in ROW 0. And after having saved some information there for testing (6 bytes of ASCII: "123456") we see that the API CyBle_GetDeviceAddress returns "123456" In our scanning of BLE devices we actually see that the MAC address of the device is now 123456.

      If we write again to the same location but with 7 ASCII characters then suddenly the MAC address returns to be what is was before. This is SUPER strange and we are able to reproduce this over and over. Is this some kind of bug with CyBle_GetDeviceAddress ?

      How can this happen?

      Any help would be appreciated.





      Message was edited by: Eyal Gerber The device didn't get bricked like I originally said. That was a mistake. I also added how we are able to fix the issue and how to reproduce it.

        • 1. Re: Where is the PSOC 4 BD/MAC address saved?

          Hello Eyal,


          SFlash in PSoC 4 BLE devices contains 4 user configurable rows that the application can use for storing Bluetooth device address, application specific data or manufacturing specific information (device serial number, application sensor calibration data etc.).
          The first 6 bytes of Row0 will be used for the BLE device address. If you write anything in Row0 then it will take that as the device address and ignores the value that is set in BLE component. So, the MAC address will be read from SFLASH Row 0 if the SFLASH Row 0 has non Zero value.


          P Yugandhar.

          1 of 1 people found this helpful
          • 2. Re: Where is the PSOC 4 BD/MAC address saved?

            Thanks a lot!


            Another quick question, when does the device take the MAC address from the Sflash instead from its standard location? I mean, if we change the Sflash row zero to something else other than zeros then immediately after that the MAC address is changed or only later after reset etc.?

            • 3. Re: Where is the PSOC 4 BD/MAC address saved?

              After few calls of CyBle_ProcessEvents(), MAC address will be updated.



              P Yugandhar.