Hi Nordic Experts,
I use nRF52832 for a custom board, I use GPIO P0.17 and P0.18 for controlling NMOS switch, for buzzer and vibration motor, and the frequency is controlled by ADC value. I use SDK 16 for firmware, and programming through nRF52DK serial wire. At first, I can program it just fine, but after reprogramming it for couple of times, these two GPIOs cannot be programmed, but keeps on switching as programmed previously. I suspect that I might have damaged the GPIO pins, but the current drawn should not be too much since they just drive the transistor. Attached are the schematic and code snippet. Thank you.
saadc_init(); nrf_gpio_cfg_output(GPIO_OUTPUT_BUZZER); nrf_gpio_cfg_output(GPIO_OUTPUT_VIBRATION); for (;;) { nrf_drv_saadc_sample(); if (count < abs(saadc_value)) { nrf_gpio_pin_clear(GPIO_OUTPUT_BUZZER); nrf_gpio_pin_clear(GPIO_OUTPUT_VIBRATION); } if (count >= (abs(saadc_value))) { nrf_gpio_pin_clear(GPIO_OUTPUT_BUZZER); nrf_gpio_pin_clear(GPIO_OUTPUT_VIBRATION); if (count >= (abs(saadc_value))) count = 0; } if (count >= (abs(saadc_value)*2)) { count = 0; } count++; }