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

Can I configure GPIOTE to debug my signals?

Hello,

I am using nrf52832 DK and I would like to use the GPIOs port to debug a couple of signals that I genereate within the MCU.

So far I have configured my GPIOTE module like this (I am using the LEDs for now as example to see that they change), but I am not sure how if I have to configure the GPIOTE more in order to make my signal available on that pin.

My definition

#define GPIO_OUTPUT_A  BSP_LED_0 //25  /**< Pin number for A signal debug. */

My GPIOTE config

static void gpiote_init(void){

    uint32_t            err_code;
    nrf_drv_gpiote_out_config_t config = GPIOTE_CONFIG_OUT_SIMPLE(NRF_GPIOTE_INITIAL_VALUE_LOW);
    
    //Configuring A debug pin
    err_code = nrf_drv_gpiote_out_init(GPIO_OUTPUT_A, &config);
    APP_ERROR_CHECK(err_code);

    if (!nrf_drv_gpiote_is_init())
    {
        err_code = nrf_drv_gpiote_init();
        APP_ERROR_CHECK(err_code);
    }
}

So if I would like to have the value of A,define as float for instance, how can I write it to the GPIO_OUTPUT_A ? Something like this

nrf_gpio_pin_write(GPIO_OUTPUT_A,(uint32_t)A);

Thanks in advance

Parents Reply Children
No Data
Related