You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/18 01:59:18 UTC

[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request #2707: drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c

masayuki2009 opened a new pull request #2707:
URL: https://github.com/apache/incubator-nuttx/pull/2707


   ## Summary
   
   - During stress test with spresense:wifi (non-SMP), I noticed
     sometimes ASSERT() happened in _read_data_len()
   - Actually, up_udelay(50) has been added to avoid the ASSERT
   - However, I finally noticed that it should be moved before
     calling dready()
   - Also, I cofirmed that we can reduced the time from 50 to 30
   - NOTE: we need at least 15us in my experience
   
   ## Impact
   
   - gs2200m.c only
   
   ## Testing
   
   - Tested with following configurations
   - spresense:wifi, spresense:wifi_smp, stm32f4discovery:wifi
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on a change in pull request #2707: drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c

Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #2707:
URL: https://github.com/apache/incubator-nuttx/pull/2707#discussion_r559314602



##########
File path: drivers/wireless/gs2200m.c
##########
@@ -865,19 +865,19 @@ static uint16_t _read_data_len(FAR struct gs2200m_dev_s *dev)
 
   _write_data(dev, hdr, sizeof(hdr));
 
+  /* NOTE: busy wait 30us
+   * workaround to avoid an invalid frame response
+   */
+
+  up_udelay(30);

Review comment:
       Can we use a sleep instead to not busy spin, or is this too fast?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton merged pull request #2707: drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c

Posted by GitBox <gi...@apache.org>.
btashton merged pull request #2707:
URL: https://github.com/apache/incubator-nuttx/pull/2707


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #2707: drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #2707:
URL: https://github.com/apache/incubator-nuttx/pull/2707#issuecomment-761935273


   @jerpelea 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #2707: drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on a change in pull request #2707:
URL: https://github.com/apache/incubator-nuttx/pull/2707#discussion_r559326176



##########
File path: drivers/wireless/gs2200m.c
##########
@@ -865,19 +865,19 @@ static uint16_t _read_data_len(FAR struct gs2200m_dev_s *dev)
 
   _write_data(dev, hdr, sizeof(hdr));
 
+  /* NOTE: busy wait 30us
+   * workaround to avoid an invalid frame response
+   */
+
+  up_udelay(30);

Review comment:
       >Can we use a sleep instead to not busy spin, or is this too fast?
   
   @btashton 
   Currently, Spresense uses a 10ms tick, so if we replace it with a sleep function, performance would be very bad.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org