Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Timer Bugfix for lm3s #11

Closed
wants to merge 1 commit into from

2 participants

@StefanBa

Maybe not the most elegant solution, but it does work

The following functions are working correctly now:
tmr.getdiffnow(..)
tmr.gettimediff(..)
and uart.read(..) with timeout

tested with lm3s9d92

Stefan Baumann Timer Bugfix for lm3s
Maybe not the most elegant solution, but it does work
b1a3420
@bogdanm bogdanm commented on the diff
src/platform/lm3s/platform.c
@@ -557,7 +557,7 @@ timer_data_type platform_s_timer_op( unsigned id, int op,timer_data_type data )
break;
case PLATFORM_TIMER_OP_READ:
- res = MAP_TimerValueGet( base, TIMER_A );
+ res = 0xFFFFFFFF - MAP_TimerValueGet( base, TIMER_A );
@bogdanm Owner
bogdanm added a note

That's precisely the fix I had in mind too, except I want to make it more generic (thus applicable to more than one platform). So I will not merge this pull request yet, I'll merge it only if the generic approach doesn't work (or if it turns out to be too ugly to implement).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@bogdanm
Owner

Fixed in a more generic way on master.

@bogdanm bogdanm closed this
@naves-thiago naves-thiago referenced this pull request from a commit in naves-thiago/elua
@martinwguy martinwguy Apply fix to Lua 5.1.4 bug #11
See http://www.lua.org/bugs.html -> Lua 5.1.4 -> bug 11
"Parser may collect a prototype while building it."
c9c4311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 9, 2012
  1. Timer Bugfix for lm3s

    Stefan Baumann authored
    Maybe not the most elegant solution, but it does work
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/platform/lm3s/platform.c
View
2  src/platform/lm3s/platform.c
@@ -557,7 +557,7 @@ timer_data_type platform_s_timer_op( unsigned id, int op,timer_data_type data )
break;
case PLATFORM_TIMER_OP_READ:
- res = MAP_TimerValueGet( base, TIMER_A );
+ res = 0xFFFFFFFF - MAP_TimerValueGet( base, TIMER_A );
@bogdanm Owner
bogdanm added a note

That's precisely the fix I had in mind too, except I want to make it more generic (thus applicable to more than one platform). So I will not merge this pull request yet, I'll merge it only if the generic approach doesn't work (or if it turns out to be too ugly to implement).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
break;
case PLATFORM_TIMER_OP_SET_CLOCK:
Something went wrong with that request. Please try again.