Statistics: Posted by eyal — Fri Apr 17, 2015 8:25 am
Statistics: Posted by ESP_Faye — Thu Apr 16, 2015 4:11 pm
Statistics: Posted by eyal — Wed Apr 15, 2015 4:32 pm
Statistics: Posted by ESP_Faye — Wed Apr 15, 2015 10:01 am
Code:
static int misc_rtc_mem_test8(lua_State* L) /* DEBUG */
{
uint8 rd[32];
uint32 wr[2] = {
0x12345678,
0x87654321
};
uint32_t nret = 0;
system_rtc_mem_write(64, wr, 8);
system_rtc_mem_read(64, rd, 4) ;
lua_pushinteger( L, (uint32_t)*(uint32 *)rd); ++nret;
// system_rtc_mem_read(65, rd, 4);
// lua_pushinteger( L, (uint32_t)*(uint32 *)rd); ++nret;
system_rtc_mem_read(64, rd, 8);
lua_pushinteger( L, (uint32_t)*(uint32 *)rd); ++nret;
lua_pushinteger( L, (uint32_t)*(uint32 *)(rd + 4)); ++nret;
return nret;
}
Code:
> a,b,c=misc.rtc_mem_test8()print (string.format("64 %x, 64 %x, 65 %x", a, b, c))
64 12345678, 64 12345678, 65 87654321
> a,b,c=misc.rtc_mem_test4()print (string.format("64 x%x, 64 x%x, 65 x%x", a, b, c))
64 x12345678, 64 x12345678, 65 x87654321
>
Code:
static int misc_rtc_mem_test32(lua_State* L) /* DEBUG */
{
uint8 rd[32];
uint32 wr[8] = {
0x11111111,
0x22222222,
0x33333333,
0x44444444,
0x55555555,
0x66666666,
0x77777777,
0x88888888
};
uint32_t nret = 0;
system_rtc_mem_write(64, wr, 32);
system_rtc_mem_read(64, rd, 4) ;
lua_pushinteger( L, (uint32_t)*(uint32 *)rd); ++nret;
system_rtc_mem_read(68, rd, 4);
lua_pushinteger( L, (uint32_t)*(uint32 *)rd); ++nret;
system_rtc_mem_read(64, rd, 32);
lua_pushinteger( L, (uint32_t)*(uint32 *)rd); ++nret;
lua_pushinteger( L, (uint32_t)*(uint32 *)(rd + 16)); ++nret;
return nret;
}
Code:
a,b,c=misc.rtc_mem_test8()print (string.format("64 x%x, 64 x%x, 65 x%x", a, b, c))
64 x12345678, 64 x12345678, 65 x87654321
> a,b,c,d=misc.rtc_mem_test32()print (string.format("64 x%x, 68 x%x, 64 x%x, 68 x%x", a, b, c,d))
64 x11111111, 68 x22222222, 64 x11111111, 68 x55555555
Code:
#include <xtensa/simcall-fcntl.h>
Code:
#if __XTENSA_WINDOWED_ABI__
Statistics: Posted by eyal — Mon Apr 13, 2015 1:22 pm
Code:
uint8 rd[32];
uint32 wr[2] = {
0x12345678,
0x87654321
};
system_rtc_mem_write(64, wr, 8);
system_rtc_mem_read(64, rd, 4);
os_printf("64 %x\n", *(uint32 *)rd);
system_rtc_mem_read(65, rd, 4);
os_printf("65 %x\n", *(uint32 *)rd);
system_rtc_mem_read(64, rd, 8);
os_printf("64 %x, 65 %x\n", *(uint32 *)rd, *(uint32 *)(rd + 4));
Statistics: Posted by jackon — Mon Apr 13, 2015 10:00 am
Code:
system_rtc_mem_read (64, p, 4)
Code:
system_rtc_mem_read (65, p, 4)
Code:
system_rtc_mem_read (64, p, 8)
Code:
system_rtc_mem_read (64, p, 4)
system_rtc_mem_read (68, p+4, 4)
Statistics: Posted by eyal — Fri Apr 10, 2015 10:19 pm