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

Using Pin K6 (P0.18 / nRESET) for UART RX/TX

Hello,

ich have a custom board (with nRF52840 chip)  which is programmed over SWD. So the Port ist easy accessable. As base software I am using example/radio_test.

I like to use the connector after programming as uart, so my idea was to configure SWO and RST pins as UART, which are not really used during programming. SWO/P1.00 works fine as e.g. TX but RST/nRESET/P0.18/K6 doesn't work as TX or RX.

Disabling RST through writing 0x0 to PSEKRESET[0..1] doen't help.

GPIO should be available on K6 as in Table 143 of nRF52840_PS_v1.1.pdf, do I need to implement bitbanging UART?

Regards

Ben

  • This works. I didn't disable the float control ;-)


    #define RX_PIN_NUMBER NRF_GPIO_PIN_MAP(0, 18) // RST
    #define TX_PIN_NUMBER NRF_GPIO_PIN_MAP(1, 0 ) // SWO
    #define HWFC           false

    EDIT: not really there.. if i send data to the device it resets.

    CONFIG_GPIO_AS_PINRESET

    needs to be removed from project settings (define "-D" compiler flag) to allow this pin as uart.

    Ben

Related