prod_test.bin客户测试命令ID

9个帖子/ 0新
Last post
Dave.renzo.
Offline
Last seen:2 years 5 months ago
Joined:2015-10-08 13:21
prod_test.bin客户测试命令ID

Hello Support,

I've been working to get familiar with the Production Line Tool board and associated software. I am able to successfully perform the RF tests and do all the required programming of my DA14580 design (using Murata type ZY Module). I need to incorporate a unit self test while the circuit is on the production line, reading through UM-B-041 I came across the Customer Test Command ID description on page 29. The description states : "In the firmware there is a function that the customers can add their own code to handle the data as they like."

I've looked through the code for the prod_test project but haven't been able to determine where I might add my own test code. What I'd like to do is toggle 3 gpio pins in sequence and execute an i2c transaction. Is this the right place in the testing/programming process to do this and where should I start looking to be able to implement this functionality?

应该使用SDK3或SDK 5使用PROD_TEST代码应该是相关问题吗?我的设计使用SDK5,但我看到了一个推荐使用SDK3版本的帖子。您可以提供与这些问题有关的任何建议,非常感谢,谢谢。

Device:
Gongyu_Dialog
Offline
Last seen:4 days 11 hours ago
Joined:2016-04-27 07:07
Hi,Dave.Renzo

Hi,Dave.Renzo
答案1:
>Check the function "hci_custom_action" in file "host_hci.c" from PLT source code.
//if used for DA1458X chip, the corresponding hci cmd is "01 D0 40 01 01 (param_data).Opcode is 0x40D0
>check the function "hci_custom_action_cmd" in file "customer_prod.c" from SDK
//add customer code insided. Now the default code only returns back the event.

Answer for question 2:
关于prod_test代码,如果您不打算进行任何更改,请为SDK3推荐。
But for SDK5, as far as I know, abnoraml results may obtained when in RF receiving test. Ex. the error rate may exceeds 100%. Of cource, it is the error related with the caculation part of the code.

修复如下:
in file \5.0.3\projects\target_apps\prod_test\prod_test\src\custom_gtl_hci.c

struct hci_ccevt* gtl_hci_tx_evt_func(uint8_t* length)
{
......
case LLM_LE_TEST_END_CMP_EVT:
opcode = hci_le_test_end_cmd_opcode;
param_len + = hci_ccevt_letstend_retpar_len;
//add begin *******************
struct llm_test_end_cmd_complete * s =(struct llm_test_end_cmd_complete *)(gtl_env.p_msg_tx-> param);
co_write16p(&(p_evt->param[1]), co_htobs(s->nb_packet_received));
//add end *************************
break;

Dave.renzo.
Offline
Last seen:2 years 5 months ago
Joined:2015-10-08 13:21
I got some custom code

我有一些自定义代码运行,但现在生产线工具GUI报告自定义测试失败。我正在设置一个GPIO高,循环NOP约2秒,然后将GPIO设置为低。该功能的剩余部分是未触及的,所以我很困惑为什么它现在报告失败。

I'd like to be able to sequentially toggle 3 GPIO pins in half second intervals. What is the best way to do this? Can I use the easy timer api? Thanks again for your help, it is very appreciated.

Dave.renzo.
Offline
Last seen:2 years 5 months ago
Joined:2015-10-08 13:21
I am now using the pwm timer

I am now using the pwm timer instead of the easy timer api but am experiencing problems. I am able to turn gpios on but not off it seems. Any thought s on what might be causing this?

Gongyu_Dialog
Offline
Last seen:4 days 11 hours ago
Joined:2016-04-27 07:07
嗨,戴夫。

嗨,戴夫。
你提到PWM不起作用吗?
And besides, any time- consuming code may not recommend to add in the function "hci_custom_action_cmd", due to the timeout check in the software of the PC tool , who is waiting for the return event.
您可以设置标志,然后在主函数中进行工作负载,或使用定时器回调函数。

Dave.renzo.
Offline
Last seen:2 years 5 months ago
Joined:2015-10-08 13:21
The PWM timer does seem to be

The PWM timer does seem to be working but if I try to do some thing as follows:

1) turn on GPIO
2) wait 1 sec
3) turn off GPIO
4) wait 1 sec

The gpio will go high and then 2 seconds later the software will report failure. For the actual test sequence I want to toggle the GPIO's for something on the order of 20ms -30ms of on time. As far as setting a flag and doing the test code in the main function, where in the main function should I do this?

Gongyu_Dialog
Offline
Last seen:4 days 11 hours ago
Joined:2016-04-27 07:07
Hi, Dave

Hi, Dave

You can add here only for test.

int main_func(void)
{
...............
/ *
************************************************************************************
* Main loop
************************************************************************************
*/
而(1)
{
#if has_toggle_gpio.
cust_gpio_fsm();
#endif
......

thomasburton
Offline
Last seen:3 years 2 months ago
Joined:2016-01-13 14:46
Hi Dialog,

Hi Dialog,

I tried to add in the code below to use XTAL trimming with my custom test in SDK5 but I still get the XTAL trim fail message on boards that I know pass it on the standard unmodified prod_test.bin

//add begin *******************
struct llm_test_end_cmd_complete * s =(struct llm_test_end_cmd_complete *)(gtl_env.p_msg_tx-> param);
co_write16p(&(p_evt->param[1]), co_htobs(s->nb_packet_received));
//add end *************************

From the log:

|17:07:06.476 |DUT_PDLL_XTAL_TRIM_INIT | STARTED |XTAL trim operation initialized.
|17:07:06.477 |DUT_PDLL_XTAL_TRIM_START | STARTED |XTAL trim operation started.
设备| | 17:07:36.478 | DUT_PDLL_RX_TIMEOUT |错误did not reply on a pdll message request. Current device status=[12].
|17:07:36.479 |DUT_PDLL_XTAL_TRIM_FAILED | FAIL |XTAL trim FAILED. Current device status=[12].

Is there anything else I need to change in SDK5?

最好的祝愿,

Thomas

MT_dialog
Offline
Last seen:1 week 6 days ago
Staff
Joined:2015-06-08 11:34
托马堡顿,

托马堡顿,

The code that you added is for a fix that was applied for a bug that was introduced on the 5.0.3 and was related to the tests with the CBT tester, there is no use for the fix that you are implementing on the prod_test project of the 5.0.4 and also there is no use for it in order to apply a custom test.

Thanks MT_dialog