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

Assigning a functional block to a GPIO

I'm confused about how to assign a functional block's I/O (TWI in my case) to a particular pin on the device. Is there a worked and documented example? Is there a relevant application note?

Parents
  • Hi again. Since I've used the template design as, well, my template, I had all the following init calls intact:

        // Initialize
        leds_init();
        timers_init();
        gpiote_init();
        buttons_init();
        ble_stack_init();
        scheduler_init();
        gap_params_init();
        advertising_init();
        services_init();
        conn_params_init();
        sec_params_init();
        
        // Start execution
        timers_start();
        advertising_start();
    

    That caused the twi_init() call to hang. However, if I comment out some of these calls, like so:

        // Initialize
        leds_init();
        timers_init();
        gpiote_init();
        buttons_init();
    //    ble_stack_init();
        scheduler_init();
    //    gap_params_init();
    //    advertising_init();
        services_init();
    //    conn_params_init();
        sec_params_init();
        
        // Start execution
        timers_start();
    //    advertising_start();
    

    I see the clock running on the TWI SCK pin! Any hints on why this happens on how to resolve these potential conflicts? Thanks!

Reply
  • Hi again. Since I've used the template design as, well, my template, I had all the following init calls intact:

        // Initialize
        leds_init();
        timers_init();
        gpiote_init();
        buttons_init();
        ble_stack_init();
        scheduler_init();
        gap_params_init();
        advertising_init();
        services_init();
        conn_params_init();
        sec_params_init();
        
        // Start execution
        timers_start();
        advertising_start();
    

    That caused the twi_init() call to hang. However, if I comment out some of these calls, like so:

        // Initialize
        leds_init();
        timers_init();
        gpiote_init();
        buttons_init();
    //    ble_stack_init();
        scheduler_init();
    //    gap_params_init();
    //    advertising_init();
        services_init();
    //    conn_params_init();
        sec_params_init();
        
        // Start execution
        timers_start();
    //    advertising_start();
    

    I see the clock running on the TWI SCK pin! Any hints on why this happens on how to resolve these potential conflicts? Thanks!

Children
Related