Skip to content

Commit

Permalink
Fix #21, Add MM_SegmentBreak to MM_FillMem()
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Mar 14, 2023
1 parent b824250 commit 074abd2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fsw/inc/mm_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @file
* Specification for the CFS Memory Manger event identifers.
* Specification for the CFS Memory Manger event identifiers.
*/
#ifndef MM_EVENTS_H
#define MM_EVENTS_H
Expand Down Expand Up @@ -560,7 +560,7 @@
*
* \par Cause:
*
* This event message is issued when an symbol lookup command has been
* This event message is issued when a symbol lookup command has been
* successfully executed.
*/
#define MM_SYM_LOOKUP_INF_EID 45
Expand Down
4 changes: 2 additions & 2 deletions fsw/src/mm_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ bool MM_SymTblToFileCmd(const CFE_SB_Buffer_t *msg);
* \brief Write-enable EEPROM command
*
* \par Description
* Processes a EEPROM write enable ground command which calls
* Processes an EEPROM write enable ground command which calls
* the #CFE_PSP_EepromWriteEnable cFE function using the specified
* bank number.
*
Expand All @@ -230,7 +230,7 @@ bool MM_EepromWriteEnaCmd(const CFE_SB_Buffer_t *msg);
* \brief Write-disable EEPROM command
*
* \par Description
* Processes a EEPROM write disable ground command which calls
* Processes an EEPROM write disable ground command which calls
* the #CFE_PSP_EepromWriteDisable cFE function using the specified
* bank number.
*
Expand Down
6 changes: 6 additions & 0 deletions fsw/src/mm_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,12 @@ bool MM_FillMem(cpuaddr DestAddress, const MM_FillMemCmd_t *CmdPtr)
TargetPointer += SegmentSize;
BytesProcessed += SegmentSize;
BytesRemaining -= SegmentSize;

/* Prevent CPU hogging between load segments */
if (BytesRemaining != 0)
{
MM_SegmentBreak();
}
}

/* Stop EEPROM performance monitor */
Expand Down

0 comments on commit 074abd2

Please sign in to comment.