This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

use Gazell to open/close pipe

Hi everyone: use Gazell to builder multi-node . so i have to re-enable pipe number on connect state.

my Fragment code about "open/close pipe". but it not work correctly.


nrf_gzll_disable();
init_ok = nrf_gzll_init(NRF_GZLL_MODE_HOST); 			
(void)nrf_gzll_set_rx_pipes_enabled(nrf_gzll_get_rx_pipes_enabled() | (1 << data_payload[0]));
ack_payload[0]=data_payload[0];
push_ok = nrf_gzll_add_packet_to_tx_fifo(pipe, ack_payload, TX_PAYLOAD_LENGTH);
enable_ok = nrf_gzll_enable();	

Parents
  • Hi Steven,

    I am just updating this case with the solution that you've already found.

    The issue is that "nrf_gzll_disable()" does not wait until you are disabled. It will give you a callback function when the library has shut down properly.

    You can do this by polling the gazell library:

    
    nrf_gzll_disable();
    __WFI();
    while(nrf_gzll_is_enabled())
    {
    }
    // update configuration
    ...
    
    

    Or if you are using the GZP library:

    
    nrf_gzp_disable_gzll();
    // update configuration
    ...
    
    

    Best regards Håkon

Reply
  • Hi Steven,

    I am just updating this case with the solution that you've already found.

    The issue is that "nrf_gzll_disable()" does not wait until you are disabled. It will give you a callback function when the library has shut down properly.

    You can do this by polling the gazell library:

    
    nrf_gzll_disable();
    __WFI();
    while(nrf_gzll_is_enabled())
    {
    }
    // update configuration
    ...
    
    

    Or if you are using the GZP library:

    
    nrf_gzp_disable_gzll();
    // update configuration
    ...
    
    

    Best regards Håkon

Children
No Data
Related