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
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.
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.
感谢您的答复。
我也遵循该指令。这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.
Hi Jean-Christian,
Thanks for your inputs. I will check it internally and test your suggested workaround. Again thanks for your inputs!
谢谢,PM_DIALOG.