Applying Reset

Top  Previous  Next

Once the RST line has been properly configured, you can hardware-reset the GA1000 at any time by executing the following simple code. Note that the GA1000 has to be reset after the power up of your device. Proper hardware reset is not optional!

If your design has no GPIO line to spare, the reset signal can be derived from the combination of CS and CLK line signals (check Connecting GA1000, diagram B). When there is a dedicated RST line, this line is manipulated directly.

Notice also the while...wend loop. It is there for proper GA1000 reset after it has already been up and running. When the hardware reset is applied, the GA1000 will go offline, and the wln. object will detect this in a matter of milliseconds. Your program should not try to work with the wln. object again until the wln.enabled property goes to 0- NO in response to the hardware reset. Your code can stay and wait for this (as shown below) or rely on the on_wln_event. Once the event is triggered, you are free to repeat the whole process of bringing up Wi-Fi interface.

 

 

 '----- reset Wi-Fi module -----

 #If WLN_RESET_MODE

         'reset is controlled by the combination of CS and CLK                

         io.lineset(wln.csmap,HIGH)

         io.lineset(wln.clkmap,LOW)

         io.lineset(wln.clkmap,HIGH)

 #Else        

         'there is a dedicated reset line                

         io.num=WLN_RST

         io.state=LOW

         io.state=HIGH

 #endif

 

 'in case we called wln_init() after it has already been up and running

 While wln.enabled=YES

 Wend