Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
darwin_stm32_fw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
humanoides
darwin
darwin_stm32_fw
Commits
94931c49
Commit
94931c49
authored
5 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Solved a bug in the EEPROM module.
parent
5c65e0a5
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+2
-2
2 additions, 2 deletions
Makefile
src/eeprom.c
+32
-11
32 additions, 11 deletions
src/eeprom.c
with
34 additions
and
13 deletions
Makefile
+
2
−
2
View file @
94931c49
# setup
# setup
# modified by zerom for WinARM 8/2010
# modified by zerom for WinARM 8/2010
STM32_HAL_PATH
=
$(
HOME
)
/humanoids/stm32_hal
STM32_HAL_PATH
=
$(
HOME
)
/humanoid
es/tool
s/stm32_hal
STM32_LIBRARIES_PATH
=
$(
HOME
)
/humanoids/stm32_libraries
STM32_LIBRARIES_PATH
=
$(
HOME
)
/humanoid
es/tool
s/stm32_libraries
PROJECT_NAME
=
darwin_firmware
PROJECT_NAME
=
darwin_firmware
#TARGET_FILES=$(wildcard src/*.c)
#TARGET_FILES=$(wildcard src/*.c)
...
...
This diff is collapsed.
Click to expand it.
src/eeprom.c
+
32
−
11
View file @
94931c49
...
@@ -331,22 +331,43 @@ uint16_t EE_VerifyPageFullyErased(uint32_t Address)
...
@@ -331,22 +331,43 @@ uint16_t EE_VerifyPageFullyErased(uint32_t Address)
uint16_t
addressvalue
=
0x5555
;
uint16_t
addressvalue
=
0x5555
;
/* Check each active page address starting from end */
/* Check each active page address starting from end */
while
(
Address
<=
PAGE0_
END
_ADDRESS
)
if
(
Address
==
PAGE0_
BASE
_ADDRESS
)
{
{
/* Get the current location content to be compared with virtual address */
while
(
Address
<=
PAGE0_END_ADDRESS
)
addressvalue
=
(
*
(
__IO
uint16_t
*
)
Address
);
{
/* Get the current location content to be compared with virtual address */
addressvalue
=
(
*
(
__IO
uint16_t
*
)
Address
);
/* Compare the read address with the virtual address */
/* Compare the read address with the virtual address */
if
(
addressvalue
!=
ERASED
)
if
(
addressvalue
!=
ERASED
)
{
/* In case variable value is read, reset readstatus flag */
readstatus
=
0
;
break
;
}
/* Next address location */
Address
=
Address
+
4
;
}
}
else
{
while
(
Address
<=
PAGE1_END_ADDRESS
)
{
{
/* Get the current location content to be compared with virtual address */
/* In case variable value is read, reset readstatus flag */
addressvalue
=
(
*
(
__IO
uint16_t
*
)
Address
);
readstatus
=
0
;
break
;
/* Compare the read address with the virtual address */
if
(
addressvalue
!=
ERASED
)
{
/* In case variable value is read, reset readstatus flag */
readstatus
=
0
;
break
;
}
/* Next address location */
Address
=
Address
+
4
;
}
}
/* Next address location */
Address
=
Address
+
4
;
}
}
/* Return readstatus value: (0: Page not erased, 1: Page erased) */
/* Return readstatus value: (0: Page not erased, 1: Page erased) */
...
...
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