Hello,
While studying the structure of the zcl_onoff_demo zigbee code got few questions that needs to be clear
1. As per a forum discussion the first function call is void app_init(qbool_t ColdBoot), so when is void app_start(qbool_t ColdBoot) function called as it carries a thred?
2. I am studying the structure for zigbee example code zcl_onoff_demo, as per my observation QCLI_Thread thread is created in void app_start(qbool_t ColdBoot) function, if i want to create more of thread i need to create it in app_start(qbool_t ColdBoot) function itself as per the standard?
3. Not clear if the zcl_onoff_demo example code is for router or coordinator. Please clearify?
4. Can you please explain the flow of code, how the threads are executing?
Any help is appreciated.
Thank you,
Akshaay
1. After initializing hardware and peripherals, execution jumps to qca_init(), which will initialize all non-CoreBSP modules and then jump into the start of application (app_start()).
2. The QCLI_demo is intended to show multiple functionalities where several sample use QCLI_thread to register for QCLI_command_group. However you can create additional thread in app_start or call a seperate function and create a thread when required.
3. zcl_onoff_demo is to demonstrate the light on off capabilities of zigbee cluster, if remote device is connected to zigbee co-ordinator . Kindly refer to "cmd_ZB_Initialize()" to understand the initialization and code flow of zigbee co-ordinator and router.
4. You have the capability to compile the source in "threadx" or freeRTOS() , KInldy refer to section 3.4.1 Real time operating system (RTOS) to understand more about the priorities and implementation from document "80-YA121-140 QCA402x (CDB2x) Development Kit User Guide".
Kindly let us know if you have more questions.
Thank you raja_pedada for solving my doubts.
Now, while flashing the demo code for QCLI_demo i am facing few problem
I have set up eclipse environment and build the code QCLI_demo successfully.
We have used openOCD version 20170821, this is the lowest version we are able to download.
While flashing the code we are getting errors in eclipse console as below. I have checked the JTAG jumper setting several times, also i have given externel supply to board via adapter to confirm there is no current issues.
Please provide any solution ASAP.
Kinldy use the older version OpenOCD-20170609.zip from the below link and try flashing again.
OpenOCD-20170609.zip
Make sure the jumper settings are valid for "4-pin JTAG (GPIO27:24)" as listed in document QCA402x (CDB2x) Development Kit User Guide.
Hi,
I have used older version for openOCD-20170609, still the error exists, we are using qca4020 evaluation board from silex.
Referring the quick start guide of silex JATG and Debug connection given in section 6, i have connected the jumpers for JTAG and debug correctly.
Below is the error i am facing while flashing the code.
what is this Error: Invalid ACK (4) in DAP response? what does ACK (4) error indicates? please provide with a solution.
Open On-Chip Debugger 0.10.0 (2017-06-09) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 5000 kHz
Info : clock speed 5000 kHz
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 11 -expected-id 0x300160e1"
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Could not initialize the debug port
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Could not initialize the debug port
Error: Target not examined, reset NOT asserted!
in procedure 'reset' called at file "qca402x_openocd.cfg", line 93
in procedure 'ocd_bouncer'
Could Not Find E:\eclipse-workspace\qca4020-or-3-0_qca_oem_sdk-cdb.git\target\quartz\demo\QCLI_demo\build\gcc\output\firmware_table.bin
Could Not Find E:\eclipse-workspace\qca4020-or-3-0_qca_oem_sdk-cdb.git\target\quartz\demo\QCLI_demo\build\gcc\output\generated_partition_table.xml
Could Not Find E:\eclipse-workspace\qca4020-or-3-0_qca_oem_sdk-cdb.git\target\quartz\demo\QCLI_demo\build\gcc\output\generated_fwd_table.xml
[2019-08-27 17:47:41,217] INFO: Checking for files to add to the image for Firmware Descriptor Table 0 File:gen_fwd_table.py:673 Function:gen_xml_program
[2019-08-27 17:47:41,428] INFO: Done Generating XML file to program. File:gen_fwd_table.py:711 Function:gen_xml_program
Starting GDB Server....
[2019-08-27 17:47:41,875] INFO: flash_through_gdb.py version 1.0.5 File:flash_through_gdb.py:596 Function:main
[2019-08-27 17:47:44,155] DEBUG: Output Directory is gdbout/ File:flash_through_gdb.py:628 Function:main
[2019-08-27 17:47:44,155] DEBUG: Search Path 1 .\output/ File:flash_through_gdb.py:640 Function:main
[2019-08-27 17:47:44,155] DEBUG: Search Path 2 ..\..\..\..\..\bin\cortex-m0\threadx\ File:flash_through_gdb.py:640 Function:main
[2019-08-27 17:47:44,157] DEBUG: Search Path 3 ..\..\..\..\..\bin\wlan/ File:flash_through_gdb.py:640 Function:main
[2019-08-27 17:47:44,157] DEBUG: Search Path 4 ./ File:flash_through_gdb.py:640 Function:main
[2019-08-27 17:47:44,201] INFO: Will write file ./firmware_table.bin into sectors [0, 0] File:flash_through_gdb.py:675 Function:main
[2019-08-27 17:47:44,203] DEBUG: C:/Program Files (x86)/GNU Tools ARM Embedded/6.2 2016q4/bin/arm-none-eabi-gdb.exe --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:451 Function:run
GNU gdb (GNU Tools for ARM Embedded Processors) 7.12.0.20161204-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
[2019-08-27 17:47:44,404] INFO: GDB can run without shell=true File:flash_through_gdb.py:435 Function:_check_need_shell
gdbout/gdb_commands.txt:1: Error in sourced command file:
localhost:3333: No connection could be made because the target machine actively refused it.
[2019-08-27 17:47:45,959] ERROR: Unable to open the file 'gdbout/command_result.log'
File:flash_through_gdb.py:256 Function:_check_status
Traceback (most recent call last):
File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 249, in _check_status
f = open(self.cmd_status_file , 'rb')
IOError: [Errno 2] No such file or directory: 'gdbout/command_result.log'
[2019-08-27 17:47:45,961] WARNING: The last command return error
File:flash_through_gdb.py:259 Function:_check_status
[2019-08-27 17:47:45,961] ERROR: Failed to write to start sector=0, num sectors=1 File:flash_through_gdb.py:678 Function:main
Flash Operation Completed Successfully...
Thank you,
Regards,
Akshaay
nvalid ACK (4) occurs when JTAG-TDI/TDO pins are not connected properly.
Can you confirm if J38 pin2 is connected to J39 pin3 ?
Can you provide us the instructions followed and share us the picture of board setup to verify jumper connections ?
Hello,
New issue is there for Onboard_demo project debugging.
The code is building and i am able to flash it correctly, when the eclipse is configured in debug mode and debug is clicked.
The debug tab is open and when i click on resume button below error occures. But for QCLI_demo debuggin is working correctly.
Is there any change in debug configuration or procedure for debugging Onboard_demo.
You need to follow the same procedue as descrbed for QCLI_demo or HelloWorld_demo.
Make sure the jumper settings are accurate and DeepSleep is disable while trying to debug using OpenOCD.
Hi,
1. I have followed the procedure for QCLI_demo and HelloWorld_demo, the jumpers are correct and DeepSleep is disable still the issue is there in board demo.
2. I want to report on/off switch data from my router to my coordinator using QCLI_demo project. The command i am using is
"ConfigReport"
"ReportAttribute ": in this command what should i pass in [AttrType]
Are the above command enough to report an attribute. I have already added my device in device list before passing this command.
Its not showing anything on sniffer, though it is printing default response on serial terminal.
Looking for a solution ASAP.
Thank you,
Akshaay