_csl_pscmddsplocalreset.c

来自「TI达芬奇dm644x各硬件模块测试代码」· C语言 代码 · 共 28 行

C
28
字号
#include <csl_pscAux.h>

#pragma CODE_SECTION (CSL_pscDspLocalReset, ".text:csl_section:psc");


CSL_Status  CSL_pscDspLocalReset(

    CSL_PscHandle                         hPsc,
    CSL_PscHwControlCmd                   lResetCmd
	){

  CSL_PscRegsOvly pscRegs = hPsc->regs;

  if( lResetCmd == CSL_PSC_CMD_DSP_LRESET_DEASSERT ){
    /* Set MDCTL39.LRST to 0x1 to de-assert DSP reset */
    CSL_FINS(pscRegs->MDCTL[39], PSC_MDCTL_LRST, CSL_PSC_MDCTL_LRST_DEASSERT );
/*Lawrence:  Not sure if we must delay for some time before accessing the DSP (e.g. interrupting the DSP). See LRSTDONE bit. */
  }else{      /* if lResetCmd == CSL_PLLC_CMD_DSP_LRESET_ASSERT */ /*Law consider using elseif here */
    /* Set MDCTL39.LRST to 0x0 to assert DSP reset */
    CSL_FINS(pscRegs->MDCTL[39], PSC_MDCTL_LRST, CSL_PSC_MDCTL_LRST_ASSERT    );
/*Lawrence:  Not sure if we must delay for some time in between assert and de-assert. */
  } 
    

  return (CSL_SOK);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?