Skip to content

Commit 1688592

Browse files
author
EricB-ADI
committed
Revert "fix(Examples): Fix RF Test RTOS Scheduling Bug (#1011)"
This reverts commit 323668c.
1 parent 28f410c commit 1688592

File tree

3 files changed

+21
-45
lines changed
  • Examples
    • MAX32655/Bluetooth/RF_Test
    • MAX32665/Bluetooth/RF_Test
    • MAX32690/Bluetooth/RF_Test

3 files changed

+21
-45
lines changed

Examples/MAX32655/Bluetooth/RF_Test/main.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ uint8_t processEscSequence(uint8_t *seq)
243243
*
244244
* \brief adds latest command to command history buffer
245245
*
246-
* \param q pointer to the circular buffer holding command history
247-
* \param cmd pointer to the command string to be added
246+
* \param q pointer to the circular buffer holding command history
247+
* \param cmd pointer to the command string to be added
248248
*
249249
* \return None.
250250
*/
@@ -271,9 +271,9 @@ void cmdHistoryAdd(queue_t *q, const uint8_t *cmd)
271271
* \fn updateQueuePointer.
272272
*
273273
* \brief Updates an internal marker pointing to historical command to be printed, based on up/down arrow
274-
*
275-
* \param q pointer to the circular buffer holding command history
276-
*
274+
*
275+
* \param q pointer to the circular buffer holding command history
276+
*
277277
* \param upArrow flag used to upated the queuePoniter delimiting which command to print
278278
*
279279
* \return None.
@@ -393,9 +393,9 @@ void prompt(void)
393393
* \fn printHint
394394
*
395395
* \brief Prints the help string of any command matching the current inputbuffer
396-
*
396+
*
397397
* \param buff pointer to the inputbuffer
398-
*
398+
*
399399
* \return None.
400400
*/
401401
/*************************************************************************************************/
@@ -694,25 +694,17 @@ void txTestTask(void *pvParameters)
694694
snprintf(str, sizeof(str), "%s%s", str, (const char *)getPhyStr(phy));
695695
APP_TRACE_INFO1("%s", str);
696696

697-
//Prevent FreeRTOS from context switching until the LL is finished
698-
vTaskSuspendAll();
699-
700697
/* stat test */
701698
if (testConfig.testType == BLE_TX_TEST) {
702699
res = LlEnhancedTxTest(testConfig.channel, packetLen, packetType, phy, 0);
703700
} else {
704701
res = LlEnhancedRxTest(testConfig.channel, phy, 0, 0);
705702
}
706-
xTaskResumeAll(); //Restore scheduler
707-
708703
APP_TRACE_INFO2("result = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
709704
/* if duration value was given then let the test run that amount of time and end */
710705
if (testConfig.duration_ms) {
711706
vTaskDelay(testConfig.duration_ms);
712-
//Prevent FreeRTOS from context switching until the LL is finished
713-
vTaskSuspendAll();
714707
LlEndTest(NULL);
715-
xTaskResumeAll(); //Restore scheduler
716708
xSemaphoreGive(rfTestMutex);
717709
}
718710
pausePrompt = false;

Examples/MAX32665/Bluetooth/RF_Test/main.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ uint8_t processEscSequence(uint8_t *seq)
246246
*
247247
* \brief adds latest command to command history buffer
248248
*
249-
* \param q pointer to the circular buffer holding command history
250-
* \param cmd pointer to the command string to be added
249+
* \param q pointer to the circular buffer holding command history
250+
* \param cmd pointer to the command string to be added
251251
*
252252
* \return None.
253253
*/
@@ -274,9 +274,9 @@ void cmdHistoryAdd(queue_t *q, const uint8_t *cmd)
274274
* \fn updateQueuePointer.
275275
*
276276
* \brief Updates an internal marker pointing to historical command to be printed, based on up/down arrow
277-
*
278-
* \param q pointer to the circular buffer holding command history
279-
*
277+
*
278+
* \param q pointer to the circular buffer holding command history
279+
*
280280
* \param upArrow flag used to upated the queuePoniter delimiting which command to print
281281
*
282282
* \return None.
@@ -396,9 +396,9 @@ void prompt(void)
396396
* \fn printHint
397397
*
398398
* \brief Prints the help string of any command matching the current inputbuffer
399-
*
399+
*
400400
* \param buff pointer to the inputbuffer
401-
*
401+
*
402402
* \return None.
403403
*/
404404
/*************************************************************************************************/
@@ -695,25 +695,17 @@ void txTestTask(void *pvParameters)
695695
snprintf(str, sizeof(str), "%s%s", str, (const char *)getPhyStr(phy));
696696
APP_TRACE_INFO1("%s", str);
697697

698-
//Prevent FreeRTOS from context switching until the LL is finished
699-
vTaskSuspendAll();
700-
701698
/* stat test */
702699
if (testConfig.testType == BLE_TX_TEST) {
703700
res = LlEnhancedTxTest(testConfig.channel, packetLen, packetType, phy, 0);
704701
} else {
705702
res = LlEnhancedRxTest(testConfig.channel, phy, 0, 0);
706703
}
707-
xTaskResumeAll(); //Restore scheduler
708-
709704
APP_TRACE_INFO2("result = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
710705
/* if duration value was given then let the test run that amount of time and end */
711706
if (testConfig.duration_ms) {
712707
vTaskDelay(testConfig.duration_ms);
713-
//Prevent FreeRTOS from context switching until the LL is finished
714-
vTaskSuspendAll();
715708
LlEndTest(NULL);
716-
xTaskResumeAll(); //Restore scheduler
717709
xSemaphoreGive(rfTestMutex);
718710
}
719711
pausePrompt = false;

Examples/MAX32690/Bluetooth/RF_Test/main.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ uint8_t processEscSequence(uint8_t *seq)
246246
*
247247
* \brief adds latest command to command history buffer
248248
*
249-
* \param q pointer to the circular buffer holding command history
250-
* \param cmd pointer to the command string to be added
249+
* \param q pointer to the circular buffer holding command history
250+
* \param cmd pointer to the command string to be added
251251
*
252252
* \return None.
253253
*/
@@ -274,9 +274,9 @@ void cmdHistoryAdd(queue_t *q, const uint8_t *cmd)
274274
* \fn updateQueuePointer.
275275
*
276276
* \brief Updates an internal marker pointing to historical command to be printed, based on up/down arrow
277-
*
278-
* \param q pointer to the circular buffer holding command history
279-
*
277+
*
278+
* \param q pointer to the circular buffer holding command history
279+
*
280280
* \param upArrow flag used to upated the queuePoniter delimiting which command to print
281281
*
282282
* \return None.
@@ -396,9 +396,9 @@ void prompt(void)
396396
* \fn printHint
397397
*
398398
* \brief Prints the help string of any command matching the current inputbuffer
399-
*
399+
*
400400
* \param buff pointer to the inputbuffer
401-
*
401+
*
402402
* \return None.
403403
*/
404404
/*************************************************************************************************/
@@ -695,25 +695,17 @@ void txTestTask(void *pvParameters)
695695
snprintf(str, sizeof(str), "%s%s", str, (const char *)getPhyStr(phy));
696696
APP_TRACE_INFO1("%s", str);
697697

698-
//Prevent FreeRTOS from context switching until the LL is finished
699-
vTaskSuspendAll();
700-
701698
/* stat test */
702699
if (testConfig.testType == BLE_TX_TEST) {
703700
res = LlEnhancedTxTest(testConfig.channel, packetLen, packetType, phy, 0);
704701
} else {
705702
res = LlEnhancedRxTest(testConfig.channel, phy, 0, 0);
706703
}
707-
xTaskResumeAll(); //Restore scheduler
708-
709704
APP_TRACE_INFO2("result = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
710705
/* if duration value was given then let the test run that amount of time and end */
711706
if (testConfig.duration_ms) {
712707
vTaskDelay(testConfig.duration_ms);
713-
//Prevent FreeRTOS from context switching until the LL is finished
714-
vTaskSuspendAll();
715708
LlEndTest(NULL);
716-
xTaskResumeAll(); //Restore scheduler
717709
xSemaphoreGive(rfTestMutex);
718710
}
719711
pausePrompt = false;

0 commit comments

Comments
 (0)