- Tue Jan 27, 2015 1:59 am
#8293
pvvx wrote:Athena wrote:And RTC memory is 4Bytes as a count .. 64 means 64 X 4 =256 bytes..
For users - the following 512 bytes for "system area" of 256 bytes.
108*4 = 432. 0x60001048 + 432 = 0x600011F8
espconn_tcp_set_max_con write dword 0x600011FC (des_addr rtc_mem = 109), deep_sleep write 0x600011F8 (des_addr rtc_mem = 108)?
Code: Select allsint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_con(uint8 num)
{
if ((num == 0) || (num > 5)) // corrected PV` -> remot_info premot[5] -> max 5!!!
return ESPCONN_ARG;
MEMP_NUM_TCP_PCB = num;
return ESPCONN_OK;
}
ASM (liblwip.a):
espconn_tcp_set_max_con:
beqz.n a2, _38f
l32r a3, 37c ; [0x60000e00]
memw
s32i a2, a3, 0x3fc ; 0x60000e00+0x3fc = 0x600011FC
movi.n a2, 0
ret.n
_38f:
movi.n a2, -12
ret.n
lwipopts.h:
Code: Select all/**
* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
* (requires the LWIP_TCP option)
*/
#ifndef MEMP_NUM_TCP_PCB
#define MEMP_NUM_TCP_PCB (*(volatile uint32*)0x600011FC)
#endif
and more errors....
Give SDK 0.9.5. patch2! patch3! patch4! ...
There are 1KB RTC memory, addr: 0x60001000~0x600013FF.
The system_rtc_memory_write/read can operate 0x60001100~0x60001FFF, total 768B(256B+512B).
0x60001100~0x600011FF(256B) is reversed for sdk internal use, it's 'system area'. You can operate this area, but sdk uses some addresses in this area also, it may cause fatal error.
0x60001200~0x600013FF is for users.
The first param of system_rtc_memory_write/read is des_addr, range 0~191, map to 0x60001100~0x600013FF, 768B.
If you want to save your data in RTC memory, you can use last 512B.
system_rtc_memory_write/read(0, ......) will operate 0x60001100
system_rtc_memory_write/read(64, ......) will operate 0x60001200
espconn_tcp_set_max_con --- des_addr = 63 --- 0x60001100 + 63 * 4 (where does 109 come from?)
deep_sleep --- des_addr = 62 --- 0x60001100 + 62 * 4 (where does 108 come from?)
where does the address 0x60001048 come from?
You don't need to know the absolute address of RTC memory.
You use a good tool, you can use it to test again.