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.

[参考译文] CC3220:使用硬件 CRC?

Guru**** 2555630 points
Other Parts Discussed in Thread: CC3200

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

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/755538/cc3220-using-hardware-crc

器件型号:CC3220

您好!  

我找到了硬件 CRC 驱动程序(在错误校正模块中?) 并希望在我的项目中使用它。 根据 driverlib/crc.c 中的注释、配置需要一个基地址:

//! 使用 EC 模块设置 CRC 功能的配置。
//!
//! \param ui32Base 是 EC 模块的基址。
//! \param ui32CRCConfig 是 CRC 引擎的配置。

我似乎无法在任何位置找到基址、但我确实在 hw_memmap.h 中找到了基址列表

CC3220上是否提供硬件 CRC? 我也看不到任何 CRC 示例代码,尽管论坛上的消息表示硬件和示例代码*should *可用:

TTPs://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/439542

任何帮助都是伟大的。

谢谢!

Russ

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

    尊敬的 Russ:

    是的、CRC 外设在 CC3220上可用、与在 CC3200上相同。 CRC 示例可在 CC3200 SDK 中找到(文章中的链接)。 CC3220 SDK 不是使用 CRC 外设的示例。 我在 CC3220中使用此代码来计算 CCITT CRC:

    第一步、您需要为 dthe 外设启用时钟:

    #include "ti/devices/cc32xx/driverlib/prcm.h"
    #include "ti/devices/cc32xx/driverlib/rom.h"
    #include "ti/devices/cc32xx/driverlib/rom_map.h"
    
    map_prcmPeripheralClkEnable (prcm_dthe、prcm_run_mode_clk); 

    之后、您可以计算 CRC:

    #include 
    
    #include "ti/devices/cc32xx/inc/hw_memmap.h"
    #include "ti/devices/cc32xx/driverlib/crc.h"
    #include "ti/devices/cc32xx/driverlib/rom.h"
    #include "ti/devices/cc32xx/driverlib/rom_map.h"
    
    短整型 CRCc /无符号
    
    宽度 CRCc
    (t)/ t 计数-无符号整型 CRCtrc /字符/无符号 CRC :16位
    //- poly :1021 (x^16 + x^12 + x^5 + 1)
    //-初始化 :0000
    //-反映输入字节 :错误
    //-反映输出 CRC :False
    //-输出 CRC 的 XOR 常量:0000
    MAP_CRCConfigSet (dto_BASE、CRC_CFG_INIT_0 |
    CRC_CFG_SIZE 8位|
    CRC_CFG_TYPE_P1021);
    //计算 CRC
    返回 MAP_CRCDataProcess (dme_base、ptr、count、crc_CFG_size_8bit);
    } 


    1月

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    谢谢! 我让它"工作"、然后意识到我的输入数据是坏的(愚蠢的字节序!)。 出于某种原因、我需要在 prcm.h 中包含"ti/devices/cc32xx/inc/hw_type.h"?
    --- a/third_party/ti/simplelink_cc32xx_sdk_2_30_00_05/source/ti/devices/cc32xx/driverlib/prcm.h
    ++ b/third_party/ti/simplelink_cc32xx_sdk_2_30_00_05/source/ti/devices/cc32xx/driverlib/prcm.h
    @@-41、6 +41、7 @@
     #ifndef __PRCM_H__
     #define __PRCM_H__
    +#include "ti/devices/cc32xx/inc/hw_types.h"
     //
     //
     //如果使用 C++编译器进行编译,请在此标头中进行所有定义
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    很高兴听到您的问题得到解决。 是的、我在上面的示例中可能缺少一些 include。 我从大得多的代码复制了此示例代码。

    1月