Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Core
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
Model registry
Operate
Environments
Monitor
Incidents
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
OwnTech
Power API
Core
Commits
9c07fca9
Commit
9c07fca9
authored
1 year ago
by
Emmanuel Roux-Palomo
Committed by
Clément Foucher
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
ADC trigger fix
Fix ADC triggers from HRTIM.
parent
a7ece81a
No related branches found
No related tags found
1 merge request
!57
ADC trigger fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zephyr/modules/owntech_hrtim_driver/zephyr/src/hrtim_common.c
+5
-4
5 additions, 4 deletions
...yr/modules/owntech_hrtim_driver/zephyr/src/hrtim_common.c
with
5 additions
and
4 deletions
zephyr/modules/owntech_hrtim_driver/zephyr/src/hrtim_common.c
+
5
−
4
View file @
9c07fca9
...
...
@@ -24,6 +24,7 @@
* @author Luiz Villa <luiz.villa@laas.fr>
* @author Ayoub Farah Hassan <ayoub.farah-hassan@laas.fr>
* @author Thomas Walter <thomas.walter@laas.fr>
* @author Emmanuel Roux--Palomo <emmanuel.roux-palomo@laas.fr>
*/
#include
<stm32_ll_hrtim.h>
...
...
@@ -61,16 +62,16 @@ void _hrtim_init_events_center_aligned(hrtim_tu_t leg1_tu, hrtim_tu_t leg2_tu)
LL_HRTIM_TIM_SetADCRollOverMode
(
HRTIM1
,
LL_HRTIM_TIMER_B
,
LL_HRTIM_ROLLOVER_MODE_PER
);
// setting adc trigger
hrtim_adc_trigger_en
(
1
,
1
,
LL_HRTIM_ADCTRIG_SRC13_TIMA
CMP3
);
hrtim_adc_trigger_en
(
3
,
2
,
LL_HRTIM_ADCTRIG_SRC13_TIMB
CMP4
);
hrtim_adc_trigger_en
(
1
,
1
,
LL_HRTIM_ADCTRIG_SRC13_TIMA
PER
);
hrtim_adc_trigger_en
(
3
,
2
,
LL_HRTIM_ADCTRIG_SRC13_TIMB
PER
);
}
else
if
(
leg1_tu
==
TIMA
&&
leg2_tu
==
TIMC
){
// setting the adc roll-over mode on period event
LL_HRTIM_TIM_SetADCRollOverMode
(
HRTIM1
,
LL_HRTIM_TIMER_A
,
LL_HRTIM_ROLLOVER_MODE_PER
);
LL_HRTIM_TIM_SetADCRollOverMode
(
HRTIM1
,
LL_HRTIM_TIMER_C
,
LL_HRTIM_ROLLOVER_MODE_PER
);
// setting adc trigger
hrtim_adc_trigger_en
(
3
,
1
,
LL_HRTIM_ADCTRIG_SRC13_TIMA
CMP3
);
hrtim_adc_trigger_en
(
1
,
3
,
LL_HRTIM_ADCTRIG_SRC13_TIMC
CMP4
);
hrtim_adc_trigger_en
(
3
,
1
,
LL_HRTIM_ADCTRIG_SRC13_TIMA
PER
);
hrtim_adc_trigger_en
(
1
,
3
,
LL_HRTIM_ADCTRIG_SRC13_TIMC
PER
);
}
}
...
...
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