xud6的笔记本

CC1310 Sensor Controller 变更RTC事件时序

 •  Filed under MCU, TI, CC1310

在delay时间后以interval的周期运行Sensor Controller的RTC事件

#include DeviceFamily_constructPath(inc/hw_aon_rtc.h)

uint32_t scifOsalEnterCriticalSection(void);
void scifOsalLeaveCriticalSection(uint32_t key);

//delay应大于8
void SceRTCDelay(uint32_t delay,uint32_t interval){
    uint32_t key, sec, subsec,startTime;
    /* disable hwi to make sure startTime won't become past */
    key = scifOsalEnterCriticalSection();
    /* read current rtc value */
    sec = HWREG(AON_RTC_BASE + AON_RTC_O_SEC);
    subsec = HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC);
    /* calc next start time */
    startTime = ((sec << 16) | (subsec >> 16)) + delay;
    /* update the RTC cannel config */
    scifStartRtcTicks(startTime, interval);
    scifOsalLeaveCriticalSection(key);
}

TI CC1310 TRNG使用

 •  Filed under MCU, TI, CC1310

头文件

#include DeviceFamily_constructPath(driverlib/trng.h)

初始化

Power_setDependency(PowerCC26XX_PERIPH_TRNG);
TRNGEnable();
while (!(TRNGStatusGet() & TRNG_NUMBER_READY))
{
    //wait for random number generator
}

读取低32位

TRNGNumberGet(TRNG_LOW_WORD)

判断是否已经启动

if (0 == (HWREG(TRNG_BASE + TRNG_O_CTL) & TRNG_CTL_TRNG_EN))
{
    //trng is disable
}

关闭

TRNGDisable();
Power_releaseDependency(PowerCC26XX_PERIPH_TRNG);

centos 7 firewalld audit and report

 • 
rule port port="12082" protocol="tcp" log prefix="proxy-port-activity" limit value="1/m" audit accept

ausearch -m NETFILTER_PKT | aureport -h --summary

Windows Server 2012/2016 RDS 部署使用非443端口远程桌面网关

 • 

在管理终端powershell执行以下命令

Set-RDSessionCollectionConfiguration –CollectionName "<Your Session  Collectionnam>" -CustomRdpProperty "  gatewayhostname:s:<RDGW-FQDN>:<yourport>" -ConnectionBroker  <Your RD ConnectionBroker>
<Your Session  Collectionnam>    远程桌面集合名称
<RDGW-FQDN>                      远程桌面网关FQDN
<yourport>                       远程桌面网关端口
<Your RD ConnectionBroker>       远程桌面会话主机名称

Windows Server Core 配置 Windows Internal Database 内存限制

 •  Filed under windows, wid, sql server
安装Microsoft ODBC Driver 13.1 for SQL Server

http://go.microsoft.com/fwlink/?LinkId=825608

安装Microsoft Command Line Utilities 13.1 for SQL Server

https://www.microsoft.com/en-us/download/details.aspx?id=53591

执行sqlcmd
cd c:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn
SQLCMD.EXE -E -S \\.\pipe\Microsoft##WID\tsql\query
显示高级选项
exec sp_configure 'show advanced option', '1';
reconfigure;
查询当前设置(max server memory行)
exec sp_configure;
go
设置内存限制为(2048MB)
exec sp_configure 'max server memory', 2048;
reconfigure with override;
go
退出
quit
重启wid服务