Hi,
I want BLE and ZIGBEE to be able to switch dynamically during running.Only one mode(BLE or ZIGBEE) is running at a time.If switching from zigbee to BLE, how do I turn off zigbee before switching?
Hi,
I want BLE and ZIGBEE to be able to switch dynamically during running.Only one mode(BLE or ZIGBEE) is running at a time.If switching from zigbee to BLE, how do I turn off zigbee before switching?
Hello,
There is no good way to disable the zigbee stack once it has started, so the best solution for this approach is to restart the application, and start either the Zigbee stack or the BLE stack.
You would need some way during the startup to decide whether to start the zigbee or bluetooth stack. One way to do this could be to use the GPREGRET register. This is a retained register, so it will keep it's value as long as it has power. So e.g. if you are running zigbee and want to switch to BLE, write some specific value of your choice to this register, restart the device (NVIC_SystemReset()), read back the register:
uint32_t register_value = NRF_POWER->GPREGRET[0];
and start up the zigbee or BLE stack, based on the value in the register.
If you have some more variables you need to save, you have a total of 2*32 bits in GPREGRET[0] and GPREGRET[1]. If you have more data than this you need to store, you need to store it in flash before restarting the application.
Best regards,
Edvin
Hello,
There is no good way to disable the zigbee stack once it has started, so the best solution for this approach is to restart the application, and start either the Zigbee stack or the BLE stack.
You would need some way during the startup to decide whether to start the zigbee or bluetooth stack. One way to do this could be to use the GPREGRET register. This is a retained register, so it will keep it's value as long as it has power. So e.g. if you are running zigbee and want to switch to BLE, write some specific value of your choice to this register, restart the device (NVIC_SystemReset()), read back the register:
uint32_t register_value = NRF_POWER->GPREGRET[0];
and start up the zigbee or BLE stack, based on the value in the register.
If you have some more variables you need to save, you have a total of 2*32 bits in GPREGRET[0] and GPREGRET[1]. If you have more data than this you need to store, you need to store it in flash before restarting the application.
Best regards,
Edvin
Hi Edvin,
Thanks.