Hi all,
I have just installed and updated CW 10.2 on my XP 32bit VM, installed and running
Downloaded MQX 3.7 and the 3.7 gain span patch
Rebuilt the debug version of tower PSP, BSP and RTCS
Built the debug version of the tower gttpsrv_twrmcf52259
Ran on the tower and get the following consol output (mind you I moved the default IO to ttya, but this should not matter).
---------------------------------------------------------CONSOL---------------------------------------------------------
adc device opened
adc: device opened
SPI clock mode:0
SPI baud rate:1000000 Hz
GPIO ISR attached...
SPI init success
Starting GS SPI link synchronization..
GS SPI link up.
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
NOTE: THIS GOES ON FOR EVER
---------------------------------------------------------CONSOL---------------------------------------------------------
Not sure if it matters, but if I ctrl+click "ENET_initialize" in the demo code, it wont follow the link back to RTCS/BSP etc... Wish I could fix this as debugging is a total nightmare, I cant see the problem why it cant follow, some path or something is wrong somehwere. It also couldnt find defines in the user_config.h for MQX and was dropping errors about "BSP_DEFAULT_IO_CHANNEL_DEFINED" which I defined in the user_config.h... I would think that this would all work 'out of the box'. Seems we will have problems with Demo's not working out of the box, paths breaking and projects just generally having problems.
Any idea's? How do I debug and track down problems with the demo?
Ive done a little more testing on this and found the following:
I added this code
void gs_process_cmd_resp(uint_8 ch, GS_CONTEXT_STRUCT_PTR priv) { uint_8* cmdRspBuff = priv->rxrsp_buf; uint_8 i=0; priv->rxrsp_buf[priv->rxrsp_len] = ch; priv->rxrsp_len++; priv->rxrsp_buf[priv->rxrsp_len] = '\0';#warning TEST if(ch != 0) printf("ch = %c \"%02X\"\n", ch, ch); //Test code if(ch == '\n') {...
The output now looks like this:
------------------------------CONSOL-----------------------------------------
adc: device opened
RTCS Created
ENET_get_mac_address
SPI clock mode:0
SPI baud rate:1000000 Hz
GPIO ISR attached...
SPI init success
Starting GS SPI link synchronization..
GS SPI link up.
ch = ¿ "BF"
ch = ¿ "BF"
ch = ¿ "BF"
ch = ¿ "BF"
ch = ¿ "BF"
ch = ¿ "BF"
//.. continues as before ..
------------------------------CONSOL-----------------------------------------
I have also looked at the SPI interface, and while it works, its just doing the same thing over and over again, but CLK, SDO, SDI and CS all appear to work as I would expect, just the data does not appear to be usable as it repeats itself over and over with identical chars
There is no real usable debug information or trouble shooting, I have no idea what to do, the example should work out of the box.
I just increased the debug level for the GS and got the following, is this the correct sync data??
adc: device opened
RTCS Created
ENET_get_mac_address
SPI clock mode:0
SPI baud rate:1000000 Hz
GPIO ISR attached...
SPI init success
Starting GS SPI link synchronization..
-bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--86--85--86--85--aa--b7--a2--bc--b8--b2--b1--ba--b2--b2--90--ab--b0--b9--b6--90--a1--b7--b7--ba--94--a8--b7--b9--b9--b4--b1--b6--bc--90--a6--b7--bb--90--a1--b0--ba--ba--b2--b9--bc--94--86--85--86--85--f5--f5--f5--f5-GS SPI link up.
Is there a patch for MQX3.8?
Ok, so I ported the driver to MQX3.8 manually using the GS driver guide (which has about 4 mistakes / missing info).
Here is the terminal output from the ported code:
SPI clock mode:0
SPI baud rate:1000000 Hz
GPIO ISR attached...
SPI init success
Starting GS SPI link synchronization..
-bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--86--85--86--85--aa--b7--a2--bc--b8--b2--b1--ba--b2--b2--90--ab--b0--b9--b6--90--a1--b7--b7--ba--94--a8--b7--b9--b9--b4--b1--b6--bc--90--a6--b7--bb--90--a1--b0--ba--ba--b2--b9--bc--94--86--85--86--85--f5--f5--f5--f5-GS SPI link up.
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
This continues on for ever
Ok, so fresh built machine, fresh install of CW10.2, MQX3.7, MQX3.7 GS Patch, LAB guide followed to the letter, still the same result : (
Guess its time to buy a new dev kit.
Ok, so I just got a brand new TWR WIFI GS1011 board, TWR-SER, and TWR52259, unpacked it, followed the simple lab... and... the result is identical... It is like the software in the GS1011 is not compatible with the drivers in MQX, or, there is a step missing in the LAB.
Hi,
Its SPI link sync up issue during boot up. Host is recieving invalid data and fails to parse the incoming data from WiFi Node resulting in buffer ovefflow error.
Note: If WiFi node is ready host MCU should get 0xF5 pattern.
Could you please make following changes(increase delay before calling gs_init() function ) and try it out. If you need any further help please do revert back.
/*-------------------------------------------------
File Name : gs\gs_init.c
Function Name : Gs_initialize()
*------------------------------------------------*/
Code snippet:
Gs_initialize()
{
:
:
:
:
// _time_delay(100);
/* Note: You can optimise this delay parameter */
_time_delay(2000); /* Increase the wait period, so that WiFi node is fully ready - its work around solution. */
/* initialize all the default parameters and reset the HW */
error = gs_init(priv);
:
:
}
/*--------------------------*/
Hi,
I made the change and get identical results.
What can I try next?
Here is the terminal output.
I even tried stopping for 10 seconds.
adc device opened
adc: device opened
RTCS Created
ENET_get_mac_address
SPI clock mode:0
SPI baud rate:1000000 Hz
GPIO ISR attached...
SPI init success
Starting GS SPI link synchronization..
-bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--bf--86--85--86--85--aa--b7--a2--bc--b8--b2--b1--ba--b2--b2--90--ab--b0--b9--b6--90--a1--b7--b7--ba--94--a8--b7--b9--b9--b4--b1--b6--bc--90--a6--b7--bb--90--a1--b0--ba--ba--b2--b9--bc--94--86--85--86--85--f5--f5--f5--f5-GS SPI link up.
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
ERROR: GS response buffer overflow
Make sure all jumpers are in correct position.
Is it possible to send picture of tower board showing jumper connections?
Please give following details:
1. MQX release version (download path)
2. WiFi patch details (download path)
3. Tower board version (GS1011 )
Looks like some issue with SPI interface.
You can try UART interface and make sure that its loaded with correct software.
To select UART interface do following changes in MQX driver:
1. DIsable following macro and rebuild
FIle Name : Gs_prv.h
Macro Name : GS_SPI_PORT_ENABLE
Code snippet:
// #define GS_SPI_PORT_ENABLE
2. Keep jumper position to select UART interface.
Please give following details:
1. MQX release version (download path) Current MQX3.7 (from this website)
2. WiFi patch details (download path) Current MQX3.7 Patch (from this website)
3. Tower board version (GS1011 ) (SCH-26794 REV B)
As for the picture, both boards are left exactly how they were unpacked, and, myself and another engineer have both independatntly varified that the jumpers are as per the quick start guide
I will try serial again tomorrow, I did try this and had worse problems (wouldnt communicate). But this has not been tried on the brand new untouched development kit.
Ok, so I just changed the jumper on the GS1011 module to serial, compiled with
//#define GS_SPI_PORT_ENABLE
And here is the console output
adc device opened
adc: device opened
RTCS Created
ENET_get_mac_address
GainSpan Chip Version 1011. MAC 0:1d:c9:12:b3:b4
GainSpan Wifi Driver Version : 2.0.1
GainSpan IP2WIFI Compatible Version : 2.3.1
ENET_initialize, ERROR = 0
GS Assocciation starts.
preparing http server ...
run http server..
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
GS Assocciation starts.
Hi CarlFST60L,
My name is Thomas.
I'm at the same point as you are / were. UART mode works fine, SPI mode is creating the well known error message.
Did you ever get you application to work in SPI mode? or are you working in UART mode now.
Thanks in advance for a short info on your status.
All the best
Thomas
Hi CarlFST60L,
I just found out, you got to make a firmware update, as it is described in the docs, to make it run in SPI mode.
Yuchuh, its running!!
All the best
Thomas
When you say updated the firmware, what firmware are you updating to? I cannot find any documentation regarding the updating or a download that would be pertinent.
Thanks for your help
To save anyone else banging they're heads against a brick wall.
You need to log onto the the gainspan website and download the gs_flashprogram as well as the firmware binarys WFW-REL-2_0_27.bin, ip2w-2_3_1-app1.bin and ip2w-2_3_1-app2.bin
This is because the gainspan modules usually come with firmware which includes its own TCPIP stack whereas for the tower you want to be using MQXs stack which requires different firmware.
Hope that saves someone some grief!
As per your log, UART interface is working fine.
You need to configure correct SSID and security settings, then it can associate with configured AP.
Key Parameters(refer config.h file):
1. DEMOCFG_SSID
Default setting:
#define DEMOCFG_SSID "NGZG"
2. ENET_IPADDR
Default setting:
#define ENET_IPADDR IPADDR(192,168,1,4)
3. DEMOCFG_SECURITY
Default setting:
#define DEMOCFG_SECURITY "none"