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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
firmware
Commits
5fb2441a
"src/git@git.flow3r.garden:card10/openocd.git" did not exist on "e2b6de3d66bae70cb08fea17f5b66ee875dbb636"
Commit
5fb2441a
authored
5 years ago
by
ch3
Browse files
Options
Downloads
Patches
Plain Diff
feat(epicardium api): Set GPIO pins for evaluating timings
parent
e9ca7b4d
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
epicardium/api/caller.c
+2
-0
2 additions, 0 deletions
epicardium/api/caller.c
epicardium/api/common.h
+5
-0
5 additions, 0 deletions
epicardium/api/common.h
epicardium/api/dispatcher.c
+2
-0
2 additions, 0 deletions
epicardium/api/dispatcher.c
epicardium/support.c
+1
-0
1 addition, 0 deletions
epicardium/support.c
with
10 additions
and
0 deletions
epicardium/api/caller.c
+
2
−
0
View file @
5fb2441a
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
void
*
_api_call_start
(
api_id_t
id
,
uintptr_t
size
)
void
*
_api_call_start
(
api_id_t
id
,
uintptr_t
size
)
{
{
GPIO_OutSet
(
&
debug_pin_1
);
while
(
SEMA_GetSema
(
_API_SEMAPHORE
)
==
E_BUSY
)
{
while
(
SEMA_GetSema
(
_API_SEMAPHORE
)
==
E_BUSY
)
{
}
}
...
@@ -32,6 +33,7 @@ void *_api_call_transact(void *buffer)
...
@@ -32,6 +33,7 @@ void *_api_call_transact(void *buffer)
API_CALL_MEM
->
call_flag
=
_API_FLAG_CALLING
;
API_CALL_MEM
->
call_flag
=
_API_FLAG_CALLING
;
SEMA_FreeSema
(
_API_SEMAPHORE
);
SEMA_FreeSema
(
_API_SEMAPHORE
);
GPIO_OutSet
(
&
debug_pin_0
);
/* Notify the dispather of the new call */
/* Notify the dispather of the new call */
__SEV
();
__SEV
();
__WFE
();
__WFE
();
...
...
This diff is collapsed.
Click to expand it.
epicardium/api/common.h
+
5
−
0
View file @
5fb2441a
#include
<stdint.h>
#include
<stdint.h>
#include
<stdbool.h>
#include
<stdbool.h>
#include
"gpio.h"
/*
/*
* Semaphore used for API synchronization.
* Semaphore used for API synchronization.
...
@@ -7,6 +8,10 @@
...
@@ -7,6 +8,10 @@
*/
*/
#define _API_SEMAPHORE 0
#define _API_SEMAPHORE 0
static
const
gpio_cfg_t
debug_pin_0
=
{
PORT_0
,
PIN_22
,
GPIO_FUNC_OUT
,
GPIO_PAD_NONE
};
static
const
gpio_cfg_t
debug_pin_1
=
{
PORT_0
,
PIN_21
,
GPIO_FUNC_OUT
,
GPIO_PAD_NONE
};
/* Type of API IDs */
/* Type of API IDs */
typedef
uint32_t
api_id_t
;
typedef
uint32_t
api_id_t
;
...
...
This diff is collapsed.
Click to expand it.
epicardium/api/dispatcher.c
+
2
−
0
View file @
5fb2441a
...
@@ -55,6 +55,8 @@ api_id_t api_dispatcher_exec()
...
@@ -55,6 +55,8 @@ api_id_t api_dispatcher_exec()
return
0
;
return
0
;
}
}
GPIO_OutClr
(
&
debug_pin_1
);
api_id_t
id
=
API_CALL_MEM
->
id
;
api_id_t
id
=
API_CALL_MEM
->
id
;
__api_dispatch_call
(
id
,
API_CALL_MEM
->
buffer
);
__api_dispatch_call
(
id
,
API_CALL_MEM
->
buffer
);
API_CALL_MEM
->
call_flag
=
_API_FLAG_RETURNED
;
API_CALL_MEM
->
call_flag
=
_API_FLAG_RETURNED
;
...
...
This diff is collapsed.
Click to expand it.
epicardium/support.c
+
1
−
0
View file @
5fb2441a
...
@@ -29,6 +29,7 @@ void pre_idle_sleep(TickType_t xExpectedIdleTime)
...
@@ -29,6 +29,7 @@ void pre_idle_sleep(TickType_t xExpectedIdleTime)
__asm
volatile
(
"dsb"
:::
"memory"
);
__asm
volatile
(
"dsb"
:::
"memory"
);
__asm
volatile
(
"wfe"
);
__asm
volatile
(
"wfe"
);
__asm
volatile
(
"isb"
);
__asm
volatile
(
"isb"
);
GPIO_OutClr
(
&
debug_pin_0
);
}
}
}
}
...
...
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