Hello,
I wrote the code according to the flowchart in this link www.ti.com/.../spna235.pdf , but the crc value I received is not the same as the required value. My code is as follows:
#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 [2] = {1, 2};
crcModConfig_t deneme = {
.mode = CRC_FULL_CPU,
.crc_channel = CRC_CH1,
.src_data_pat = param1,
.data_length = 2,
};
crcConfig_t deneme1 = {
.mode = CRC_FULL_CPU,
.crc_channel = CRC_CH1,
.pcount = 0U,
.wdg_preload = 0U,
.pcount = 1U,
.scount =1U,
};
/* 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;
uint64 result_crc =0U;
int main(void)
{
/* USER CODE BEGIN (3) */
crcInit();
while(1){
crcChannelReset(crcREG, CRC_CH1);
crcSetConfig(crcREG,&deneme1);
crcSignGen(crcREG, &deneme);
malim = crcGetPSASig(crcREG, CRC_CH1);
}
/* USER CODE END */
return 0;
}
The data we need to get: 0x6C9E200000000000
The data I received: 0x0000000000000173
Apart from this, from which sources can I get data about the Peripheral bus operation of the crc module? The Reference Manual is not very detailed on this subject.
Best Regards,
Ata