Using PPI with Zboss zigbee stack

Hi,

In my project I make use of the PPI to connect the comparator with the counter (timer). But as soon as I enable the zigbee stack, especially when invoking the zboss_main_loop_iteration()
in the main loop, it looks like the PPI connection is not working.

To test this, I 'connected' button4 on my devkit with this counter. There I can also see, that when I don't invoke zboss_main_loop_iteration() the counter will count everytime I push the button.

So I suspect that the zigbee stack uses the PPI that I'm using. According to this list the zigbee stack uses channels 0 - 12. When I allocate the PPI channel with this code:

    err_code = nrfx_ppi_channel_alloc(&ppi_channel);
    APP_ERROR_CHECK(err_code);
    NRF_LOG_INFO("Assigned PPI channel: %d", ppi_channel);

I see in the debug log, that channel 5 is used. Which is strange, because the zigbee stack uses this. I call this after initiating the zigbee stack. So I don't know how to change it such that it will choose the right PPI channel when using the zigbee stack?

Parents
  • Hi,

    The PPI 0-5 channels are only used by the 802.15.4 radio driver if debugging of radio events on GPIOs are enabled (by ENABLE_DEBUG_GPIO symbol). As far as I know, this is not enabled by default in the Zboss stack. It should therefor be ok to use the PPI channels for other purposes.

    I'm not sure if the nrfx_ppi driver is aware of the PPI channels used by Zigbee stack, I could not find any sources in the SDK that specify channels used by this stack (we have defines for the Softdevice and ESB/Gazell protocols). You can add awareness of the PPI channels used by Zigbee stack by modifying sdk_resources.h to include PPI channel mask for used channels in NRF_PPI_CHANNELS_USED define.

    Best regards,
    Jørgen

Reply
  • Hi,

    The PPI 0-5 channels are only used by the 802.15.4 radio driver if debugging of radio events on GPIOs are enabled (by ENABLE_DEBUG_GPIO symbol). As far as I know, this is not enabled by default in the Zboss stack. It should therefor be ok to use the PPI channels for other purposes.

    I'm not sure if the nrfx_ppi driver is aware of the PPI channels used by Zigbee stack, I could not find any sources in the SDK that specify channels used by this stack (we have defines for the Softdevice and ESB/Gazell protocols). You can add awareness of the PPI channels used by Zigbee stack by modifying sdk_resources.h to include PPI channel mask for used channels in NRF_PPI_CHANNELS_USED define.

    Best regards,
    Jørgen

Children
Related