Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dw1000_driver_freertos
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
Colin Wulf
dw1000_driver_freertos
Commits
9e4ba387
Commit
9e4ba387
authored
9 years ago
by
Georg von Zengen
Browse files
Options
Downloads
Patches
Plain Diff
dw1000: enter rx mode after tx ready
parent
30518228
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Src/dw1000.c
+2
-1
2 additions, 1 deletion
Src/dw1000.c
Src/dw1000_hal.c
+4
-0
4 additions, 0 deletions
Src/dw1000_hal.c
with
6 additions
and
1 deletion
Src/dw1000.c
+
2
−
1
View file @
9e4ba387
...
...
@@ -38,6 +38,7 @@ int dw1000_sendFrame(uint8_t *payload, uint16_t len) {
// set up a complete config for the register
// the bits are cleared automatically after the transmission and need to be set up for the next transmission again!
uint32_t
sys_ctrl
=
0
;
dw1000Hal_readRegister
(
SYS_CTRL_ID
,
&
sys_ctrl
,
4
);
sys_ctrl
|=
SYS_CTRL_TRXOFF
;
// Immediately cancel all RX and TX operations, bring radio to IDLE state
dw1000Hal_writeRegister
(
SYS_CTRL_ID
,
&
sys_ctrl
,
4
);
sys_ctrl
=
0
;
...
...
@@ -47,7 +48,7 @@ int dw1000_sendFrame(uint8_t *payload, uint16_t len) {
// TXDLYS not set -> no delayed transmission
// CANSFCS not set (only useful when starting transmission before uploading payload)
// TRXOFF not set (this would turn off the transmitter immediately)
sys_ctrl
|=
SYS_CTRL_WAIT4RESP
;
// turn on receiver after transmission to receive a response (ACK)
//
sys_ctrl |= SYS_CTRL_WAIT4RESP; // turn on receiver after transmission to receive a response (ACK)
// RXENAB not set (this would enter receive mode)
// RXDLYE not set (used for delayed reception)
// HRBPT not set (chooses receive buffer)
...
...
This diff is collapsed.
Click to expand it.
Src/dw1000_hal.c
+
4
−
0
View file @
9e4ba387
...
...
@@ -334,6 +334,10 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
if
(
event
&
SYS_STATUS_RXDFR
){
// Frame sent
event_clear
|=
SYS_STATUS_RXDFR
;
//clear interrupt
uint32_t
sys_ctrl
=
0
;
dw1000Hal_readRegisterFromIsr
(
SYS_CTRL_ID
,
(
uint8_t
*
)
&
sys_ctrl
,
SYS_CTRL_LEN
);
// switch to rx mode
sys_ctrl
|=
SYS_CTRL_RXENAB
;
dw1000Hal_writeRegisterFromIsr
(
SYS_CTRL_ID
,
(
uint8_t
*
)
&
sys_ctrl
,
SYS_CTRL_LEN
);
}
if
(
event
&
SYS_STATUS_CLKPLL_LL
){
// Frame sent
...
...
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