1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00

938 Commits

Author SHA1 Message Date
James Snyder
020d12919e Update some target headers, fix builds on 8962, 6965 2011-11-17 20:47:33 -06:00
James Snyder
7db7ac236c Fix building for a few conditions in LM3S platform
- improve SCons conf.py to support usb files
- enable building for 9b92 again
2011-11-17 20:11:45 -06:00
James Snyder
6e664ed6fc Modified to allow building on non-usb stellaris platforms 2011-11-13 17:54:33 -06:00
James Snyder
1b678dfea2 Merge branch 'master' into lm3s_usb_cdc 2011-11-13 17:41:23 -06:00
James Snyder
e56c810aa4 Merge pull request #6 from naves-thiago/master
Fix hard coded SPI ID on STR9
2011-11-13 14:51:01 -08:00
James Snyder
9cd7c65e06 Fix typo in mmc timer code that prevented writing to files 2011-11-13 15:56:06 -06:00
naves.thiago
7dfad82c0c Fix indentation 2011-11-10 21:28:53 -02:00
Bogdan Marinescu
cd530f9640 AVR32 INT_TMR_MATCH fix
Actually disable the timer match interrupt for the non-cyclic mode.
2011-11-10 13:03:57 +02:00
Bogdan Marinescu
d4f03efb96 timer interrupt support for AVR32 2011-11-10 02:27:44 +02:00
Bogdan Marinescu
b79a1d4ead fix invalid argument matching in tmr.set_match_int 2011-11-10 02:25:55 +02:00
Thiago Naves
a38586f217 Updated SPI count in str9's platform_conf.h ( also from the SPI fix ) 2011-11-08 16:55:58 -02:00
Thiago Naves
722d5cb0a1 Fix SPI on STR9 2011-11-08 16:44:37 -02:00
Martin Guy
920b1c28cc Merge branch 'master' of github.com:elua/elua 2011-11-04 05:26:06 +01:00
James Snyder
8c0f82198f Fix CRLF 2011-10-24 19:11:35 -05:00
Martin Guy
060d4980cd Tiny optimisation
cpol and cpha are already checked as being 0 or 1 in modules/spi.c
so don't bother masking them.
2011-10-22 20:50:04 +02:00
Martin Guy
6c655e6e57 Raise Mizar32 CPU freq from 60 to 66MHz and PBA from 15 to 16.5
All derived frequencies (sdram, USB, tmr, VTMRs, SPI, UARTs, PWM, MMC,
and ethernet) compensate correctly for the different PBA freq and
tmr.getmaxdelay() is still just over 0.5 sec (by a hair!).
This may work for EVK110X too - the reason they chose 60MHz is unknown.
2011-10-22 20:01:03 +02:00
Martin Guy
c36309d185 Remove unused variable 2011-10-22 19:38:37 +02:00
Martin Guy
024efa7485 Fix AVR32 SPI initialization
This fixes the following AVR32 SPI clock setting bugs:
- it used to set the SPI frequency at a quarter of what you asked for
  (by calculating it from the wrong clock)
- it did not report what actual frequency it had set
- spi.setup() always seemed to succeed even if it failed
- it used to set the nearest frequency instead of the next lowest available
  so half the time would drive devices at higher than their maximum speed.
  This was hidden by it always setting a quarter of what you asked for (!)
- it would set a junk frequency if you asked for a clock lower than its minimum
- asking for a baud rate of zero made it divide by zero, which went undetected
  and set a random baud rate instead of the minimum available
- Now, if you ask for an invalid number of data bits (< 8 or > 16),
  spi.setup() returns zero.
  This is still wrong and undocumented.
  It should give an error message in platform-independent spi_setup() and stop
  but unfortunately the current code structure does not allow this, since the
  possible numbers of data bits is platform-specific.
2011-10-22 19:20:19 +02:00
Martin Guy
ced77664e9 Revert "Pass the right clock to spi_initMaster() - PBA freq not CPU freq"
This reverts commit 3bdb0c9c93a9b54b29517be41e4c93538c45b40f.
which stopped the MMC card working on Mizar32.
2011-10-22 17:00:31 +02:00
James Snyder
b7b6a6e7eb Add build-time check for system timer for MMCFS 2011-10-21 18:15:14 -05:00
James Snyder
c4f7fe94c1 Adjust MMCFS to use the system timer 2011-10-21 18:08:43 -05:00
Bogdan Marinescu
4ddaf0ab77 merge newtimers into master 2011-10-21 21:30:23 +03:00
Bogdan Marinescu
1486c51508 started to update CHANGELOG for the new release 2011-10-21 21:22:16 +03:00
Bogdan Marinescu
c98474e357 added per platform information about system timer support 2011-10-21 21:17:55 +03:00
Martin Guy
854e4f5cfa aAdd commentary about second use of CPU_FREQUENCY macro 2011-10-21 16:12:23 +02:00
Martin Guy
3bdb0c9c93 Pass the right clock to spi_initMaster() - PBA freq not CPU freq
The AVR32 SPI setup code passed the wrong clock to the SDK's SPI
init function. The result should have been that it set one quarter
of the required frequency.
This change is "obvious" but untested, since the spi.*() module
interface seems not to work yet on AVR32. The MMC card on SPI1
continues to work as it did before, presumably at full speed
instead of quarter speed.
2011-10-21 16:04:15 +02:00
Bogdan Marinescu
43f0f2711e updated information about the new 'lualonglong' mode 2011-10-21 15:39:44 +03:00
Bogdan Marinescu
93fdf7b4a6 updated information about default timer IDs 2011-10-21 15:18:10 +03:00
Bogdan Marinescu
c193777755 fixed documentation of the UART platform interface 2011-10-21 11:55:00 +03:00
Bogdan Marinescu
0e9a3c3043 fixed documentation for 'uart' and 'net' 2011-10-19 22:58:40 +03:00
Bogdan Marinescu
43724385b3 finished documenting the timer platform interface and the 'tmr' module 2011-10-19 15:09:59 +03:00
Bogdan Marinescu
6525e39960 start to document the changes 2011-10-19 00:57:33 +03:00
Bogdan Marinescu
447c98a233 added more timeout related constants to the 'net' module 2011-10-19 00:57:20 +03:00
Bogdan Marinescu
f17b2a3bb2 Lua long long preliminary support 2011-10-18 15:52:37 +03:00
Martin Guy
66798da84b Fix PWM clock select commentary 2011-10-14 13:28:12 +02:00
Bogdan Marinescu
c9127c8893 another timeout type fix 2011-10-14 14:21:16 +03:00
Bogdan Marinescu
537cf8da51 added the system timer as an explicit constant in a few modules 2011-10-14 00:07:16 +03:00
Bogdan Marinescu
b12ba2194e added new convenience function to the timer module 2011-10-13 14:22:27 +03:00
Bogdan Marinescu
a46cc203c8 fix timeout data type in the RFS implementation 2011-10-13 14:12:05 +03:00
Bogdan Marinescu
1a1ae155c9 RFS_TIMER_ID now defaults to the system timer on supported platforms 2011-10-13 13:42:49 +03:00
Bogdan Marinescu
55e0b9ec9e RPC_TIMER_ID now defaults to the system timer on supported platforms 2011-10-13 13:37:46 +03:00
Bogdan Marinescu
77d543c53a fixed STR9 systimer implementation (tested) 2011-10-12 01:31:29 +03:00
Bogdan Marinescu
cc99b2d7a2 added missing operations for some platforms 2011-10-11 17:31:59 +03:00
Bogdan Marinescu
72080c34fc system timer support for STR9 (not yet tested) 2011-10-11 17:28:41 +03:00
Bogdan Marinescu
17684b1da2 Fix compilation errors for platform that won't get a system timer
There are some platform that will not get a system timer implementation
(mainly because they don't really have a user base). These are i386,
lpc288x and str7. They will continue to work without a system timer.
2011-10-11 15:45:56 +03:00
Bogdan Marinescu
026f72dd46 System timer support is now optional
Since the system timer might be too demanding for some platforms
(although this isn't currently the case for any eLua plarform) it
is now optional. Any platform that implements it must define the
PLATFORM_HAS_SYSTIMER macro in its platform_conf.h
2011-10-11 13:59:02 +03:00
Bogdan Marinescu
acba13b16f systimer support for LPC24xx 2011-10-11 01:41:14 +03:00
Bogdan Marinescu
b1b82b127e Change systimer overflow handling from timer stop to interrupt disable
When a systimer timer overflow is detected, handle it by temporarily disabling
the systimer interrupt rather than disabling the systimer completely. It gives
better accuracy and fixes some hardware-related issues on some platforms.
2011-10-11 00:44:06 +03:00
Martin Guy
8fe7d5ca9a Fix bug in AVR32 ADC code: reading write-only register adc->chdr 2011-10-10 04:23:19 +02:00
James Snyder
eea769be29 Initial fix for AVR32 ADC sequencer issues 2011-10-09 19:06:59 -05:00