Hello! I think through the app I hope the MAC address of the send to 14580 and then stored in external SPI flash, next time you start, use the new MAC address.Then where I need a new MAC dev_bdaddr assignment?thank you
Chip electric take address process is as follows: Find system_init function 1. 580 to electricity will first read the address from the OTP endures dev_bdaddr, function process nvds_read_bdaddr - > nvds_read_bdaddr_from_otp 2. Rwip_init function, this function because BLE_HOST_PRESENT defines, so running is the version of ROM, is not a function of the same name in the SDK. 3. Inside the rwip_init function, can call to rwble_init - > lld_init (false) / / false representative do not need to be reset 4. Lld_init function will be called jump_table_base lld_init_func function 5. Lld_init_func invoked inside nvds_get function to get the NVDS_TAG_BD_ADDRESS bluetooth address.Get the address is finally equipment is used. The corresponding SDK nvds_get custom_nvds_get_func jump_table in the code. 6. Custom_nvds_get_func function, view about NVDS_TAG_BD_ADDRESS parts.Co_null_bdaddr 0 for the whole address. If it is all zeros dev_bdaddr nvds_get_func function called (ROM) curing function to get the address in the SDK nvds_data_storage inside structure.(in NVDS. C) in the file If it is not zero dev_bdaddr is actually get the address.
So, can modify inside the function custom_nvds_get_func
Hi Gongyu_Dialog, Pin has been properly configured, the initialization is initialized.Now the problem is, if you read and write flash, the program will die, don't read and write procedures as normal.
Make sure that the flash configuration, such as flash size and page size is configured correctly. In addition, in the debug mode, can through the way of breakpoints, and see where is wrong.
If DEVELOPMENT_DEBUG open, meets the application die, usually run into HardFault_HandlerC function. Where can see the PC/LR is kept out of the question.
If DEVELOPMENT_DEBUG open, meets the application die, usually run into HardFault_HandlerC function. Where can see the PC/LR is kept out of the question. Opened DEVELOPMENT_DEBUG / / yes, it is."PC/LR "this is what mean?
After open the # define CFG_DEVELOPMENT_DEBUG;Flash operation, the program to run to void NMI_HandlerC (unsigned long * hardfault_args) "" inside the if ((GetWord16 (SYS_STAT_REG) & DBG_IS_UP) = = DBG_IS_UP) __asm (" BKPT # 0 \ n");" thank you
Chip electric take address process is as follows:
Find system_init function
1. 580 to electricity will first read the address from the OTP endures dev_bdaddr, function process nvds_read_bdaddr - > nvds_read_bdaddr_from_otp
2. Rwip_init function, this function because BLE_HOST_PRESENT defines, so running is the version of ROM, is not a function of the same name in the SDK.
3. Inside the rwip_init function, can call to rwble_init - > lld_init (false) / / false representative do not need to be reset
4. Lld_init function will be called jump_table_base lld_init_func function
5. Lld_init_func invoked inside nvds_get function to get the NVDS_TAG_BD_ADDRESS bluetooth address.Get the address is finally equipment is used.
The corresponding SDK nvds_get custom_nvds_get_func jump_table in the code.
6. Custom_nvds_get_func function, view about NVDS_TAG_BD_ADDRESS parts.Co_null_bdaddr 0 for the whole address.
If it is all zeros dev_bdaddr nvds_get_func function called (ROM) curing function to get the address in the SDK nvds_data_storage inside structure.(in NVDS. C) in the file
If it is not zero dev_bdaddr is actually get the address.
So, can modify inside the function custom_nvds_get_func
Hi Gongyu_Dialog,
I operated in the debug spi flash, the program will run fly, this is how to return a responsibility?thank you
Set pin configuration is correct?In addition, the flash function is called to initialize.
Hi Gongyu_Dialog,
Pin has been properly configured, the initialization is initialized.Now the problem is, if you read and write flash, the program will die, don't read and write procedures as normal.
Make sure that the flash configuration, such as flash size and page size is configured correctly.
In addition, in the debug mode, can through the way of breakpoints, and see where is wrong.
If DEVELOPMENT_DEBUG open, meets the application die, usually run into HardFault_HandlerC function.
Where can see the PC/LR is kept out of the question.
If DEVELOPMENT_DEBUG open, meets the application die, usually run into HardFault_HandlerC function.
Where can see the PC/LR is kept out of the question.
Opened DEVELOPMENT_DEBUG / / yes, it is."PC/LR "this is what mean?
Void HardFault_HandlerC (unsigned long * hardfault_args)
{
If (DEVELOPMENT_DEBUG)
{
* (volatile unsigned long *) (STATUS_BASE + 0 x14) = hardfault_args [5]./ / LR
* (volatile unsigned long *) (STATUS_BASE + 0 x18) = hardfault_args [6]./ / PC
...
After open the # define CFG_DEVELOPMENT_DEBUG;Flash operation, the program to run to void NMI_HandlerC (unsigned long * hardfault_args) "" inside the if ((GetWord16 (SYS_STAT_REG) & DBG_IS_UP) = = DBG_IS_UP) __asm (" BKPT # 0 \ n");"
thank you