Commit Graph

104 Commits (92a642bc5ea656e3c2d86b457c720da9d2566506)

Author SHA1 Message Date
Tony Wu 6c1167844a rtl8195am - fix us_ticker porting
commit f7bc126 (Re-work Rtl8195AM ticker) tried to address ticker drifting
issue, but in fact broke ticker functionality. This patch adjusts us_ticker
porting to unbreak it, and to fix the following tests:

mbed-os-tests-mbed_drivers-ticker
mbed-os-tests-mbed_drivers-timeout
mbed-os-tests-mbedmicro-rtos-mbed-isr
mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler
mbed-os-features-frameworks-utest-tests-unit_tests-case_control_async
mbed-os-features-frameworks-utest-tests-unit_tests-case_async_validate

Changes are:

1. Dont disable timer after every us_ticker interrupt. That basically
   breaks ticker functionality.

2. Fine-tune us to tick conversion macro. Previous conversion method
   yields 1 tick drift every 2 ms.

3. Remove special placement of ticker objects. No longer necessary.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-09-20 11:03:22 +08:00
Anna Bridge 003dd7c47f Merge pull request #5044 from Archcady/Profile_debug
Realtek_RTL8195AM fix for debug profile
2017-09-19 10:43:25 +01:00
Jimmy Brisson aeda7f7d28 Merge pull request #5069 from deepikabhavnani/assert_added
Changed error print to assert
2017-09-15 17:50:49 -05:00
Yuguo Zou f7bc12626d Re-work Rtl8195AM ticker
Remove intermediate variances and use uint64 instead;
Remove HalTimerIrqEn called in us_ticker.c
2017-09-15 18:53:24 +08:00
Jimmy Brisson 45b59b442b Correct long call macros for ARMC6 2017-09-13 09:48:55 -05:00
adbridge 32bd25e8df Fix include file for ARMCC 6, should use cmsis_armclang.h 2017-09-12 16:41:11 +01:00
Jimmy Brisson 4f3f0cc9cc Make Realtek link
There was some interesting stuff here.
 * ARMC6 treats assembly the same as GNU, but has a different startup
   function, so we branch the asm there
 * Incorrect discriminant, probably copied from other ports
2017-09-11 13:20:33 -05:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Deepika 65150b62b9 Added assert for malloc 2017-09-11 11:41:34 -05:00
Anna Bridge cab660d980 Merge pull request #4938 from deepikabhavnani/IAR_fixes
Update IAR to version 8
2017-09-11 17:28:38 +01:00
Yuguo Zou ba3bb7ea35 Remove unused code
Clean rtl8195a_init.c a little bit
2017-09-07 15:10:08 +08:00
Yuguo Zou 2642ab321e Update wlan lib to fix debug profile
The issue of mutex returning osErrorISR with debug profile is fixed
2017-09-07 11:05:06 +08:00
Yuguo Zou 1d6a69b3e6 Update MSP setup
Use asm code to set MSP
2017-09-07 10:58:45 +08:00
Jimmy Brisson 7457bbbc5c Merge pull request #4665 from Archcady/enable_sdram
Enable sdram usage of REALTEK_RTL8195AM
2017-09-06 14:26:34 -05:00
Deepika d12822f95a Resolved compiler error: constructor deleted
IAR 8.x compiler throws error for emac_interface_t constructor
rtw_emac.cpp@220,0: [Pe1790]: the default constructor of "emac_interface"
cannot be referenced -- it is a deleted function

Error is because new object is created of structure with constant member.
Resolved it by using malloc instead new.
2017-09-06 09:51:17 -05:00
Yuguo Zou 67f1ee5343 Resolve including directory issue in GCC linker script for Ameba
Should not make assumption of specific directory when include .h from
linker script
2017-09-05 19:11:38 +08:00
Yuguo Zou c834b7faac Fix bugs for RTL8195AM with debug profile of compilers
1. Add alignment / padding for postbuild segments
2. Clear tcm.bss section
3. Remove TRAP_OverrideTable(), move lines to PLAT_Start()
2017-08-28 19:04:26 +08:00
Yuguo Zou c530be0eeb Fix stack underflow issue
Switch on TCM
2017-08-23 16:12:07 +08:00
Yuguo Zou 1e398cfc60 Add RTL8195AM support for mbed client with IAR
Move ticker related code to SRAM due to time drift sensitive
2017-08-22 17:34:00 +08:00
Yuguo Zou e16c2d2833 Add RTW8195AM support for mbed client with ARMCC
Move ticker related code to SRAM due to time drift sensitive
2017-08-22 17:33:41 +08:00
Yuguo Zou 215a7906d3 Change to use copy assignment operator for RTWInterface::scan 2017-08-10 17:36:05 +08:00
Yuguo Zou f24a40906a Use placement new to optimize wifi scan 2017-08-07 11:23:30 +08:00
Yuguo Zou 56a98e11d1 Move ticker related text to SRAM to fix GCC mbed-os-tests-mbed_drivers-timeout failing issue 2017-08-03 11:06:24 +08:00
Yuguo Zou 1d06bf4279 Disambiguate function __memset() in rtl8195a_init.c
When use ARMCC, __memset is replaced by ARM's version which will make
boot process hang.
2017-08-01 17:45:04 +08:00
Yuguo Zou 49a7e4b59e Fix GCC compile errors 2017-08-01 17:03:01 +08:00
Tony Wu 35d7ca27be rtl8195am - fix ARMCC SRAM + SDRAM porting
Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-08-01 15:29:21 +08:00
Yuguo Zou d1c87347af Fix ARMCC & IAR compile errors 2017-07-28 18:33:52 +08:00
Yuguo Zou 2654d2c433 Switch off DBG messages
And clean up some unused debug messages
2017-07-27 18:51:57 +08:00
Tony Wu c9ecb2749d rtl8195am - adjust memory layout and enable fota support
1. Rearrange SDRAM and SRAM layout. Move timing critical code to SRAM,
   and the rest to SDRAM.

2. Add bootloader that's capable of FOTA over mbed cloud.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-07-27 13:55:45 +08:00
Tony Wu 37739937ca rtl8195am - rename GCC_ARM linker script
Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-07-27 13:55:44 +08:00
Yuguo Zou 2864e4b05d enable sdram usage of REALTEK_RTL8195AM
Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-07-27 13:55:42 +08:00
Jimmy Brisson 1f94ede86c Merge pull request #4744 from deepikabhavnani/spi_issue_4743
Allow user to set default transfer byte for block read
2017-07-24 14:45:30 -05:00
Jimmy Brisson d5108e5a7a Merge pull request #4714 from bulislaw/expose_systemcoreclock
Expose SystemCoreClock via cmsis.h to support new CMSIS/RTX
2017-07-24 10:59:47 -05:00
Jimmy Brisson 7a153ce337 Merge pull request #4754 from Archcady/TLS
Resolve TLS handshake failing issue for REALTEK_RTL8195AM
2017-07-24 10:55:30 -05:00
Deepika 1b797e9081 Closed review comments
1. Doxygen and Grammar related
2. Change dummy to spi_fill
3. Remove NXP driver and add default loop in spi block read (same as all
other drivers)
2017-07-21 09:46:22 -05:00
Marcus Chang 1930c4b136 REALTEK_RTL8195AM: FlashIAP read and address scope
The FlashIAP is supposed to have access to the full application
memory, so the address scope has been changed to encompass
the entire external flash.

The address translation has also been changed to reflect the memory
layout in the documentation:

 Realtek Ameba1 Memory Layout: 5.1 Flash Memory
2017-07-19 14:24:50 +01:00
Jimmy Brisson adfed0f9de Merge pull request #4644 from 0xc0170/fix_ticker_delta_negative
Ticker: add fire interrupt now function
2017-07-17 11:05:46 -05:00
Yuguo Zou 2ec8b04074 Resolve TLS handshake failing issue
this issue, relating to wifi thread priority,  makes blocking TCP socket
failing
2017-07-14 11:21:53 +08:00
Bartek Szatkowski 03e80119b5 REALTEK_RTL8195AM: Expose SystemCoreClock via cmsis.h
This change is necessary as updated CMSIS/RTX require the
SystemCoreClock symbol.
2017-07-13 15:49:33 +01:00
Martin Kojtal 43a361214a Merge pull request #4667 from Archcady/mute_debug_msg
Update and mute debug messages of REALTEK_TRL8195AM
2017-07-13 16:47:31 +02:00
Martin Kojtal 10ea63b8e7 Ticker: add fire interrupt now function
fire_interrupt function should be used for events in the past. As we have now
64bit timestamp, we can figure out what is in the past, and ask a target to invoke
an interrupt immediately. The previous attemps in the target HAL tickers were not ideal, as it can wrap around easily (16 or 32 bit counters). This new
functionality should solve this problem.

set_interrupt for tickers in HAL code should not handle anything but the next match interrupt. If it was in the past is handled by the upper layer.

It is possible that we are setting next event to the close future, so once it is set it is already in the past. Therefore we add a check after set interrupt to verify it is in future.
If it is not, we fire interrupt immediately. This results in
two events - first one immediate, correct one. The second one might be scheduled in far future (almost entire ticker range),
that should be discarded.

The specification for the fire_interrupts are:
- should set pending bit for the ticker interrupt (as soon as possible),
the event we are scheduling is already in the past, and we do not want to skip
any events
- no arguments are provided, neither return value, not needed
- ticker should be initialized prior calling this function (no need to check if it is already initialized)

All our targets provide this new functionality, removing old misleading if (timestamp is in the past) checks.
2017-07-13 12:23:25 +01:00
Yuguo Zou d46cc2ad3f Remove unused headfile
This shall prevent confusion
2017-07-12 17:49:52 +08:00
Yuguo Zou b435ff4a16 Enable/Disable debug from argument of constructor 2017-07-12 17:40:24 +08:00
Yuguo Zou c7111c429e mute wifi_conf messages 2017-07-12 12:13:05 +08:00
Yuguo Zou b7f1e73f97 Update and mute debug messages from wifi 2017-06-29 16:40:01 +08:00
Yuguo Zou f7b2edc88c Coding style fix 2017-06-27 11:33:46 +08:00
Yuguo Zou 0de89c7712 Add FlashIAP support for REALTEK_RTL8195AM 2017-06-15 16:27:08 +08:00
Sam Grove f31ea01237 Merge pull request #4487 from Archcady/Realtek_TCM
Resolve Realtek device small code space issue
2017-06-11 01:09:51 -05:00
Yuguo Zou f4522134ed Resolve Realtek device small code space issue
switch on TCM section usage, this should give user code more codespace.
2017-06-10 09:46:01 -05:00
Jimmy Brisson d06e2169fd Correctly name rom.a 2017-06-09 00:03:22 -05:00