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 13, 2023
1 parent 2efdc96 commit ad520dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fsw/src/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
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 ad520dd

Please # to comment.