Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
3446bbbb
Commit
3446bbbb
authored
4 years ago
by
rahix
Browse files
Options
Downloads
Plain Diff
Merge 'Reset the watchdog while perfoming MSC operations'
Closes
#217
See merge request
!421
parents
19e42e6b
fe36f377
No related branches found
No related tags found
1 merge request
!421
fix(usb): Reset the watchdog while perfoming MSC operations
Pipeline
#4848
passed
4 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
epicardium/modules/usb.c
+9
-0
9 additions, 0 deletions
epicardium/modules/usb.c
with
9 additions
and
0 deletions
epicardium/modules/usb.c
+
9
−
0
View file @
3446bbbb
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
#include
"mx25lba.h"
#include
"mx25lba.h"
#include
"msc.h"
#include
"msc.h"
#include
"mxc_sys.h"
#include
"wdt.h"
/* memory access callbacks for the mass storage (FLASH) device */
/* memory access callbacks for the mass storage (FLASH) device */
static
int
mscmem_init
();
static
int
mscmem_init
();
static
uint32_t
mscmem_size
(
void
);
static
uint32_t
mscmem_size
(
void
);
...
@@ -96,6 +99,9 @@ static uint32_t mscmem_size(void)
...
@@ -96,6 +99,9 @@ static uint32_t mscmem_size(void)
static
int
mscmem_read
(
uint32_t
lba
,
uint8_t
*
buffer
)
static
int
mscmem_read
(
uint32_t
lba
,
uint8_t
*
buffer
)
{
{
/* Reset the watchdog as this interrupt might be
* firing back to back for a few seconds. */
WDT_ResetTimer
(
MXC_WDT0
);
return
mx25_read
(
lba
,
buffer
);
return
mx25_read
(
lba
,
buffer
);
}
}
...
@@ -105,6 +111,9 @@ static int mscmem_write(uint32_t lba, uint8_t *buffer)
...
@@ -105,6 +111,9 @@ static int mscmem_write(uint32_t lba, uint8_t *buffer)
//bootloader_dirty();
//bootloader_dirty();
}
}
dirty
=
2
;
dirty
=
2
;
/* Reset the watchdog as this interrupt might be
* firing back to back for a few seconds. */
WDT_ResetTimer
(
MXC_WDT0
);
return
mx25_write
(
lba
,
buffer
);
return
mx25_write
(
lba
,
buffer
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment