Forums
5
Product Forums
25
General Purpose MicrocontrollersGeneral Purpose Microcontrollers
i.MX Forumsi.MX Forums
QorIQ Processing PlatformsQorIQ Processing Platforms
Identification and SecurityIdentification and Security
Power ManagementPower Management
Wireless ConnectivityWireless Connectivity
RFID / NFCRFID / NFC
Advanced AnalogAdvanced Analog
MCX Microcontrollers
S32G
S32K
S32V
MPC5xxx
Other NXP Products
S12 / MagniV Microcontrollers
Powertrain and Electrification Analog Drivers
Sensors
Vybrid Processors
Digital Signal Controllers
8-bit Microcontrollers
ColdFire/68K Microcontrollers and Processors
PowerQUICC Processors
OSBDM and TBDML
S32M
S32Z/E
Solution Forums
4
Smart Home
Power & Energy
Mobile Robotics
Motor Control
Software Forums
16
MCUXpresso Software and ToolsMCUXpresso Software and Tools
CodeWarriorCodeWarrior
MQX Software SolutionsMQX Software Solutions
Model-Based Design Toolbox (MBDT)Model-Based Design Toolbox (MBDT)
FreeMASTER
eIQ Machine Learning Software
Embedded Software and Tools Clinic
S32 SDK
S32 Design Studio
GUI Guider
Zephyr Project
Voice Technology
Application Software Packs
Secure Provisioning SDK (SPSDK)
Processor Expert Software
Generative AI & LLMs
Topics
8
Mobile Robotics - Drones and RoversMobile Robotics - Drones and Rovers
NXP Training ContentNXP Training Content
University ProgramsUniversity Programs
Rapid IoT
NXP Designs
SafeAssure-Community
OSS Security & Maintenance
Using Our Community
Cloud Lab Forums
2
Hardware
Cloud Lab Knowledge Base
Knowledge Bases
21
ARM Microcontrollers
7
K32 L Series Microcontrollers Knowledge Base
Kinetis Microcontrollers Knowledge Base
Kinetis Motor Suite Knowledge Base
LPC FAQs Knowledge Base
LPC Microcontrollers Knowledge Base
LPCware Archive Content
MCX Microcontrollers Knowledge Base
i.MX Processors
5
i.MX RT Crossover MCUs Knowledge Base
i.MX Graphics Knowledge Base
i.MX Processors Knowledge Base
i.MX Solutions Knowledge Base
i.MX 한국어 커뮤니티 Knowledge Base
Identification and Security
3
EdgeLock 2GO Secure Service Knowledge Base
Secure Authentication Knowledge Base
Smart Cards and Secure Element Knowledge Base
Model-Based Design Toolbox (MBDT)
0
QorIQ Processing Platforms
0
S32 Automotive Processing Platform
0
Wireless Connectivity
3
Other Connectivity Knowledge Base
Wi-Fi® + Bluetooth® + 802.15.4 Knowledge Base
Wireless Connectivity Knowledge Base
CodeWarrior
0
MCUXpresso Suite of Software and Tools
0
MQX Software Solutions
0
RFID / NFC
0
Advanced Analog
2
High Performance Analog Front End Interfaces
In Vehicle Networking
8-bit Microcontrollers Knowledge Base
Motor Control and Smart Energy Knowledge Base
Power Management Knowledge Base
FRDM Training Hub
MCUXpresso Training Hub
Zephyr Project Knowledge Base
Generative AI & LLMs Knowledge Base
Embedded World NXP Connectivity Workshop Knowledge Base
Hands-on workshop in Japan (ハンズオン・ワークショップ [日本]) Knowledge Base
NXP Tech Blogs
1
NXP Tech Blog
Ideas
Blogs
论坛
知识库
观点
博文
NXP.COM
登录
帮助
语言
英语(美国) | English (US)
日本語 | Japanese
中文 | Chinese (Simplified)
Home
:
通用微控制器
:
LPC微控制器
:
LPC800的CRC在各种配置下是如何计算的?求详解。
LPC800的CRC在各种配置下是如何计算的?求详解。
整个社区
此类别
此讨论板
知识库
用户
产品
取消
开启建议
自动建议可通过在您键入时建议可能的匹配,而快速缩小您的搜索结果范围。
显示结果
显示
仅
|
搜索替代
您的意思是:
选项
订阅 RSS 提要
将主题标记为新
将主题标记为已读
为当前用户浮动此 主题
书签
订阅
禁止
打印机友好页面
LPC800的CRC在各种配置下是如何计算的?求详解。
06-15-2016
11:18 AM
870 次查看
lpcware
NXP Employee
标记为新
加注书签
订阅
禁止
订阅 RSS 提要
高亮显示
打印
报告不当内容
Content originally posted in LPCWare by hhxianzi on Sat Aug 31 04:57:03 CDT 2013
如题,在周立功网站上下载的LPC800例程里的CRC部分,代码如下:
/*********************************************************************************************************
** Function name: CRCInit
** Descriptions: CRC模块初始化
** input parameters: 无
** output parameters: 无
** Returned value: 无
*********************************************************************************************************/
void CRCInit (void)
{
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 13); /* 打开CRC模块时钟 */
LPC_CRC->MODE = ((1 << 0) | /* 多项式选择为 CRC_16 */
(1 << 2) | /* IN_DATA 位序反转:YES */
(0 << 3) | /* IN_DATA 对1取补:NO */
(1 << 4) | /* CRC_SUM 位序反转:YES */
(0 << 5)); /* CRC_SUM 对1取补:NO */
LPC_CRC->SEED = 0x00000000; /* 种子值:0x0000 0000 */
}
/*********************************************************************************************************
** Function name: main
** Descriptions: CRC_16 例程:
** LED连接P0.7。
** 运行程序,进行CRC_16测试,若测试通过,点亮LED,若测试失败,LED闪烁。
** input parameters: 无
** output parameters: 无
** Returned value: 无
*********************************************************************************************************/
int main (void)
{
SystemInit(); /* 初始化目标板,切勿删除 */
GPIOInit(); /* GPIO初始化 */
CRCInit();
LPC_CRC->WR_DATA_WORD = 0x3534;
if (LPC_CRC->SUM != 0xD7D6) { /* 测试失败,LED闪烁 */
……
……
其中:LPC_CRC->SUM 应该是什么值?怎么计算的?
现在我的LED一直闪烁。
标签
(1)
标签
标签:
中国用户论坛
0
项奖励
回复
所有论坛主题
前一个主题
下一个主题
1 回复
06-15-2016
11:18 AM
810 次查看
lpcware
NXP Employee
标记为新
加注书签
订阅
禁止
订阅 RSS 提要
高亮显示
打印
报告不当内容
Content originally posted in LPCWare by Irving on Mon Nov 25 20:35:32 CST 2013
[img=613x106]/zh-hans/system/files/u1296/CRC.JPG[/img]
请参照对应的CRC计算方式, 用户手册User Manual有简单的介绍! 关于CRC的详细介绍可找度娘或谷哥, 谢谢
0
项奖励
回复
发布回复