SDK upgrade to 10.0.4.66.2 guide

⚠️
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.
5 posts / 0 new
Last post
ky3orr
Offline
Last seen: 2 years 4 months ago
Joined: 2019-06-03 12:17
SDK upgrade to 10.0.4.66.2 guide

Hello,

 

our current code uses SDK 10.0.1.52 and we'd like to upgrade it to 10.0.4.66.2 (using DA14699 chip) because of improvements in the SUOTA area.

Is there a guide that explain changes that need to be introduced when upgrading between SDK revisions?

We see that there were changes in the interfaces (for example I2C) and we'd like to know what is the effort to migrate SDK to version 10.0.4.66.2.

 

Thank you for support.

 

Grzegorz Kaczmarek

Device: 
ky3orr
Offline
Last seen: 2 years 4 months ago
Joined: 2019-06-03 12:17
Hello again,

Hello again,

 

is there a guide available for upgrading SDKs between revisions?

Grzegorz Kaczmarek

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi Grzegorz,

Hi Grzegorz,

Apologies for the delay. You could read the UM-B-103 user manual form our support website which describing how to port SDK1 to SDK10. Please a have a look:

http://lpccs-docs.dialog-semiconductor.com/um-b-105-da1469x_porting_guide/index.html

The above document mentions the refactoring of the adapters. SDK10.0.1.52 is still the same as SDK1. You could also refer to the SDK10 user manual for more details.

http://lpccs-docs.dialog-semiconductor.com/um-b-092-da1469x_software_platform_reference/index.html

Thanks, PM_Dialog

ky3orr
Offline
Last seen: 2 years 4 months ago
Joined: 2019-06-03 12:17
Hello,

Hello,

I've updated SDK code, paths and cmake files.

After reading on differences between SKD versions I've added below code for UART to the files.

platform_devices.h

#define CFG_UART2

typedef const void* uart_device;

#if dg_configUART_ADAPTER

#include <hw_uart.h>
#include <ad_uart.h>
#include "peripheral_setup.h"

#ifdef CFG_UART2

extern const uart_device DEBUG_UART;

#endif // CFG_UART2

#endif // dg_configUART_ADAPTER

platform_devices.c

#include <ad_uart.h>
#include "peripheral_setup.h"

#include "platform_devices.h"

#if dg_configUART_ADAPTER

#ifdef CFG_UART2

/* UART2 I/O configuration */
const ad_uart_io_conf_t io_UART2 = {
        .rx = {
                .port = UART2_RX_PORT, .pin = UART2_RX_PIN,
                .on =  { HW_GPIO_MODE_INPUT, HW_GPIO_FUNC_UART2_RX,               false },
                .off = { HW_GPIO_MODE_INPUT,             HW_GPIO_FUNC_GPIO,       true },
        },
        .tx = {
                .port = UART2_TX_PORT, .pin = UART2_TX_PIN,
                .on =  { HW_GPIO_MODE_OUTPUT_OPEN_DRAIN, HW_GPIO_FUNC_UART2_TX,   false },
                .off = { HW_GPIO_MODE_INPUT,             HW_GPIO_FUNC_GPIO,       true },
        },
        .rtsn = {
                .port = UART2_TX_PORT, .pin = UART2_TX_PIN,
                .on =  { HW_GPIO_MODE_OUTPUT_OPEN_DRAIN, HW_GPIO_FUNC_UART2_RTSN, false },
                .off = { HW_GPIO_MODE_INPUT,             HW_GPIO_FUNC_GPIO,       true },
        },
        .ctsn = {
                .port = UART2_TX_PORT, .pin = UART2_TX_PIN,
                .on =  { HW_GPIO_MODE_INPUT, HW_GPIO_FUNC_UART2_CTSN,             false },
                .off = { HW_GPIO_MODE_INPUT,             HW_GPIO_FUNC_GPIO,       true },
        },
        .voltage_level = HW_GPIO_POWER_V33
};

/* UART2 driver configuration */
const ad_uart_driver_conf_t drv_UART2 = {
        .hw_conf = {
                .baud_rate = HW_UART_BAUDRATE_1000000,
                .data = HW_UART_DATABITS_8,
                .parity = HW_UART_PARITY_NONE,
                .stop = HW_UART_STOPBITS_1,
                .auto_flow_control = 0,
                .use_dma = 1,
                .use_fifo = 1,
                .tx_fifo_tr_lvl = 0, //???
                .rx_fifo_tr_lvl = 0, //???
                .tx_dma_burst_lvl = 0, //???
                .rx_dma_burst_lvl = 0, //???
                .tx_dma_channel = HW_DMA_CHANNEL_3,
                .rx_dma_channel = HW_DMA_CHANNEL_2
        }
};

/* UART2 controller configuration */
const ad_uart_controller_conf_t dev_UART2 = {
        .id = HW_UART2,
        .io = &io_UART2,
        .drv = &drv_UART2
};

const uart_device DEBUG_UART = &dev_UART2;

#endif // CFG_UART2

#endif // dg_configUART_ADAPTER

Later on I do:

uart_device device = {};

device = ad_uart_open(DEBUG_UART);

.
.
.

ad_uart_write(device, reinterpret_cast<const char*>(buffer.data()), buffer.length());

ad_uart_close(device, true);

And finally I hit a __BKPT(0); in line 785 in hw_uart.c. This is HW_UART_INT_BUSY_DETECTED case in UART_Interrupt_Handler.

 

1. Is the configuration done for the UART sufficient in SDK10?

2. What may cause reach HW_UART_INT_BUSY_DETECTED interrupt source?

 

Thank you for valuable feedback.

 

 

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi Grzegorz,

Hi Grzegorz,

When the UART low level driver is accessed concurrently from both TX/Rx paths, HW_UART_INT_BUSY_DETECTED is triggered. Can you please share me how you are using the UART adapter? Is it only the above code snippet?

Thanks, PM_Dialog