Commit Graph

422 Commits (d0b2fb6c668b1330b58e549e39d09dcdb865efa8)

Author SHA1 Message Date
Bogdan Marinescu d0b2fb6c66 Added flow control test
Since this requires a separate serial port connection, added this as a
new attribute of the MUTs.
2013-12-04 19:46:51 +02:00
Bogdan Marinescu 2ac6c4c531 Fixed RTS/CTS bit-banging on LPC1768 2013-12-04 19:46:12 +02:00
Bogdan Marinescu fbeb52d613 Added RTS/CTS flow control
Currently implemented only for LPC1768. On this platform, when hardware
flow control is not directly supported, it will be emulated.
Also added "not_implemented.c" as a placeholder for various HAL functions
that might not be implemented on all platforms (in this particular case,
serial_set_flow_control). These are weak implementations that default to a
"not implemented" error message.
2013-12-04 19:42:11 +02:00
Bogdan Marinescu 256f70fffc Merge remote-tracking branch 'origin/master' 2013-11-26 17:14:46 +02:00
Bogdan Marinescu 3c0a8b633f Provide generic pinout defines
This commit adds generic peripheral names to various mbed enabled
boards, to make it easier to write portable code amongst various
mbed boards.
2013-11-26 17:12:36 +02:00
Emilio Monti 64952d4f7e Merge pull request #114 from mazgch/master
Avoid hardfault when CAN object is destructed.
2013-11-21 08:40:43 -08:00
mazgch a3a16b3683 Avoid hardfault when CAN object is destructed.
interrupts have to be disabled(can_irq_free) before we turn off(can_free) the peripheral
2013-11-21 17:31:17 +01:00
Emilio Monti 5278dd43f2 Merge pull request #113 from mazgch/master
fix the documentation to ethernet api to match implementation
2013-11-21 02:32:05 -08:00
mazgch 2b7d2bb343 fix the documentation to match implementation 2013-11-21 11:24:58 +01:00
Emilio Monti 6a5335a40e Merge pull request #112 from Sissors/master
Added sleep to LPC81x
2013-11-21 01:58:28 -08:00
Sissors 585e05ca6a Added sleep to LPC81x
http://mbed.org/users/mbed_official/code/mbed-src/pull-request/6
2013-11-21 08:19:44 +01:00
hototogi 03b79b5920 support GCC_ARM for LPC4330_M4
- Linker script is based on LPC1768
     number of NVIC is 16 (CORE) + 53 (M4 in LPC43xx) = 69,
    therefor, reserve at the top of RAM0 (address:0x10000000)
    to relocate NVIC vector table
 - startup file is based on startup_ARMCM4.S in CMSIS V3.20
     change NVIC name for cortex-M4 of LPC43xx
 - add GCC_ARM for LPC4330_M4 in python scripts
 - add some descriptions for GCC_ARM
2013-11-20 17:03:59 +09:00
Adam Green 10126e0b2f Increase available RAM for RTX on LPC11U24
The INITIAL_SP value used by RTX was originally at the 4k limit instead
of at the 8k limit.  The HEAP_START macro was defined to __HeapLimit
but the heap really starts at __end__.  __HeapLimit is just used for
some link time sanity checks to verify that the heap and stack can
grow a bit without colliding.
2013-11-19 00:38:12 -08:00
Bogdan Marinescu 5b6faea448 Removed redundant label TARGET_LPC81X_COMMON 2013-11-11 13:28:18 +02:00
Joris Aerts 76ffc4935e Fix bug in gpio_set not setting reserved pins correctly
Loop going over reserved pins was not going over all entries as result of incorrect sizeof
2013-11-08 13:39:00 -08:00
Bogdan Marinescu e69956aba2 Updated DSP library + build system changes
Updated CMSIS DSP to latest version (CMSIS-SP-00300-r3p2-00rel1.zip)
Build system changes to be able to preprocess assembler sources before compiling them:

- GCC: use gcc '-x assembler-with-cpp'
- ARM: preprocess first, then assemble (two separate commands)
- IAR: added macro definitions and include directories to the assembler command line

Removed CORTEX_ARM_SUPPORT restriction for the DSP libraries.
Tested: LPC1768 with ARM, GCC_ARM and IAR, LPC11U24 with ARM.
2013-11-08 15:38:23 +02:00
0xc0170 f4591dbbab Merge branch 'upstream_master' into dev_kl46z 2013-11-05 22:08:07 +01:00
Bogdan Marinescu cf71d0831b Merge pull request #99 from xiongyihui/master
add readable(), writeable() and settings changed callback to USBSerial
2013-11-05 01:37:35 -08:00
Bogdan Marinescu bb04bf917a Merge branch 'lpc4088' of git://github.com/arebert/mbed into arebert-lpc4088
Conflicts:
	workspace_tools/export/gccarm.py
2013-11-04 12:19:29 +02:00
Yihui Xiong d3ca818905 add readable(), writeable() and settings changed callback to USBSerial 2013-11-01 12:38:27 +08:00
Andreas Rebert 09cf4ef128 Support for exporting to GCC_ARM 2013-10-31 13:28:05 +01:00
Adam Green 64620e2e78 lwip: Stop dropping long TCP segments
If lwIP placed more than 2 pbufs in a TCP segment, the ethernet driver
would fail to send it as it didn't have enough Tx descriptors.  The
maximum number of pbufs outstanding for transmit that lwIP keeps is
defined by the TCP_SND_QUEUELEN macro.  I modifed the value of
LPC_NUM_BUFF_TXDESCS to take advantage of this lwIP value.  The +1
takes into account that LPC_EMAC->TxProduceIndex ==
LPC->TxConsumeIndex is reserved for indicating that the queue is empty
so a full queue uses one less than the maximum count.
2013-10-29 23:41:21 -07:00
Adam Green 692cbd11f6 lwip: Fix invalid checksum bug
tcp_write() would incorrectly byte swap the checksum 1 too many times
when concatenating a pbuf to an existing TCP segment if the number of
bytes in the concatenated data was odd.  I hit this issue when I tried
to reproduce a lost segment issue reported by a mbed user in this forum
thread: http://mbed.org/forum/mbed/topic/4354/?page=2#comment-22657
2013-10-29 23:41:21 -07:00
pbrier b1d88905a9 fixed can_filter() prototype (prevents build of LPC1768) 2013-10-26 17:02:29 +02:00
Emilio Monti 317a1f66d2 Merge pull request #91 from jorisa/master
Add CAN api filter support and LPC11CXX CAN implementation
2013-10-25 06:58:05 -07:00
Bogdan Marinescu 9d881770c9 Merge remote-tracking branch 'github/master' 2013-10-25 15:43:01 +03:00
Adam Green 969733ae8f serial_putc() to make better use of Tx FIFO
If don't know if this is an issue that anyone cares about.  I am also
not sure what the best way to solve it is either.  I just thought I
would issue a pull request with this commit to bring the issue to light
and show a possible solution that I have tested on my mbed-1768 device.

Previously the serial_putc() API didn't make any use of the Tx FIFO
since the serial_writable() API it utilizes only returns true when the
FIFO is completely empty.  This is due to the fact that the THRE bit of
the UART's LSR (Line Status Register) only goes high when the whole
FIFO is empty.

I noticed this when doing some performance testing with the network
stack.  I went from calling printf() to output 3 bytes every 10 seconds
(with packet drop stats) to instead output 4 bytes every 10 seconds.
I thought these should easily fit in the 16 byte FIFO but outputting
one extra byte caused an additional three 550 byte UDP packets to be
dropped.  This should only happen if the additional character being
sent to the UART was taking away extra CPU cycles from the network
stack.

My solution is to keep track of the number of bytes that have been
placed in the Tx FIFO since it was last detected as being completely
empty (via the THRE bit).  Only once this count hits 16 does the code
then block, waiting for the THRE bit to go high.  Each time the THRE
bit does go high, the count is reset to 0 again and it is incremented
for each byte that is loaded into the THR.
2013-10-25 15:17:06 +03:00
Joe Turner 6ae1e9e360 Merge branch 'master' of git://github.com/mbedmicro/mbed into bugfix-STM32-vectors 2013-10-25 13:11:25 +01:00
Joe Turner 0ef4905728 Fix relocation of vector on STM32. 2013-10-25 13:09:06 +01:00
Bogdan Marinescu 544ac9e728 Disable DEVICE_STDIO_MESSAGES for LPC81X
Because the LPC81X HAL implementation calls error(), which in turn calls
fprintf(), quite a bit of code is added to the image, which is not a good
idea on such resource constrained targets.
2013-10-25 14:51:01 +03:00
Bogdan Marinescu 5742abe6d9 Added the new RawSerial.h in mbed.h 2013-10-23 17:28:05 +03:00
Bogdan Marinescu 2404dc0092 Added new serial class, remove interrupt chaining
The new RawSerial class is a simple wrapper over the serial HAL that can
be safely used from an interrupt handler.
Interrupt chaining code was removed from InterruptIn, Serial and Ticker
because it caused lots of issues with the RTOS. Interrupt chaining is
still possible using the InterruptManager class.
2013-10-23 16:08:34 +03:00
Joris Aerts 739f2a6375 Add can_api hal implementation to LPC11CXX target
Most of the functionality works, interrupts might need a little more work.
2013-10-22 11:02:10 -07:00
Joris Aerts 08c1483eb3 Add bitfields definition to LPC11XX target
Generated from UM10398
2013-10-22 11:00:17 -07:00
Joris Aerts 067e446ae2 Add CAN->filter to API and add placeholders to hal's
Add filter function and modify CAN->read definition to allow reading specific messages.
2013-10-22 10:57:28 -07:00
Bogdan Marinescu fe7021d433 Renamed ubloxusbgsm in main to ubloxusb
Since the tests are now generic (both GSM and CDMA), rename the directory
to reflect this.
2013-10-22 12:41:01 +03:00
Bogdan Marinescu ae0bc41693 Added support for CDMA modem in SMSTest
Also remove unnecessary thread from main
2013-10-22 12:27:18 +03:00
Bogdan Marinescu 7f35fc4b76 Added support for CMDA modem in HTTPClientTest
Also remove unnecessary thread from main
2013-10-22 11:59:11 +03:00
Bogdan Marinescu dfb472ceaf fixed invalid include name 2013-10-21 14:43:46 +03:00
Bogdan Marinescu 8557b24b61 Merge remote-tracking branch 'github/master' 2013-10-21 14:23:04 +03:00
Bogdan Marinescu 8aaa1b76a6 Added auto synchronization for the u-blox GSM modem test
Also changed the test to look more like the original VodafoneUSBModem SMS
test (added another thread).
2013-10-21 14:21:42 +03:00
0xc0170 5129cd05f3 Merge branch 'upstream_master' into dev_gpio_irq_endis 2013-10-21 12:29:43 +02:00
0xc0170 b0537af763 gpio irq enable/disable
- InterruptIn disable_irq/enable_irq
2013-10-19 22:28:29 +02:00
Bogdan Marinescu 5e6262a91a Fixed macro definitions in u-blox test 2013-10-19 14:39:50 +03:00
Bogdan Marinescu ea9ba23ff5 Changed u-blox modem test
The test is not automated now, so it can be synced with the official
repository.
Also changed it to look more like the original VodafoneUSBModem test by
adding another thread in the code.
2013-10-19 00:54:32 +03:00
0xc0170 d9ed7aba77 CMSIS KL46 files (were KL25 renamed) 2013-10-17 19:32:40 +02:00
Bogdan Marinescu bdf5d03ba1 Updated tests
- Vodafone tests are gone for now
- Added u-blox TCP test (UB_1) and SMS test (UB_2).
- tests can now have more than a single source directory
2013-10-17 18:57:02 +03:00
Bogdan Marinescu a34945661d Added CellularModem as an abstract base class for modem implementations
Now both UbloxUSBGSMModem and UbloxUSBCDMAModem inherit from
CellularModem.
2013-10-17 15:40:46 +03:00
Bogdan Marinescu 87fbaa5507 Added missing constructor for CDMA modem initializer 2013-10-17 13:52:34 +03:00
Bogdan Marinescu 7585a23e6c Added CellularModem library, removed old VodafoneUSBModem library 2013-10-17 12:01:55 +03:00