- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why can not I get a break in the function "wiced_join_events_handle" which is from line 964~1192 of the file(/Wiced-SDK/WICED/WWD/internal/wwd_wifi.c) in WICED SDK3.1.2? Other functions can get a break normally.
My Make Target is:
wwd.canned_send-BCM943362WCD4-NoOS-NoNS-SPI-debug no_dct download run
After the app is downloaded to BCM9WCD1EVAL1,it can connect my router successfully and run well, but I can not get a break in the function "wiced_join_events_handle" while I am debugging with WICED IDE 3.1.2. All of the code has not been modified.
Why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Liwanfei,
In my EVB "BCM943362WCD4", it is OK.
There is one thing mismatch in your description: the platform in your make target is "BCM943362WCD4", but your EVB is "BCM9WCD1EVAL1".
As I known, the breakpoint number is limited. If the breakpoint is reached the max number, it can't be set successfully.
You can check the log in the console to find whether your breakpoint is set successfully or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot. BCM943362WCD4 is the WIFI module which on the EVB BCM9WCD1EVAL1. My breakpoint number is 3.
I can not get a break in Only the function "wiced_join_events_handle" , Other functions can get a break normally.
Can you get a breakpoint in line 964~1192 of the file(/Wiced-SDK/WICED/WWD/internal/wwd_wifi.c ) in the app wwd.canned_send which has NoOS and NoNS by SPI?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Liwanfei,
I'm using 3.1.2 with the target
wwd.canned_send-BCM943362WCD4-NoOS-NoNS-SPI-debug no_dct
I'm able to get a break in wiced_join_events_handler() fine. If you're able to connect to the router there should be no reason why you can't break in the event handler function. Could you try reopening the IDE and build a clean version of the app?
Here's the screenshot I took of my debugger and putty output.
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Jaeyoung,
Sorry for overdue response . I am busy these days.
My OS is Windows XP EN SP3. My steps as following :
1> BCM9WCD1EVAL1 is powered off, after 5 seconds BCM9WCD1EVAL1 is powered on.
2> Launch Wiced SDK 3.1.2 IDE
3> I doubt that the function do not working well, hence
I add printed info at line 290 in the file "/Wiced-SDK312/WICED/WWD/internal/wwd_thread.c"as following:
line 290 printf("\r\n FUN wwd_thread_func Start... \n"); // function start
line 353 printf("\r\n FUN wwd_thread_func End... \n"); // function end
4> Make target: wwd.canned_send-BCM943362WCD4-NoOS-NoNS-SPI-debug no_dct download run
5> wwd.canned_send do not work well.
not print: FUN wwd_thread_func Start...
6> Debug with breakpoint:
I can not get a break in the function "wiced_join_events_handle".
7> BCM9WCD1EVAL1 is powered off, after 5 seconds BCM9WCD1EVAL1 is powered on.
8> wwd.canned_send do not work well.
not print: FUN wwd_thread_func Start...
9> Debug with breakpoint:
I can not get a break in the funtion "wiced_join_events_handle".
10> Step Debug: it stoped at
line 247 retval = wwd_sdpcm_send_iovar( SDPCM_SET, buffer, 0, WWD_STA_INTERFACE );
in file "/Wiced-SDK312/WICED/WWD/internal/wwd_management.c"
It happened as following:
1> BCM9WCD1EVAL1 is powered off, after 5 seconds BCM9WCD1EVAL1 is powered on.
2> Launch Wiced SDK 3.1.2 IDE
3> I doubt that the function do not working well, hence
I add printed info at line 290 in the file "/Wiced-SDK312/WICED/WWD/internal/wwd_thread.c"as following:
line 290 printf("\r\n FUN wwd_thread_func Start... \n"); // function start
line 353 printf("\r\n FUN wwd_thread_func End... \n"); // function end
4> Make target: wwd.ping-BCM943362WCD4-SPI-FreeRTOS-LwIP-SPI download run
5> wwd.ping work well.
printed: FUN wwd_thread_func Start...
6> Make target: wwd.canned_send-BCM943362WCD4-NoOS-NoNS-SPI-debug no_dct download run
7> wwd.canned_send work well.
but not print: FUN wwd_thread_func Start...
8> Debug with breakpoint:
I can get a break in the function "wiced_join_events_handle".
9> BCM9WCD1EVAL1 is powered off, after 5 seconds BCM9WCD1EVAL1 is powered on.
10> wwd.canned_send do not work well.
but not print: FUN wwd_thread_func Start...
11> Debug with breakpoint:
I can not get a break in the funtion "wiced_join_events_handle".
12> Step Debug: it stoped at
line 247 retval = wwd_sdpcm_send_iovar( SDPCM_SET, buffer, 0, WWD_STA_INTERFACE );
in file "/Wiced-SDK312/WICED/WWD/internal/wwd_management.c"
I want to know why wwd.canned_send do not work well by oneself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Liwanfei,
So the print you added is right after the send UP command block in wwd_management_wifi_on()?
line 290 printf("\r\n FUN wwd_thread_func Start... \n"); // function start
If the above is not printing then not being able to get a break on wiced_join_events_handle() makes sense. The code is probably getting stuck somewhere or returning an error and aborting before the wiced_join() gets called.
Try uncommenting the following line from /include/wiced_defaults.h to get better visibility of what's happening.
#define WPRINT_ENABLE_WWD_ERROR
I'm not sure how the below is happening though. Are you sure everything works well in the below example and it still does not print out "FUN wwd_thread_func Start..."?
6> Make target: wwd.canned_send-BCM943362WCD4-NoOS-NoNS-SPI-debug no_dct download run
7> wwd.canned_send work well.
but not print: FUN wwd_thread_func Start...
8> Debug with breakpoint:
I can get a break in the function "wiced_join_events_handle".
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Jaeyong,
I appriciated of your help very much.
You mentioned:
I'm not sure how the below is happening though. Are you sure everything works well in the below example and it still does not print out "FUN wwd_thread_func Start..."?
6> Make target: wwd.canned_send-BCM943362WCD4-NoOS-NoNS-SPI-debug no_dct download run
7> wwd.canned_send work well.
but not print: FUN wwd_thread_func Start...
8> Debug with breakpoint:
I can get a break in the function "wiced_join_events_handle".
My answer:
After
Make target: wwd.ping-BCM943362WCD4-SPI-FreeRTOS-LwIP-SPI download run
wwd.ping work well, print info: "FUN wwd_thread_func Start..."
then, not power off,
Make target: wwd.canned_send-BCM943362WCD4-NoOS-NoNS-SPI-debug no_dct download run
wwd.canned_send work well. not print out "FUN wwd_thread_func Start..."
then, power off, after 5 seconds, powered on.
wwd.canned_send do not work well. not print out "FUN wwd_thread_func Start..."
I doubt that
wwd.canned_send work well from the parameters of wwd.ping in RAM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I remember there is a bug in the snip "wwd.canned_send".
Please check whether the variable "pkt_buffer" is 4 bytes align when the issue is happened.
SIDO is used DMA to tranfer command to WIFI chip. And the buffer tranfered by DMA required 4 bytes align.
You can modify
static char pkt_buffer[ ((MAX( PACKET_SIZE, MIN_IOCTL_BUFFER_SIZE )+63)&(~63))+4 ];
to
static char pkt_buffer[ ((MAX( PACKET_SIZE, MIN_IOCTL_BUFFER_SIZE )+63)&(~63))+4 ] __attribute__ ((aligned(4)));
and have a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot.
printf("\r\n pkt_buffer size = %d \r\n", sizeof(pkt_buffer));
// lwf not add __attribute__ ((aligned(4))) = pkt_buffer size = 132
printf("\r\n pkt_buffer size = %d \r\n", sizeof(pkt_buffer));
// lwf not add __attribute__ ((aligned(4))) = pkt_buffer size = 132
printf("\r\n Size____pkt_buffer = %d \r\n",
( (MAX( PACKET_SIZE, MIN_IOCTL_BUFFER_SIZE ) +63) & (~63)) +4); // 132
MIN_IOCTL_BUFFER_SIZE=120 (120+63)&(~63)+4=183&(~63)+4=128+4=132
this is 4-bytes aligned。
make , then, download, run. there are nothing changed.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 4 bytes align means that the start address of "pkt_buffer" is multiple of 4.
So, you need to printf the address of "pkt_buffer".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#define WPRINT_ENABLE_WICED_INFO /* Wiced internal prints */
#define WPRINT_ENABLE_WICED_DEBUG // lwf changed uncomment ori= commented
#define WPRINT_ENABLE_WICED_ERROR // lwf changed uncomment ori= commented
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#define WPRINT_ENABLE_WWD_INFO /* Wiced Wi-Fi Driver prints */
//#define WPRINT_ENABLE_WWD_DEBUG // lwf NOT changed else running Failed: will blocked at: Wcd:> Sending pkt 0x200008E8
#define WPRINT_ENABLE_WWD_ERROR // lwf changed uncomment ori= commented
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#define WPRINT_ENABLE_PLATFORM_INFO /* Platform prints */
#define WPRINT_ENABLE_PLATFORM_DEBUG // lwf changed uncomment ori= commented
#define WPRINT_ENABLE_PLATFORM_ERROR // lwf changed uncomment ori= commented
//////////////////////////////////////////////////////////////////////////////////////////
log output as following:
Make target: wwd.ping-BCM943362WCD4-SPI-FreeRTOS-LwIP-SPI download run
and
Make target: wwd.canned_send-BCM943362WCD4-NoOS-NoNS-SPI-debug no_dct download run
2015-06-04 Platform BCM943362WCD4 initialised
Starting Wiced v3.1.2
Into wwd_bus_init()
______ Finish wwd_bus_init()
______ Set Turn off SDPCM TX Glomming
______ Set Turn APSTA on
______ Set country command
______ Set event mask
______ Set WLC_UP
______ Set WLC_SET_GMODE
______ End wwd_management_wifi_on()
____ Get mac_address
Joining : LOVE999-WR-4
______ Set Wireless Security Type
______ Set supplicant variable
______ Set EAPOL version
______ Set WPA Key
______ Set infrastructure mode
______ Set authentication type
______ Set WPA authentication mode
______ Set WLC_SET_SSID
______ Into Get join_sema
______ Set join_sema +1
______ Exit Get join_sema
wwd_wifi_is_ready_to_transceive OKSuccessfully joined : LOVE999-WR-4
Sending ARP request
Received a ARP bag
will Sending...
Received a ARP bag
will Sending...
will Sending...
Received a ARP bag
will Sending...
will Sending...
will Sending...
////////////////////////////////////////////////////
Power off, after 5 seconds, power on:
2015-06-04 Platform BCM943362WCD4 initialised
Starting Wiced v3.1.2
Into wwd_bus_init()
______ Finish wwd_bus_init()
______ Set Turn off SDPCM TX Glomming
______ Set Turn APSTA on
______ Set country command