Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MSP430FR5994 BOOSTXL-CC1120-90 Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Energy-Driven Computing
MSP430FR5994 BOOSTXL-CC1120-90 Library
Commits
6cb7d807
Commit
6cb7d807
authored
5 years ago
by
Edward Longman
Browse files
Options
Downloads
Patches
Plain Diff
Fix timer interrupt so it is not always blocking and remove UART delay
parent
2aa5fe3e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/lib/hal_mcu/hal_fr5_timer.c
+2
-2
2 additions, 2 deletions
source/lib/hal_mcu/hal_fr5_timer.c
source/test/min2.c
+5
-11
5 additions, 11 deletions
source/test/min2.c
with
7 additions
and
13 deletions
source/lib/hal_mcu/hal_fr5_timer.c
+
2
−
2
View file @
6cb7d807
...
...
@@ -290,7 +290,7 @@ unsigned int hal_timer_wait(unsigned int time) {
*
*/
//HAL_ISR_FUNC_DECLARATION(timer_a1_isr,TIMER0_A0){
void
__attribute__
((
interrupt
(
TIMER0_A
0
_VECTOR
),
used
))
timer_a1_isr
(
void
){
void
__attribute__
((
interrupt
(
TIMER0_A
1
_VECTOR
),
used
))
timer_a1_isr
(
void
){
//#pragma vector=TIMERA0_VECTOR
//__interrupt void TIMERA0_ISR(void) {
...
...
@@ -304,7 +304,7 @@ void __attribute__((interrupt(TIMER0_A0_VECTOR),used)) timer_a1_isr(void){
_BIC_SR_IRQ
(
LPM3_bits
);
// Clear LPM3 bits from 0(SR)
break
;
case
TA0IV_TACCR2
:
// Use as secondary timer function
timer_event
=
TA0IV_TACCR2
;
timer_event
=
TA0IV_TACCR2
;
_BIC_SR_IRQ
(
LPM3_bits
);
// Clear LPM3 bits from 0(SR)
break
;
/* case TA0IV_TACCR3: // CCR3 not used
...
...
This diff is collapsed.
Click to expand it.
source/test/min2.c
+
5
−
11
View file @
6cb7d807
...
...
@@ -57,7 +57,6 @@ void main (void)
// Setup the timer
hal_timer_init
(
0xFFFF
);
P1DIR
|=
BIT0
|
BIT1
;
P1OUT
|=
BIT0
|
BIT1
;
__enable_interrupt
();
...
...
@@ -70,20 +69,16 @@ void main (void)
idle_counter
=
main_time_counter
;
ee_printf
(
"Cnt:%3i
\n\r
"
,
idle_counter
);
ee_printf
(
"TA0CCR:0x%4X
\n\r
"
,
TA0R
);
//Allow the UART to finish
_delay_us
(
1736
);
//Toggle LED, wait Toggle again
P1OUT
^=
BIT1
;
TA0R
=
1
;
TA0CCTL1
=
CCIE
;
// interrupt enabled
_BIS_SR
(
LPM0_bits
+
GIE
);
// Enter LPM0
// while(get_reset_timer_wake_event()==0){
// NOP();
// //_BIS_SR(LPM0_bits + GIE); // Enter LPM0
// }
//We've exited by some means this LPM0
P1OUT
^=
BIT0
;
/*while(get_reset_timer_wake_event()==0){
NOP();
P3OUT |= BIT4;
//_BIS_SR(LPM0_bits + GIE); // Enter LPM0
}*/
}
if
(
idle_counter
>
10
){
...
...
@@ -111,5 +106,4 @@ HAL_ISR_FUNC_DECLARATION(wdt_isr,WDT)
main_time_counter
++
;
/* global "0.5 second" counter used for printing time stamped packet sniffer data */
P1OUT
^=
BIT0
;
}
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