TI中文支持网
TI专业的中文技术问题搜集分享网站

IWR6843: UART CAN not receive when Low Power Demo Mode

Part Number:IWR6843

I try Overview of 68xx Low Power Demo

But when Enter Low Power Mode (VCLK to 40M , RF OFF , APLL OFF)

UART Can not Receive data

I try reInit UART to Freq 40Mhz

But is not work

void Enter_LowPower(void)
{int32_t errCode;int32_t retVal;rlPowerSaveModeCfg_t data_rf_down;rlPowerSaveModeCfg_t data_apll_down;xWR6843_dss_clock_gate();xWR6843_mss_vclk_40M();data_rf_down.lowPwrStateTransCmd = 1;retVal = rlSetPowerSaveModeConfig(RL_DEVICE_INDEX_INTERNAL_DSS_MSS, &data_rf_down);if (retVal != 0){//System_printf("RF Off Failed Err: %d\n", retVal);CLI_write("RF Off Failed Err: %d\n", retVal);return;}data_apll_down.lowPwrStateTransCmd = 3;retVal = rlSetPowerSaveModeConfig(RL_DEVICE_INDEX_INTERNAL_DSS_MSS, &data_apll_down);if (retVal != 0){//System_printf("APLL Off Failed Err: %d\n", retVal);CLI_write("APLL Off Failed Err: %d\n", retVal);return;}retVal = SOC_haltBSS(gMmwMssMCB.socHandle, &errCode);if (retVal < 0){CLI_write("SOC_haltBSS Err \r\n");}UART_ReInit_to40M();uint8_t ackData[16];memset(ackData,0x31,sizeof(ackData));ackData[14]=0x0D;ackData[15]=0x0A;UART_writePolling (gMmwMssMCB.commandUartHandle,(uint8_t*)ackData,sizeof(ackData));

}


void UART_ReInit_to40M()
{CLI_close();UART_close(gMmwMssMCB.commandUartHandle);gMmwMssMCB.commandUartHandle=NULL;UART_Params uartParams;/* Setup the default UART Parameters */UART_Params_init(&uartParams);uartParams.writeDataMode = UART_DATA_BINARY;uartParams.readDataMode = UART_DATA_BINARY;uartParams.clockFrequency = 40000000U;//(gMmwMssMCB.cfg.platformCfg.sysClockFrequency)/5;uartParams.baudRate = gMmwMssMCB.cfg.platformCfg.commandBaudRate;uartParams.isPinMuxDone = 1;/* Open the UART Instance */gMmwMssMCB.commandUartHandle = UART_open(0, &uartParams);if (gMmwMssMCB.commandUartHandle == NULL){MmwDemo_debugAssert(0);return;}/* Setup the default UART Parameters */UART_Params_init(&uartParams);uartParams.writeDataMode = UART_DATA_BINARY;uartParams.readDataMode = UART_DATA_BINARY;uartParams.clockFrequency = 40000000U;//gMmwMssMCB.cfg.platformCfg.sysClockFrequency/5;uartParams.baudRate= gMmwMssMCB.cfg.platformCfg.loggingBaudRate;uartParams.isPinMuxDone= 1U;uartParams.readEcho= UART_ECHO_OFF;if (gMmwMssMCB.loggingUartHandle == NULL){System_printf("Error: Unable to open the Logging UART Instance\n");MmwDemo_debugAssert(0);return;}cliCfg.cliBanner=NULL;CLI_open (&cliCfg);

}

Chris Meng:

你好,

请问你使用的是哪个版本toolbox里的低功耗demo?从下面的论坛讨论看是可以正常工作的。

https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1029690/iwr6843-chirp-configuration-for-68xx-low-power-demo-in-industrial-toolbox-4-8

,

Frank Lin:

Hi Chris

低功耗Demo是可以工作的 (进入&离开) ,我要尝试的是当进入低功耗的模式时,UART 仍要可以正常接收及发送资料

你能提供我什么建议吗?

,

Chris Meng:

你好,

在low power demo的user guide里,你可以找到下面的信息,所以当mss时钟变为40Mhz的时候,UART是不能正常工作的。你可以尝试不要降低mss的时钟(保持200Mhz),当然这样功耗会增加一些。

/mmwave_industrial_toolbox_4_9_0/labs/out_of_box_demo/68xx_low_power_demo/docs/68xx_low_power_demo_user_guide.html

Clock Gate the Master Sub-System (MSS)

This component slows MSS_VCLK by sourcing from the 40 MHz external crystal instead of the 200 MHz APLL. While saving significant power, this renders a majority of device peripherals non-operable. (Notable exceptions to this are the CAN_FD and QSPI peripherals which run on slower clock speeds.) One must also ungate the MSS_VCLK in order to resume normal device operation. While in this mode running timers and sequences will be slowed by a factor of 5.

This is achieved by calling the xWR6843_mss_vclk_40M() function in the custom libsleep_xwr68xx.aer4f library and can be reversed by calling xWR6843_mss_vclk_200M().

,

Frank Lin:

Hi Chris

我尝试过重新初始化UART ,使其clockFrequency 设为 200MHZ or 40MHZ, 如附的code , UART_ReInit_to40M但它仍无法正常工作

所以我能否肯定的说 当进入LOW Power Mode 后, 无论是否重新初始化UART or 更改UART 的uartParams.clockFrequency 为40Mhz or 200Mhz ,UART 仍无法工作

 

,

Chris Meng:

你好,

我的意思是修改代码不要降低MSS的频率,也就是不要调用 xWR6843_mss_vclk_40M() ,你有尝试过么?

,

Frank Lin:

Hi Chris

在LowPowerMode 下不调用 xWR6843_mss_vclk_40M() UART 运作非常良好

但这样功耗无法达到需求

主要是希望雷达在LowPower模式下时,若发生异常,可以透过 UART 通知上位机

TI 有做过类似的方式或是有什么建议可以提供吗?

,

Chris Meng:

你好,

建议使用CAN_FD。

Notable exceptions to this are the CAN_FD and QSPI peripherals which run on slower clock speeds

,

Frank Lin:

Hi Chirs

我已经解决了这个问题由于我没考虑到的UART 频率须为BaudRate的16倍导致我要设定的BaudRate远大于VCLK 40M能处理的范围

赞(0)
未经允许不得转载:TI中文支持网 » IWR6843: UART CAN not receive when Low Power Demo Mode
分享到: 更多 (0)