Hello,
I just started working on TMS570LS3137. I'm trying to use the Cyclic Redundancy Check (CRC) Controller module. I think I wrote the code appropriately, but I'm having problems with the function's output.
I added code as attachment. Is there an error in the code ?
Apart from this, is there any information you can give about CRC other than the Reference Manual? Also can we use CRC module peripherally?
Best Regards,
Furkan
/* 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 */