DA14683 USB KIT: LEDs On/Off and Switch Buttons

⚠️
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.
8 posts / 0 new
Last post
Thomas Donhauser
Offline
Last seen: 5 months 2 weeks ago
Joined: 2019-10-20 10:45
DA14683 USB KIT: LEDs On/Off and Switch Buttons

Hi,

I'm evaluating with the DA14683 USB KIT and like to know 

1) How to switch on and off the General purpose White and Red LED.

2) How to trigger when pressing one of the both General purpose Switches.

I've looked through the SDK but could't find any example that shows up how it could work. I'm still not sure if that's even possible, because I found no clear advices that the USB-Kit is supported this way.

Thank you,

Thomas

Device: 
PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi Thomas,

Hi Thomas,

  1. The red LED D9 is driven from P1_2 and the white LED D10 is driven from P4_1 (Figure 18). Both are general purpose LEDs so you could switch on/off by your software.
  2. Switches SW3 and SW4 are not populated but placed in the bottom of the board (Figure 16). SW3 is connected to P4_2 and SW4 is connected to P4_3 (Figure 14). Again. You should handle them by your software.

Thanks, PM_Dialog

Thomas Donhauser
Offline
Last seen: 5 months 2 weeks ago
Joined: 2019-10-20 10:45
Thank you, it's good to hear

Thank you, it's good to hear that it is possible! I just don't know how to handle it in my software since there is no demo-code in the SDK and I don't know from where to start off. So I'd very much appreciate any hint that closes the the gap from hardware to the API-function I have to call. 

THX, Thomas

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi Thomas,

Hi Thomas,

You should configure them in you SW. Also you need to do is to configure the correct GPOIs and set them High/Low in your SW. What yu are trying to accomplish? Can you please indicate it?

Thanks, PM_Dialog

Thomas Donhauser
Offline
Last seen: 5 months 2 weeks ago
Joined: 2019-10-20 10:45
Hello,

Hello,

Sorry, your answer does't help me. Currently we are developing a new application where interaction with the user should be done by LEDs and at least one switch. That is wat we try to accomplish.
I'm aware that there must be something configured and a pin must be set to high/low to switch some on and off. But I don't know how to do it. I've read UM-Β-094 in details, but without any appropriate documentation or example that explain the required steps in the source-code I'm just lost. So I try to precise my question: Where is the example or doc that explain it details?

Thank you,
Thomas

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi Thomas,

Hi Thomas,

I would advice you to read the following document in order to have better view on the SDK exchtecture. For interracting with GPIO you should use the hw_gpio.h Low Level Driver. In the periph_init() you should use the hw_gpio_set_pin_function() in order to Set the pin type and mode. Then you could use hw_gpio_set_active() or hw_gpio_set_inactive to  set the GPIO high or low.

thanskm PM_Dialog

Thomas Donhauser
Offline
Last seen: 5 months 2 weeks ago
Joined: 2019-10-20 10:45
Problem solved!

Problem solved!

Dear Supporter,
Your hint finally set me up to deal with the GPIOs and buttons in the right way. Nevertheless I'd like to recommend to extend the project list in the SDK with an example that supports LEDs and buttons placed on the DA14683 USB-Kit board.
Another recommendation might be to advise upfront loud an clear that non of the examples in the SDK will run properly on the USB-Kit board when pm_set_sleep_mode is set to pm_mode_extended_sleep instead of pm_mode_active as necessary for the USB-Kit board by default. This is due to the fact that the board is set to 5V (as USB-Device) by default. I'm 100% sure that almost everybody is overlooking this trap.

Thank you,
Thomas

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi Thomas,

Hi Thomas,

This is described in  UM-B-094 User Manual: DA14682/DA14683 USB Kit  document.. In section 5.16  Power Section you will find that there is a switch button (SW6). According to the documents, the DA14683 SoC can be supplied either from the USB port with a voltage of 5V to the VBUS pin or through LDO (U10) with a voltage of 3.3V to the VBAT pin. The power selection is achieved through the switch SW6 (Figure 30, Figure 31). The maximum current for SW6 is 100mA. The default position of SW6 connects the VBUS pin of DA14683 with the USB port (5V). Please find more information in section 6. 

Thanks, PM_Dialog