JN518x: user area in "pFlash"?

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

JN518x: user area in "pFlash"?

Jump to solution
1,133 Views
usaygo
Contributor III

Hello,

We need to store small (16bytes x 3) data at production stage. Normal flash is not good for use because it's easily rewitten. The "pFlash" area is usable place, I think. However pFlash memory map defined in "rom_psector.h" does not seem to have space for generic use.

        struct
        {
            uint32_t rom_patch_region_sz;
...
            uint32_t qspi_app_search_granularity;

            uint32_t reserved1[2];

            uint8_t ISP_protocol_key[16];        /*!< ISP protocol key: key used to encrypt messages over ISP UART
                                                  * with secure access level
                                                  */
            uint64_t ieee_mac_id1;               /*!< IEEE_MAC_ID_1 (Used to over-ride MAC ID_1 in N-2 page) */
            uint64_t ieee_mac_id2;               /*!< IEEE_MAC_ID_2 if second MAC iID is required */

            uint64_t ble_mac_id;                 /*!< BLE device address : only 6 LSB bytes are significant */
            uint8_t  reserved2[104];             /*!< Reserved for future use  */

            uint64_t customer_id;                /*!< Customer ID, used for secure handshake */
            uint64_t min_device_id;              /*!< Min Device ID, used for secure handshake - Certificate compatibility  */
            uint64_t device_id;                  /*!< Device ID, used for secure handshake */
            uint64_t max_device_id;              /*!< Max Device ID, used for secure handshake - Certificate compatibility  */
            uint8_t unlock_key[256];             /*!< 2048-bit public key for secure handshake
                                                  * (equivalent to ‘unlock’ key). Stored encrypted,
                                                  * using the AES key in eFuse*/
        } pFlash;

 

Question1: So far, reserve2[104] is the candidate for the purpose. Please let me know if I should use this area and the future risks if I use the area. Or is there another better area?

Question2: I think the customer_id to unlock_key is provided for the encryption procedure, will it be used by ZigBee PRO or Thread? (we normally use MMAC, not use ZigBee/Thread).

Thanks in advance.

 

0 Kudos
1 Solution
1,070 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @usaygo,

Normal flash is not good for us because it's easily rewritten.

Depending on your application, you could secure your device and with that avoid the rewrite without authorization.

Question1: So far, reserve2[104] is the candidate for the purpose. Please let me know if I should use this area and the future risks if I use the area. Or is there another better area?

Sure you could use this section for saving your data. Just be sure and do not modify the config values.

Question2: I think the customer_id to unlock_key is provided for the encryption procedure, will it be used by ZigBee PRO or Thread? (we normally use MMAC, not use ZigBee/Thread).

In this case, the customer ID is for the 802.15.4 protocol, and the unlock key is in the case that you want to lock your device.

Regards,

Mario

View solution in original post

0 Kudos
2 Replies
1,071 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @usaygo,

Normal flash is not good for us because it's easily rewritten.

Depending on your application, you could secure your device and with that avoid the rewrite without authorization.

Question1: So far, reserve2[104] is the candidate for the purpose. Please let me know if I should use this area and the future risks if I use the area. Or is there another better area?

Sure you could use this section for saving your data. Just be sure and do not modify the config values.

Question2: I think the customer_id to unlock_key is provided for the encryption procedure, will it be used by ZigBee PRO or Thread? (we normally use MMAC, not use ZigBee/Thread).

In this case, the customer ID is for the 802.15.4 protocol, and the unlock key is in the case that you want to lock your device.

Regards,

Mario

0 Kudos
1,061 Views
usaygo
Contributor III

Hello Mario,

Your answer is really appreciate.

Thank you very much!

0 Kudos