Hot!FreeRTOS question for WILC1000/WINC1500 driver

Author
weehau
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/03/28 02:10:50
  • Location: 0
  • Status: offline
2019/01/18 07:53:10 (permalink)
0

FreeRTOS question for WILC1000/WINC1500 driver

Hi guys,
 
I have submitted a support ticket to microchip for my questions but didn't get any reply. So i will ask here and hopefully someone is kind enough to answer me.
 
This is regarding using WILC1000/WINC1500 wifi driver in Microchip Harmony for PIC32MZ. As i was told the wifi driver will only work with FreeRTOS and not baremetal system.
 
So my questions to microchip were:
1. What's the actual reason to use freeRTOS for wifi driver? There must be a specific reason why it must work with FreeRTOS and not baremetal...
2. In the web_server_nvm_mpfs (pic32_eth_wifi_web_server.X) demonstration, i have seen it uses APP_OSAL_MUTEX_LOCK(); and APP_OSAL_MUTEX_UNLOCK() in app_wifi.c.
 APP_OSAL_MUTEX_LOCK();
 /*
  * If the IP address of an interface has changed,
  * display the new value on console.
  */
 for (i = 0; i < nNets; ++i) {
  IPV4_ADDR ipAddr;
  TCPIP_NET_HANDLE netH = TCPIP_STACK_IndexToNet(i);
  ipAddr.Val = TCPIP_STACK_NetAddress(netH);
  if (dwLastIP[i].Val != ipAddr.Val) {
   dwLastIP[i].Val = ipAddr.Val;
   if (ipAddr.Val != 0) {
    SYS_CONSOLE_PRINT("%s IPv4 Address: %d.%d.%d.%d \r\n", TCPIP_STACK_NetNameGet(netH),
     ipAddr.v[0], ipAddr.v[1], ipAddr.v[2], ipAddr.v[3]);
    *ipWait = 0;
   }
  }
 }

 if (SYS_TMR_TickCountGet() - startTick >= SYS_TMR_TickCounterFrequencyGet() / 2ul) {
  if (*ipWait && ++*ipWait > APP_WIFI_DHCP_WAIT_THRESHOLD) {
   *ipWait = 0;
   if (s_app_get_param.conn.status == IWPRIV_CONNECTION_SUCCESSFUL)
    SYS_CONSOLE_MESSAGE("\r\nFailed to obtain an IP address from DHCP server\r\n"\
     "If WEP security is used, double-check if the key is valid\r\n");
  }
  startTick = SYS_TMR_TickCountGet();
 }
 APP_OSAL_MUTEX_UNLOCK();

i don't really see any reason of doing that? There isn't any part which requires control access to a resource that is shared between two or more task? 
3. As I was told, there is no onboard tcpip stack on wilc1000. May i know what is the wilc1000_fw_update.c function as? Why do we need to update firmware for wilc1000 and how does it work?   
 
I hope someone who has experience and knowledge in this area can shed some light on this. Thank you for your precious time to read and comment.  
post edited by weehau - 2019/01/18 07:54:16
#1

2 Replies Related Threads

    aschen0866
    Super Member
    • Total Posts : 4396
    • Reward points : 0
    • Joined: 2006/01/08 22:18:32
    • Location: San Diego
    • Status: offline
    Re: FreeRTOS question for WILC1000/WINC1500 driver 2019/01/18 11:41:33 (permalink)
    0
    weehau
    ... the wifi driver will only work with FreeRTOS and not baremetal system...

    That's nonsense.
    - Start by reading ATWINC1500 Wi-Fi Network Controller - Software Design Guide
    - Download and install Atmel ASF and Atmel Studio 7.
    - Pick any WINC1500 example project, for example, the Simple TCP Client Example, then the host driver can be found at ..\WINC1500_SIMPLE_TCP_CLIENT_EXAMPLE1\WINC1500_SIMPLE_TCP_CLIENT_EXAMPLE1\src\ASF\common\components\wifi\winc1500\host_drv
    - What you need to change for PIC are in the <bsp> and <bus_wrapper> folders
    #2
    friesen
    Super Member
    • Total Posts : 2029
    • Reward points : 0
    • Joined: 2008/05/08 05:23:35
    • Location: Indiana, USA
    • Status: offline
    Re: FreeRTOS question for WILC1000/WINC1500 driver 2019/01/21 13:17:13 (permalink)
    0
    It probably has more to do with the driver interaction with Harmony that requires FreeRTOS.
     
    The asf driver isn't that complex, it would be a better starting point for bare metal.  See the amazon aws freertos demo for some fixes though.  Also, the latest 4.4.2 firmware is definitely improved over whatever harmony has.
     
    If you can hack freertos, freertos + tcp is pretty decent.  Berkeley compatible sockets open up a lot of existing code for use.
     
     

    Erik Friesen
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5