File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 11-----------------------------------------------------------------------------------------
2+ 2024-02-04 Frank Voorburg <
[email protected] >
3+
4+ * Corrected critical section usage in combination with OSAL API calls.
5+ * Public release of version 0.9.3.
6+
7+ -----------------------------------------------------------------------------------------
8+ -----------------------------------------------------------------------------------------
292024-01-14 Frank Voorburg <
[email protected] >
310
411* Changed the default configuration of the 1.5 character timeout monitoring.
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ extern "C" {
5858#define TBX_MB_VERSION_MINOR (9U)
5959
6060/** \brief Patch number of MicroTBX-Modbus. */
61- #define TBX_MB_VERSION_PATCH (2U )
61+ #define TBX_MB_VERSION_PATCH (3U )
6262
6363
6464#ifdef __cplusplus
Original file line number Diff line number Diff line change @@ -525,11 +525,16 @@ static uint8_t TbxMbRtuTransmit(tTbxMbTp transport)
525525 */
526526 uint16_t waitTimeoutMs = (waitTimeoutTicks + 19U ) / 20U ;
527527 /* Wait for the transition from INIT to IDLE with the calculated timeout. Note
528- * that there is not need to check the return value. This would just mean that
529- * no transition to IDLE took place before the timeout. The IDLE state check if
528+ * that there is no need to check the return value. This would just mean that
529+ * no transition to IDLE took place before the timeout. The IDLE state check is
530530 * done later on in this function, so that error situation is already handled.
531+ * Make sure to briefly leave the critical section for calling TbxMbOsalSemTake().
532+ * With an RTOS this could lead to a context switch for which interrupts need to
533+ * be enabled.
531534 */
535+ TbxCriticalSectionExit ();
532536 (void )TbxMbOsalSemTake (tpCtx -> initStateExitSem , waitTimeoutMs );
537+ TbxCriticalSectionEnter ();
533538 }
534539 /* New transmissions are only possible from the IDLE state. */
535540 uint8_t okayToTransmit = TBX_FALSE ;
You can’t perform that action at this time.
0 commit comments