Changing UART pin on USB Development Kit

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
paolog
Offline
Last seen: 7 months 3 weeks ago
Joined: 2020-11-06 09:30
Changing UART pin on USB Development Kit

Hi!

In order to test hibernation mode on the DA14531 USB development kit I need to free PIN0_5 for hibernation wake up. On the DK this pin is used for UART for debugging information: is there a way I can move UART to PIN0_6 (for example) so I can at the same time keep debug information and have PIN0_5 available to wake the device up from hibernation?

I've already read the hardware user manual (UM-B-125), but I only found how to use PIN0_5, but this will disable UART debugging function.

Thank you.

MHv_Dialog
Offline
Last seen: 4 months 2 weeks ago
Staff
Joined: 2013-12-06 15:10
Hi Paolog,

Hi Paolog,

The 531 USB development kit facilitates debugging UART TX over the USB connection on either pin P0_5 (default setting of the S1) or P0_0. The latter requires that you

  1. Set the switches of S1 one as described in UM-B-125 section 5.6 
  2. Define your UART TX pin as P0_0 in user_periph_setup.h
  3. Disable the reset functionality of P0_0 before you configure it as UART in set_pad_functions() of user_periph_setup.c as shown below:
void set_pad_functions(void)
{
    GPIO_Disable_HW_Reset();

#if defined (CFG_PRINTF_UART2)
    // Configure UART2 TX Pad
    GPIO_ConfigurePin(UART2_TX_PORT, UART2_TX_PIN, OUTPUT, PID_UART2_TX, false);
#endif
}

 

You can use P0_6 or any other available pin as well, but this will require a 3rd party UART to USB converter. The PRO develoment kit offers a lot more flexibility because every GPIO is connected to a header pin.

/MHv

paolog
Offline
Last seen: 7 months 3 weeks ago
Joined: 2020-11-06 09:30
Thank you. I set the switch

Thank you. I set the switch as described in section 5.6 of UM-B-125, but after that I'm not able to upload the firmware to the USB DK to be debugged with Keil uVision. Is this correct? Should I use SmartSnippets tools and not use the debug functionality of Keil?

MHv_Dialog
Offline
Last seen: 4 months 2 weeks ago
Staff
Joined: 2013-12-06 15:10
You should be able to use the

You should be able to use the debugger from Keil. Have you set the Jlink Max Clock to 2MHz (options for target / debug tab / J-Link Settings / Max Clock)?

/MHv