Masayuki Ishikawa
e87d14721e
arch: xtensa: Fix stack coloring
...
Summary:
- Call up_stack_color() correctly in the up_create_stack()
- Fix nwords calculation in up_stack_color()
- Also, refactor up_stack_color()
- Fix do_stackcheck() to consider stack alignment
Impact:
- Only for CONFIG_STACK_COLORATION=y
Testing:
- Tested with esp32-devkitc:wapi_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-18 19:05:07 -08:00
Masayuki Ishikawa
3ddfab239f
arch: xtensa: Fix a compile warning in xtensa_dumpstate.c
...
Summary:
- This commit fixes a compile warning if CONFIG_ARCH_INTERRUPTSTACK is set
Impact:
- None
Testing:
- Built with esp32-devkitc:smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-18 09:11:27 +00:00
Masayuki Ishikawa
102adaf026
arch: esp32: Fix a memory leak when discarding a large packet.
...
Summary:
- Recently I noticed that ESP32-DevKitC-32D suddenly stops
during receiving ping packets from PC after 10-20mins
- Actually, sometimes memory leak happened when some device
sent a big broadcast packet periodically on the network
- This commit fixes this issue by calling esp_wifi_free_eb()
in the case that the packet exceeds WLAN_BUF_SIZE.
- Also, this commit applies the same logic in the case that
the Wi-Fi interface is down
Impact:
- None
Testing:
- Tested with esp32-devkitc:wapi
Suggested-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-17 12:55:08 +09:00
YAMAMOTO Takashi
aed24f1255
esp32: Retire XTENSA_IMEM_PROCFS
...
Now /proc/meminfo has the equivalent.
2021-02-12 03:16:03 -08:00
YAMAMOTO Takashi
7bb849535c
esp32_modtext.c: Report the usage with procfs_register_meminfo
2021-02-12 03:16:03 -08:00
YAMAMOTO Takashi
c51e2a0cb3
esp32_imm.c: Report the usage with procfs_register_meminfo
2021-02-12 03:16:03 -08:00
Alan C. Assis
f56ff40101
Add esp32_gpio_matrix_in/out to replace ROM functions
2021-02-11 20:39:51 +00:00
chenwen
dcec04f5b2
xtensa/esp32: Writeback PSRAM data when mapping SPI Flash address to ESP32's address bus
2021-02-09 08:26:45 -03:00
YAMAMOTO Takashi
2220827463
esp32_allocateheap.c: Add a sanity check
2021-02-09 07:51:12 +00:00
YAMAMOTO Takashi
63c08a79be
esp32_allocateheap.c: Add a comment
2021-02-09 07:51:12 +00:00
Gustavo Henrique Nihei
a8cf8abfaa
esp32: Create chip selection config to improve capabilities refinement
2021-02-08 21:17:22 +00:00
Masayuki Ishikawa
d87f350831
arch, boards, drivers, include, sched, wireless: Change spinlock APIs.
...
Summary:
- This commit changes spinlock APIs (spin_lock_irqsave/spin_unlock_irqrestore)
- In the previous implementation, the global spinlock (i.e. g_irq_spin) was used.
- This commit allows to use caller specific spinlock but also supports to use
g_irq_spin for backword compatibility (In this case, NULL must be specified)
Impact:
- None
Testing:
- Tested with the following configurations
- spresnse:wifi, spresense:wifi_smp
- esp32-devkitc:smp (QEMU), sabre6-quad:smp (QEMU)
- maxi-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-07 21:28:56 -08:00
Gustavo Henrique Nihei
29b9cf652e
xtensa/esp32: Add extern modifier to ROM function declaration
2021-02-05 14:05:44 -03:00
Abdelatif Guettouche
685c2ce506
esp32_spiflash.c: Fix preprocessor condition.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-02-05 12:16:55 -03:00
Alan C. Assis
c4f87977dc
xtensa/esp32: Fix cache issue detected by DEBUG_ASSERTION
2021-02-04 21:22:01 +00:00
Alan C. Assis
bf384a7e33
esp32/psram: Fix missing configs
2021-01-28 05:14:36 -08:00
Abdelatif Guettouche
82aae4deb6
esp32/esp32_wifi_adapter.c: Print debug output only when DEBUG_WIRLESS*
...
are enabled.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-01-28 07:51:31 +09:00
Masayuki Ishikawa
b9d4bd0854
arch: esp32: Fix compile errors with CONFIG_SMP=y
...
Summary:
- This commit fixes compile errors in esp32_spiflash.c and
esp32_wifi_adapter.c with CONFIG_SMP=y
Impact:
- SMP only
Testing:
- Tested with esp32-devkitc:wapi
- NOTE: the following configs need to be added.
+CONFIG_SMP=y
+CONFIG_SMP_IDLETHREAD_STACKSIZE=3072
+CONFIG_SMP_NCPUS=2
+CONFIG_SPINLOCK_IRQ=y
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-27 04:47:05 -08:00
Alan C. Assis
6a87b85285
xtensa/esp32: Add efuse driver
2021-01-26 18:23:43 -08:00
Abdelatif Guettouche
6bf826acca
arch/xtensa/src/esp32/esp32_spiflash.c: Fix the value of the page start
...
address.
It was incorrectly taken from the size.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-01-26 15:27:16 -03:00
Xiang Xiao
94da3e4c3a
arch: Remove critical section inside up_schedule_sigaction
...
since nxsig_tcbdispatch already hold it for us
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2fe6ad840bdca3ec0eaa76a9af3b6929c7d5a721
2021-01-22 08:34:07 +01:00
Alan C. Assis
394cfba1d8
Fix himem debug assert error
2021-01-22 00:00:04 +01:00
Dong Heng
4bbc17454c
xtensa/esp32: Add AES hardware accelerator driver
2021-01-21 15:06:35 -03:00
Abdelatif Guettouche
c87e5965b7
xtensa/esp_allocateheap.c: Correct ROM memory boundries.
...
SMP was broken because the ROM memory wasn't set correctly. Some
regions were shared with the ROM code.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-01-21 11:13:19 -03:00
YAMAMOTO Takashi
a4a2d5ff7d
esp32_dma_init: Fix a dubious assertion
...
Requiring the size to be a multiple of 3 is a very strange restriction.
It doesn't even work with the default value of SPI_SLAVE_BUFSIZE.
I guess it was a typo.
2021-01-21 10:51:46 +01:00
YAMAMOTO Takashi
8c02b366f8
esp32_free_cpuint: Fix an assertion
...
The original assertion was wrong because:
* cpuint numbers for edge interrupts are not dense
(while ESP32_CPUINT_NEDGEPERIPHS is 4, EPS32_CPUINT_EDGESET is not 0xf.)
* This function is used for level interrupts too
2021-01-21 10:37:03 +01:00
Dong Heng
eb2937003b
xtensa/esp32: Fix ESP32 SPI driver issues
...
1. reset SPI hardware when deinitializing
2. reset SPI priavte configuration data when deinitializing
3. free interrupt when deinitializing
2021-01-18 12:54:12 +01:00
Dong Heng
4693857b2c
xtensa/esp32: Fix ESP32 I2C driver issues
...
1. when sending a message in a group fails, exit immediately
2. when catch I2C error interrupt, close interrupt
3. clear clock configuration when deinit I2C
4. free I2C interrupt when deinit I2C
2021-01-18 09:23:47 +01:00
Abdelatif Guettouche
8e4397968c
net/ & esp32/wlan: Fix some typos and nxstyle issues.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-01-14 07:57:27 -06:00
YAMAMOTO Takashi
ca0932f842
esp32_i2c.c: Remove useless casts
2021-01-13 11:04:59 +01:00
Xiang Xiao
0536953ded
Kernel module should prefer functions with nx/kmm prefix
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
Dong Heng
7a953bb154
xtensa/esp32: Fix ESP32 SPI3 slave ops data error
2021-01-11 09:10:18 +01:00
ligd
f63db66382
mqueue: add file_mq_xx for kernel use
...
Change-Id: Ida12f5938388cca2f233a4cde90277a218033645
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-05 02:40:43 -06:00
Dong Heng
fadae0bf39
xtensa/esp32: Fix ESP32 serial UART tx ready check error
2021-01-04 09:19:53 +01:00
Sara Souza
65f39fc0c7
xtensa/esp32: Added driver api to reload counter instantly
2020-12-28 12:08:27 +01:00
Sara Souza
6a6121378c
xtensa/esp32: Fixed wdt typos
2020-12-22 20:32:38 +01:00
YAMAMOTO Takashi
0fbfc4c44c
esp32_wifi_adapter.c: file mode for open doesn't make sense for O_RDONLY
2020-12-22 03:37:29 -06:00
Huang Qi
073912e232
Replace all wget with curl
...
wget is missing from some system (like macOS and Windows native),
it's better to use curl to simplify build environment.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-12-22 03:36:10 -06:00
Masayuki Ishikawa
ec73a4e69c
arch & sched: task: Fix up_exit() and nxtask_exit() for SMP
...
Summary:
- During repeating ostest with sabre-6quad:smp (QEMU),
I noticed that pthread_rwlock_test sometimes stops
- Finally, I found that nxtask_exit() released a critical
section too early before context switching which resulted in
selecting inappropriate TCB
- This commit fixes this issue by moving nxsched_resume_scheduler()
from nxtask_exit() to up_exit() and also removing
spin_setbit() and spin_clrbit() from nxtask_exit()
because the caller holds a critical section
- To be consistent with non-SMP cases, the above changes
were done for all CPU architectures
Impact:
- This commit affects all CPU architectures regardless of SMP
Testing:
- Tested with ostest with the following configs
- sabre-6quad:smp (QEMU, dev board), sabre-6quad:nsh (QEMU)
- spresense:wifi_smp
- sim:smp, sim:ostest
- maix-bit:smp (QEMU)
- esp32-devkitc:smp (QEMU)
- lc823450-xgevk:rndis
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-21 23:29:56 -06:00
Abdelatif Guettouche
81a9eb190d
arch/xtensa/src/esp32/esp32_spiflash.c: Invalidate the cache and
...
writeback PSRAM data if the flash address used has a cache mapping.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-18 16:43:52 -03:00
chao.an
4a559807a5
arch/netdev: try tcp timer in every txavail call
...
In the current implementation, the first transmission of the new
connection handshake is depends entirely by tcp_timer(), which will
caused 0.5s - 1s delay each time in connect().
This patch is mainly to improve the performance of TCP handshake.
Original:
nsh> tcp_client
[ 1.536100] TCP connect start.
[ 2.000200] TCP connect end. DIFF: tick: 4641, 464ms.
[ 3.000300] TCP connect start.
[ 4.000400] TCP connect end. DIFF: tick: 10001, 1000ms.
[ 5.000500] TCP connect start.
[ 6.000600] TCP connect end. DIFF: tick: 10001, 1000ms.
[ 7.000700] TCP connect start.
[ 8.000800] TCP connect end. DIFF: tick: 10001, 1000ms.
Optimized:
nsh> tcp_client
[ 3.263600] TCP connect start.
[ 3.263700] TCP connect end. DIFF: tick: 1, 0ms.
[ 4.263800] TCP connect start.
[ 4.263800] TCP connect end. DIFF: tick: 0, 0ms.
[ 5.263900] TCP connect start.
[ 5.263900] TCP connect end. DIFF: tick: 0, 0ms.
[ 6.264000] TCP connect start.
[ 6.264000] TCP connect end. DIFF: tick: 0, 0ms.
[ 7.264100] TCP connect start.
[ 7.264100] TCP connect end. DIFF: tick: 0, 0ms.
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-18 14:16:11 +09:00
YAMAMOTO Takashi
48ba0bb30a
esp32_wifi_adapter.c: Fix a use-after-free bug
2020-12-17 03:24:15 -06:00
YAMAMOTO Takashi
75bc489e24
esp32: Fix phy_printf
...
Fix the following error:
CC: chip/esp32_wifi_adapter.c
In file included from /Users/yamamoto/git/nuttx/nuttx/include/nuttx/mm/shm.h:45,
from /Users/yamamoto/git/nuttx/nuttx/include/nuttx/sched.h:42,
from /Users/yamamoto/git/nuttx/nuttx/include/sched.h:35,
from /Users/yamamoto/git/nuttx/nuttx/include/stdio.h:48,
from chip/esp32_wifi_adapter.c:28:
chip/esp32_wifi_adapter.c: In function 'phy_printf':
chip/esp32_wifi_adapter.c:3952:10: error: expected ')' before 'format'
wlinfo(format, arg);
^~~~~~
2020-12-17 03:24:15 -06:00
Sara Souza
1acba417c4
xtensa/esp32: enables started flag if the wdt was turned on in bootloader
2020-12-16 16:35:55 -03:00
Sara Souza
71715aaee8
xtensa/esp32: fixes enable int function and gets apb clk frequency through function
2020-12-16 10:48:02 -03:00
Sara Souza
add46d0408
xtensa/esp32: Added support for RTC WDT
2020-12-16 14:37:39 +01:00
Sara Souza
be12c79c52
xtensa/esp32: Changes in rtc driver to support rtc wdt driver
2020-12-16 14:37:39 +01:00
Abdelatif Guettouche
ecede04263
arch/*/src/Makefile: Generate dependencies for head files.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-15 21:00:52 -06:00
Xiang Xiao
625eef20f0
arch: Remove the special check for idle thread in up_use_stack
...
since the idle thread don't call up_use_stack anymore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-16 09:54:29 +09:00
Xiang Xiao
efee1c6ded
arch: Initialize the idle thread stack info directly
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-16 09:54:29 +09:00
YAMAMOTO Takashi
cb71469f85
esp32: Fix a typo. ESP_SPIRAM_BOOT_INIT -> ESP32_SPIRAM_BOOT_INIT
2020-12-15 02:07:05 -06:00
John Bampton
ba12c6c0cf
Fix spelling
2020-12-12 19:18:08 +01:00
Sara Souza
6244924c3e
Removed initconf from esp32_wtd_ops_s
2020-12-10 20:31:15 -06:00
Sara Souza
2a9dab2e5d
xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later
2020-12-10 20:31:15 -06:00
Abdelatif Guettouche
f7c5b467e1
arch/xtensa/src/esp32: Remove the EXPERIMENTAL config from the Wireless.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
56713e0304
arch/xtensa/src/esp32/Make.defs: Don't condition including the low level
...
WDT driver with the upper layer driver.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
3ba5018b37
boards/xtensa/esp32: A bit of re-organisation in the ESP32 boards.
...
Move the common files into the common directory.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Masayuki Ishikawa
409c65ce0b
arch, sched: Fix global IRQ control logics for SMP
...
Summary:
- This commit fixes global IRQ control logic
- In previous implementation, g_cpu_irqset for a remote CPU was
set in sched_add_readytorun(), sched_remove_readytorun() and
up_schedule_sigaction()
- In this implementation, they are removed.
- Instead, in the pause handler, call enter_critical_setion()
which will call up_cpu_paused() then acquire g_cpu_irqlock
- So if a new task with irqcount > 1 restarts on the remote CPU,
the CPU will only hold a critical section. Thus, the issue such as
'POSSIBLE FOR TWO CPUs TO HOLD A CRITICAL SECTION' could be resolved.
- Fix nxsched_resume_scheduler() so that it does not call spin_clrbit()
if a CPU does not hold a g_cpu_irqset
- Fix nxtask_exit() so that it acquires g_cpu_irqlock
- Update TODO
Impact:
- All SMP implementations
Testing:
- Tested with smp, ostest with the following configurations
- Tested with spresense:wifi_smp (NCPUS=2,4)
- Tested with sabre-6quad:smp (QEMU, dev board)
- Tested with maix-bit:smp (QEMU)
- Tested with esp32-core:smp (QEMU)
- Tested with lc823450-xgevk:rndis
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-10 08:33:42 +01:00
Abdelatif Guettouche
5d7428a385
arch/xtensa: Fix alignement when coloring and checking the stacks.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-09 09:44:04 -03:00
Abdelatif Guettouche
7075c98978
arch/xtensa: Add a pseudo save area to be able to backtrace from
...
interrupts
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-09 09:44:04 -03:00
Abdelatif Guettouche
368d21a0b9
arch/xtensa/src/common/xtensa_context.S: Name A3 register the usual way.
...
i.e. a3 instead of r3.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-09 09:44:04 -03:00
Abdelatif Guettouche
5f9d9ba44c
arch/xtensa/src/common/xtensa_context.S: Don't save CALL0 ABI
...
callee-saved registers.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-09 09:44:04 -03:00
Abdelatif Guettouche
716a29ebeb
arch/xtensa/src/common/xtensa_backtrace.S: Update the comments to show
...
the functions in play during the backtrace.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-09 09:44:04 -03:00
YAMAMOTO Takashi
58fdaa5c2d
arch/xtensa/src/esp32/esp32_wifi_adapter.c: Fix a syslog format
2020-12-05 08:13:32 -06:00
Dong Heng
3bb9a42c6b
xtensa/esp32: Refactor ESP32 Wi-Fi driver
2020-12-04 09:39:11 -03:00
Alan C. Assis
3865960b89
esp32/esp32-core: Fix #ifdef warning and update MM_SECTIONS
2020-12-01 21:36:07 +01:00
Abdelatif Guettouche
298e1ddebf
arch/xtensa/src/common: Don't include ESP32 files directly, include them
...
from the chip simlink.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-28 10:24:12 -03:00
Abdelatif Guettouche
967fbebcb9
arch/xtensa: Fix stack's alignment
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-28 10:24:12 -03:00
chao.an
32ba194372
style/code: remove unnecessary trailing whitespace
...
N/A
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:30 +01:00
chao.an
049c991d28
style/Kconfig: remove unnecessary trailing whitespace
...
N/A
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:30 +01:00
chao.an
c56785bd0d
style/Makefile: remove unnecessary trailing whitespace
...
N/A
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:30 +01:00
chenwen
cb8d267230
xtensa/esp32: Announce the power management state change to feed watchdog
2020-11-25 10:53:05 -03:00
chenwen
2991418b2e
xtensa/esp32: keep cpu clock while configured cpu clock is consistent with the default
2020-11-25 10:53:05 -03:00
chenwen
39322e1158
xtensa/esp32: Get CPU frequency from the rtc register
2020-11-25 10:53:05 -03:00
chenwen
1847a67e05
xtensa/esp32: Add sleep reject reasons
2020-11-25 10:53:05 -03:00
chenwen
5c5e0494f3
xtensa/esp32: Keep VDDSDIO power on if PSRAM is enabled
2020-11-25 10:53:05 -03:00
Masayuki Ishikawa
b237748f50
Revert "arch: xtensa: Fix the pause handler for SMP"
...
This reverts commit 1914aac05f
.
2020-11-25 00:02:37 +01:00
YAMAMOTO Takashi
a24f66f31f
arch/xtensa/src/esp32/esp32_spi.c: Fix a syslog format
2020-11-22 19:01:05 -08:00
YAMAMOTO Takashi
2aced358a8
arch/xtensa/src/esp32/esp32_wtd_lowerhalf.c: Fix a syslog format
2020-11-22 19:01:05 -08:00
Alan C. Assis
31c14726d5
Replace all assert() with DEBUGASSERT()
2020-11-22 07:43:04 -08:00
Alan C. Assis
3352d3863c
esp32_himem: Fix issue that was preventing to map all free memory
2020-11-22 07:43:04 -08:00
Matias N
d5b6ec450f
Parallelize depend file generation
2020-11-22 09:02:59 -03:00
Abdelatif Guettouche
fc5874ad75
arch/xtensa/src/common/xtensa_createstack.c: Fix stack alignement.
...
The required stack alignement is 16 bytes.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-21 11:31:46 -03:00
Abdelatif Guettouche
56198992e5
arch/xtensa/src/common/xtensa_windowspill.S: Remove the #if 0 to include
...
the spill function. It's now needed.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-21 11:31:46 -03:00
Abdelatif Guettouche
f80ed10f97
arch/xtensa/src/esp32/chip_memory.h: Chip implementation of memory test
...
functions needed by the arch.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-21 11:31:46 -03:00
Abdelatif Guettouche
9d28687b6f
arch/xtensa: Print backtrace on assertions.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-21 11:31:46 -03:00
Masayuki Ishikawa
1914aac05f
arch: xtensa: Fix the pause handler for SMP
...
Summary:
- Apply the same logic added to cxd56_cpupause.c
Impact:
- SMP only
Testing:
- Tested with esp32-core:smp (QEMU)
- Run smp and ostest
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-20 00:49:25 -08:00
Abdelatif Guettouche
79b07e6c94
arch/xtensa/src/esp32/esp32_gpio.c: Fix GPIO IRQ assert condition.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-19 07:38:59 -08:00
Alan C. Assis
50e1a49c6e
Fix the SPIRAM_BANKSWITCH that was defined incorrectly
2020-11-18 22:21:53 +01:00
Alan C. Assis
f09d103528
xtensa/esp32: Add high memory support to work with PSRAM
2020-11-18 22:21:53 +01:00
Abdelatif Guettouche
2d7e063eb0
arch/xtensa/src/esp32/esp32_tim.c: Fix build when debug is enabled.
...
A non-existent variable was used.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-17 18:46:06 -08:00
YAMAMOTO Takashi
95a3db7629
arch/xtensa/src/esp32/esp32_wifi_adapter.c: Fix a type mismatch
2020-11-16 08:29:00 -08:00
YAMAMOTO Takashi
dbb81dfd5d
arch/xtensa/src/esp32/esp32_wifi_adapter.c: Fix a printf format
2020-11-16 08:29:00 -08:00
Sara Souza
e6b6f06d22
xtensa/esp32: added support to automonitor by capture
2020-11-13 13:01:40 -03:00
Dong Heng
bfb5214ef8
xtensa/esp32: Add SPI Flash hardware encryption I/O support
2020-11-13 08:37:59 +01:00
Sara Souza
b9d44017cf
xtensa/esp32: Watchdog support (MWDTs)
2020-11-08 13:05:24 -03:00
Abdelatif Guettouche
2ac2ce55d2
arch/xtensa/src/esp32/esp32_allocateheap.c: Fix the memory regions with
...
regards to the data used by the ROM.
Static alloaction sections should end at the begining of the ROM data.
The rest of memory (End of ROM data --> End of DRAM) is added to the
heap.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-06 18:36:41 -03:00
Alan C. Assis
2f612a2077
xtensa/esp32: Move #if defined(SPIRAM) to inside function
2020-11-06 16:19:48 +01:00
Alan C. Assis
d11f02d772
xtensa/esp32: Fix remaining SEPARATE typo
2020-11-06 16:19:48 +01:00
Alan C. Assis
6c37d9ff80
xtensa/esp32: Avoid init PSRAM when SPIRAM is not enabled
2020-11-06 16:19:48 +01:00
Dong Heng
483b145f3b
xtensa/esp32: Fix rt-timer issues
...
1. function "stop" should really stop repeat timer
2. delete timer really in rt-timer task to avoid resource being broken
3. timer triggers when stopping/deleting it and skip it in ISR
2020-11-04 09:24:59 -03:00
Dong Heng
b54f0edff4
xtensa/esp32: Add Partition and OTA device
2020-11-03 21:54:07 +01:00
Dong Heng
c90697f193
xtensa/esp32: SPI Flash driver uses global sem for all MTD
...
Because all MTDs operate the main SPI Flash, so not only MTD internal
function should be mutex, but also MTDs should be mutex.
2020-11-03 09:04:02 -03:00
Juha Niskanen
a01a01ab45
arch: spi: fix typos and run nxstyle
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-31 10:40:41 -07:00
Dong Heng
a12a79fdb3
xtensa/esp32: Fix SPI master DMA RX buffer memcpy size error
2020-10-29 11:51:05 +01:00
Dong Heng
d86fd84a8e
xtensa/esp32: Add real-time timer support for WiFi
2020-10-27 10:36:34 -03:00
Abdelatif Guettouche
58655d1efd
arch/xtensa/src/esp32: SMP case of interruptstack.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-27 07:44:20 +09:00
Abdelatif Guettouche
c97d11aa7b
arch/xtensa: Add the optional interrupt stack.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-27 07:44:20 +09:00
Abdelatif Guettouche
9b98f20969
arch/xtensa: Fix the naming of the internal heap functions. They should
...
be prefixed by xtensa_ instead of up_.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
5ac5655fa4
arch/xtensa/src/esp32/esp32_spi&spiflash: Free the correct buffer.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
0182e6e8bb
arch/xtensa/src/commin/xtensa_usestack&createstack.c: Set the alignment
...
to be 4 bytes.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
172896728f
arch/xtensa/src/esp32/esp32_spi.c: Instead of returning with no error
...
code, assert the return of the imm_malloc function.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
2fa5d65355
arch/xtensa/src/common: Refactor the mm_ macros into a separate file.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
f0ae1dd54a
arch/xtensa/src/esp32: Fix PR #1958 nxstyle issues.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
7db8b920ff
arch/xtensa/src/esp32/hardware: PIN_CTRL was defined twice.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
0ba0a3a092
arch/xtensa/src/esp32/hardware/esp32_soc.h: Lowercase hex value
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
b6429a50d7
arch/xtensa/src/esp32/esp32_allocateheap.c: Delete a preprocessor
...
warning that's not relevant anymore.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
1b12d20225
arch/xtensa/src/esp32/esp32_spiflash.c&esp32_spi.c: Allocate a buffer from DRAM
...
when the given buffer is from PSRAM.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
7ac5f7a35b
arch/xtensa/src/esp32: Add a PROCFS entry for the internal memory
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
a1318926b4
arch/xtensa/esp32: Allow internal drivers and tasks' stack to be
...
allocated in an internal heap.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Yoshinori Sugino
3ac90fca79
Remove tabs and spaces at the end of lines
2020-10-24 09:38:21 +01:00
YAMAMOTO Takashi
89c9855d7b
esp32: Fix a few #endif comments
2020-10-20 18:50:28 +08:00
Xiang Xiao
eb4121ce38
Change all 'Nuttx' to 'NuttX'
...
Unify the naming convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
Juha Niskanen
94f0f55911
arch: serial: fix all TCGETS retrieving zero baud rate
...
cfsetispeed() now stores baud rate to c_cflag member of
struct termios, so it must not be overridden later on.
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-20 14:43:19 +08:00
YAMAMOTO Takashi
60a6d9cfe5
arch/xtensa/src/esp32/esp32_wlan.c: Fix an unused var warning
...
chip/esp32_wlan.c: In function 'esp_ioctl':
chip/esp32_wlan.c:1262:30: warning: unused variable 'req' [-Wunused-variable]
struct mii_ioctl_notify_s *req;
^~~
2020-10-19 21:06:07 -07:00
chenwen
67c0af650f
xtensa/esp32: Add power management of deep-sleep
2020-10-17 19:38:14 -03:00
Alan C. Assis
3108233b8a
Remove not needed esp32_caps.h
2020-10-17 20:02:43 +01:00
Alan C. Assis
b3905e1c03
Modify the PSRAM pins config to avoid duplicating the definitions
2020-10-17 20:02:43 +01:00
Alan C. Assis
e956c3d1d3
Fix warnings and remove not used function
2020-10-17 20:02:43 +01:00
Dong Heng
a0b84ae53e
xtensa/esp32: Add ESP32 WiFi adapter and driver
2020-10-17 22:46:27 +09:00
Abdelatif Guettouche
0345b1edf7
arch/xtensa/src/esp32/Make.defs: Download Espressif's Wireless-3rdparty
...
library.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-17 22:46:27 +09:00
Abdelatif Guettouche
609a5fa4f0
arch/: Add the ARCH_SRC directory to the context and clean_context
...
targets
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-17 22:46:27 +09:00
Abdelatif Guettouche
286d947caf
arch/xtensa: Fix some alingments and typos in assembly code.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-11 00:53:38 +08:00
Abdelatif Guettouche
20f701f2ec
arch/xtensa/src/common/xtensa.h: Include sys/types.h to have a size_t
...
definition. Otherwise the build would fail ifSTACK_COLORATION is
enabled.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-10 00:01:17 +08:00
Abdelatif Guettouche
605a49e9af
arch/xtensa/src/esp/esp32/esp32_gpio.c: Fix the function's mask test
...
condition and the functions' values.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-08 09:28:53 +09:00
Abdelatif Guettouche
0fdf9c7368
arch/xtensa/src/esp32/esp32_psram.c: Adapt configgpio to the latest
...
change.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-08 09:28:53 +09:00
Masayuki Ishikawa
6232e7f84e
arch: esp32: Fix crash on startup
...
Summary:
- This commit fixes crash on startup introduced by commit 232aa62f03
Impact:
- Affects all use cases for esp32
Testing:
- Tested with esp32-core:smp with QEMU
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-07 18:43:13 -03:00
Sara Souza
0faf861256
xtensa/esp32: Added Timer Support
2020-10-07 14:12:22 -03:00
Alan C. Assis
232aa62f03
Add support to PSRAM using SPIRAM interface
2020-10-07 16:55:34 +01:00
Abdelatif Guettouche
d1225f3110
arch/xtensa/src/esp32: Use the same function numbering as the TRM.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:52:04 -03:00
Abdelatif Guettouche
5593683552
arch/xtensa/src/esp32/esp32_gpio.c: When configuring a pin pad, set the
...
function first, if no function was assigned, fall back to the GPIO
function.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:52:04 -03:00
Abdelatif Guettouche
564237a602
arch/xtensa/src/esp32/esp32_gpio: Function "SPECIAL" doesn't exist. All
...
pads go through the same GPIO matrix to select one of the 6 possible functions.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:52:04 -03:00
Abdelatif Guettouche
efb2fd5e4b
arch/xtensa/src/esp32/esp32_gpio.c: GPIO20 is not available.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:52:04 -03:00
Abdelatif Guettouche
caa945cb24
arch/xtensa/src/esp32: Add a way to retrieve reset cause.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:51:47 -03:00
Abdelatif Guettouche
c20c8c6dd5
arch/xtensa/esp32: Implement system reset.
...
Both CPUs are soft-reset with a call to board_reset. This is actually a
Core Reset, so both cores and all registers are reset. The only
exception is RTC.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:51:47 -03:00
Abdelatif Guettouche
2e4ec442ad
arch/xtensa/src/esp32/esp32_intdecode.c: Don't clear A2, the mask
...
argument is passed in that register
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 07:47:06 +09:00
saramonteiro
a562fba971
ESP32: Fixed the type of cpuint variables in esp32_emac.c esp32_i2c.c esp32_spi.c esp32_spi_slave.c
2020-10-02 09:57:56 -07:00
Abdelatif Guettouche
62732dd6b8
arch/xtensa/src/esp32/esp32_gpio.c: ESP32_NIRQ_GPIO was used instead of
...
ESP32_NGPIOS
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-02 11:42:49 -03:00
Abdelatif Guettouche
844f39fc67
arch/xtensa/src/esp32/esp32_gpio.c: Change the logic of setting the ENA
...
bits so that the call to up_cpu_index is only performed when SMP is
enabled.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-02 11:42:49 -03:00
Abdelatif Guettouche
769d68a762
arch/xtensa: Fix some typos and correct some comments.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-30 13:55:28 -03:00