Hi everyone,
Board : QCA4020
reference to 80-ya121-140_c_qca402xcdb2x_development_kit_user_guide (update November 16, 2018)
I want to use two QCA4020 run the HTC demo on SPI and SDIO.
I have follow the guide to build Host and target application, it can work in SPI mode. So, there is no problem in setting, build and flash image.
But, there are some problems when it work in SDIO mode.
I'm sure that the enviroment variable for SDIO is correct.
1. SDIO Host controller configuration
Why build and flash the sdhost and HTC_demo to modify “sdio_gpio_arr” and “sdio_gpio_off_arr” to the values highlighted in the file: $SDK/quartz/demo/QCLI_Demo/src/export/DevCfg_master_fom_out_cdb.xml.?
I think it should be modify the file :
SDHOST: $SDK\target_sdio\exthost\rtos\demo\sdhost\src\export\DevCfg_master_fom_out_cdb.xml.
TARGET: $SDK/quartz/demo/QCLI_Demo/src/export/DevCfg_master_fom_out_cdb.xml.
And i did do that.
2. The meaning of the modify setting
what's the meaning of the modify setting like this:
Format: GPIO FUNCTION, GPIO DIR, GPIO_PULL, GPIO_DRV_STRENGTH
0x12, 3, 0, 1, 1,
0x13, 3, 0, 2, 1,
0x14, 3, 0, 2, 1,
0x15, 3, 0, 2, 1,
0x16, 3, 0, 2, 1,
0x17, 3, 0, 2, 1,
The format only four params, but the setting has five params.
3.Build target-side HTC_demo application
Disable sleep by modifying “devcfgSleepData” value to 0 in file $SDK/exthost/rtos/demo/sdhost/src/export/DevCfg_master_devcfg_out_cdb.xml
Why build target-side application modify the host setting, why not the same file in target floder?
4.SDIO connection
I don't use the MicroSD-to-MicroSD cable.
Reference to LD20-YA999_RevB
connect J103 pin9 and pin13 for detect connection for HOST board and Target board.
Host J5 pin29~39 connect Target J5 pin29~39
5. Run the log:
HOST:
SDIO Demonstration
sdhost: Enter demo_init
sdhost: Snoozing for 5 seconds.....
sdhost: register avail/unavail events
sdhost: demo_avail_handler
sdhost: Enter demo_thread_start
sdhost: create demo_thread_main
sdhost: done creating demo_thread_main
sdhost: main thread started
sdhost: create demo_thread_checker
TARGET:
Host Target Communications TARGET-side demo
qapi_HTC_Slave_Init returns status=0
HTC_demo_thread: Wait for Host to negotiate configuration...
I have tracked the code. Host has block in htca_mbox.c:
qurt_signal_wait(&target->target_init_wait, HTCA_TARGET_READY_FLAG, QURT_SIGNAL_ATTR_CLEAR_MASK);
The Target may not post the credit. if don't power on the Target and run the Host alone, the log is:
SDIO Demonstration
sdhost: Enter demo_init
sdhost: Snoozing for 5 seconds.....
sdhost: register avail/unavail events
so i think the connection is correct. Can you point out the mistake and give me some ideas.
btw, all the log is run in the modify file in what i point in the 1
SDHOST: $SDK\target_sdio\exthost\rtos\demo\sdhost\src\export\DevCfg_master_fom_out_cdb.xml.
TARGET: $SDK/quartz/demo/QCLI_Demo/src/export/DevCfg_master_fom_out_cdb.xml.
if only modify following the guide in $SDK/quartz/demo/QCLI_Demo/src/export/DevCfg_master_fom_out_cdb.xml.
power on the host and target, host log is :
SDIO Demonstration
sdhost: Enter demo_init
sdhost: Snoozing for 5 seconds.....
sdhost: register avail/unavail events
Best Regards,
skyzhao
Our sincere apologies for the confusion in the development kit, we will update in the next revision.
Kindly note the below configuration:
SDIO HOST: $SDK/exthost/rtos/demo/sdhost/build/gcc
TARGET: $SDK/quartz/demo/HTC_demo/build/gcc
Modify the device configuration.xml of both demos and set the build parameter to CFG_INTERCONNECT_SDIO=true and try the demo again.
It can work in new setting. Thank you very much for your reply.