KW40Z_Connectivity_Software_1.0.1 (KSDK_1.3.0); IAR 7.50;
How can be used gHardwareParameters.bluetooth_address in conjunction with gBDAddress_c ?
Flash_Adapter.c
/* Hardware parameters */
hardwareParameters_t gHardwareParameters;
ble_controller_task.c
/* Public Device Address */
const uint8_t gBDAddress_c[6] = {BD_ADDR};
Flash_Adapter.h
typedef PACKED_STRUCT hardwareParameters_tag
{
......
uint8_t bluetooth_address[6]; /* Bluetooth address */
......
}hardwareParameters_t;
something like making the same ROM region available from FREESCALE_PROD_DATA_BASE_ADDR ?
( last 1024Bytes of flash at the end of ROM address 0x00027C00 to 0x00027FFF )
ble_controller_task.c
#if defined(__IAR_SYSTEMS_ICC__)
#pragma location = "gBDAddress_ROM"
uint8_t gBDAddress_c[6]
#else
uint8_t gBDAddress_c[6]
#endif
= {BD_ADDR};
/platform/devices/MKW40Z4/linker/iar/MKW40Z160xxx4_connectivity.icf
/platform/devices/MKW30Z4/linker/iar/MKW30Z160xxx4_connectivity.icf
place at address mem: m_hp_bluetooth_address_start { section gBDAddress_ROM };
......
define symbol m_hp_bluetooth_address_offset = 42+8;
define symbol m_hp_bluetooth_address_start = m_fsl_prodInfo_start + m_hp_bluetooth_address_offset;
Was was the intent of this data gHardwareParameters.bluetooth_address and how should be used ?
Solved! Go to Solution.
Hi Lucian
You could use the API that is included in Flash_Adapter.c
uint32_t NV_WriteHWParameters(hardwareParameters_t *pHwParams)
so you can do the following:
FLib_MemCpy(gHardwareParameters.bluetooth_address, gBDAddress_c, 6);
NV_WriteHWParameters(&gHardwareParameters);
Hope this information helps you
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Lucian
You could use the API that is included in Flash_Adapter.c
uint32_t NV_WriteHWParameters(hardwareParameters_t *pHwParams)
so you can do the following:
FLib_MemCpy(gHardwareParameters.bluetooth_address, gBDAddress_c, 6);
NV_WriteHWParameters(&gHardwareParameters);
Hope this information helps you
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------