prod_test uninitalized port_sel.

⚠️
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//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4个帖子/ 0新
Last post
jcdr
Offline
最后一次露面:5 months 2 weeks ago
加入:2019-12-19 09:10
prod_test uninitalized port_sel.

Hello,

I passed severy days figure out why the DA14531 prod_test don't run reliably on both the Development Kit-Pro and Development Kit-USB if the communication is configured to TX=P0_0 and RX=P0_1. What I found is that the port_sel variable that is used to setup the UART pins stay uninitialized. Most of the time the memory containing the port_sel variable hold a zero value matching the P0_0_AND_P0_1_INITIALIZED_FROM_EXT_TOOL constant and the application work as expected. But sometimes this that memory contain a non zero value and the aplication fail to communicate.

I successfully solved this problem by adding the following line into the beginning of the function periph_init() of the file user_periph_setup.c:

port_sel = UART_PORT_SEL;

And add this line into user_periph_setup.h just after the definition of the enum:

#define UART_PORT_SEL P0_0_AND_P0_1_INITIALIZED_FROM_EXT_TOOL;

最好的祝福。

Jean-Christian de Rivaz

Keywords:
Device:
PM_DIALOG.
Offline
最后一次露面:2天14小时前
Staff
加入:2018-02-08 11:03
Hi Jean-Christian,

Hi Jean-Christian,

Please refer toAN-B-077: DA14531 Bluetooth Direct Test Modeapplication note from the DA14531 support webpage. You will find the appropriate steps and configurations you should follow in order to run the prod_test from 2-wire UART mode on P00 and P01. Many thanks for your comments and the feedback, but the modifications you mentioned are not required. Just follow the steps below. I tested it in my side using the DA14531 Pro-DK.

1.请打开prod_test项目,没有SDK6.0.12提供的任何修改。\

2. In user_periph_setup.h, please change the GPIOs configuration as below. Refer to 4.1 Software Setup from the AN for more information.

/****************************************************************************/ /* UART pin configuration */ /****************************************************************************/ /****************************************************************************/ /* CONFIG_UART_GPIOS */ /* -defined Uart Port/Pins are defined by external tool */ /* -undefined Uart Port/Pins are defined in the current project */ /****************************************************************************/ #undef CONFIG_UART_GPIOS /****************************************************************************/ /* UART pin configuration */ /* Supported Port/Pin Combinations: */ /* Tx: P00, Rx: P01 */ /* Tx: P02, Rx: P03 */ /* Tx/Rx: P03 (1-Wire UART) */ /* Tx: P04, Rx: P05 */ /* Tx/Rx: P05 (1-Wire UART) */ /* Tx: P06, Rx: P07 */ /****************************************************************************/ #if defined(__DA14531__) #define UART1_TX_GPIO_PORT GPIO_PORT_0 #define UART1_TX_GPIO_PIN GPIO_PIN_0 #define UART1_RX_GPIO_PORT GPIO_PORT_0 #define UART1_RX_GPIO_PIN GPIO_PIN_1 #else #define UART1_TX_GPIO_PORT GPIO_PORT_0 #define UART1_TX_GPIO_PIN GPIO_PIN_4 #define UART1_RX_GPIO_PORT GPIO_PORT_0 #define UART1_RX_GPIO_PIN GPIO_PIN_5 #endif

3. Compile the project and download the fw into System-RAM. This could be done by 3 options thought:

- 按“开始/停止调试会话”按钮两次Keil IDE

- SmartSnippets Toolbox (SST) Booter

- SST RF-Master固件下载工具

4. The next step is to configure the SST accordingly. So, open the SST and the “Board Setup”. You should select UART configuration for P0_0 and P0_1. Refere to section 4.1.1 Setting up Rx/Tx test modes with RF Master for more information.

5.现在,你应该能够使用RF主人!

谢谢,PM_DIALOG.

jcdr
Offline
最后一次露面:5 months 2 weeks ago
加入:2019-12-19 09:10
感谢您的答复。

感谢您的答复。

我也遵循该指令。这work most of the time but the result is not reliable due to the uninitialized port_sel variable. If port_sel is not zero by chance, the port pins are never configured for UART operation and the communication don't work. Under the folder SDK/6.0.12.1020.2/projects/target_apps/prod_test there is nowhere the port_sel variable is initialised to the P0_0_AND_P0_1_INITIALIZED_FROM_EXT_TOOL constant.

SDK/6.0.12.1020.2/projects/target_apps/prod_test$ egrep -r port_sel
prod_test/src/config/user_periph_setup.h:extern uint8_t port_sel;
prod_test / src / platform / user_periph_setup.c:uint8_t port_sel __section_zero(“prodtest_uninit”);
prod_test / src / platform / user_periph_setup.c:switch(port_sel)
prod_test / src / platform / user_periph_setup.c:switch(port_sel)

Note: For some reason this issue occure more often on the DA14531 "Kit-USB" board than on the DA14531 "Kit-Pro" board.

PM_DIALOG.
Offline
最后一次露面:2天14小时前
Staff
加入:2018-02-08 11:03
Hi Jean-Christian,

Hi Jean-Christian,

Thanks for your inputs. I will check it internally and test your suggested workaround. Again thanks for your inputs!

谢谢,PM_DIALOG.