This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS570LS3137:TMS570 CRC 计算

Guru**** 2524550 points
Other Parts Discussed in Thread: TMS570LS3137

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1342400/tms570ls3137-tms570-crc-calculation

器件型号:TMS570LS3137

您好!
我刚开始处理 TMS570LS3137。 我正在尝试使用循环冗余校验(CRC)控制器模块。 我认为我恰当地编写了代码、但函数的输出有问题。  

我添加了代码作为附件。 代码中是否有错误?

除此之外、除了参考手册之外、您是否可以提供任何关于 CRC 的信息? 我们还可以使用 CRC 模块外设吗?

此致、

古坎

/* USER CODE BEGIN (0) */
/* USER CODE END */

/* Include Files */

#include "sys_common.h"
#include "crc.h"
#include "reg_crc.h"
#include "rti.h"
#include "gio.h"


/* USER CODE BEGIN (1) */
#define PSA_SIGREGL1    ((crcBASE_t *)0xFE000070U)
uint64_t param1 [3] = { 1,2,3};

crcModConfig_t deneme = {
                         .mode = CRC_FULL_CPU,
                         .crc_channel = CRC_CH1,
                         .src_data_pat = param1,
                         .data_length = 3,

};
/* USER CODE END */

/** @fn void main(void)
*   @brief Application main function
*   @note This function is empty by default.
*
*   This function is called after startup.
*   The user can use this function to implement the application.
*/

/* USER CODE BEGIN (2) */
/* USER CODE END */

uint8	emacAddress[6U] = 	{0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU};
uint32 	emacPhyAddress	=	0U;
uint64 malim = 0U;


int main(void)
{
/* USER CODE BEGIN (3) */
 
  crcInit();

      

      while(1){
          
          
              crcChannelReset(crcREG, CRC_CH1);
              crcSignGen(crcREG, &deneme);
              malim = crcGetPSASig(crcREG, CRC_CH1);
              
      }

/* USER CODE END */

    return 0;
}


/* USER CODE BEGIN (4) */
/* USER CODE END */