Hi Evan, I used the crc32_32-bit_signature_calculation example as reference with a few changes, please see below: /* * ------------------------------------------- * MSP432 DriverLib - v3_21_00_05 * ------------------------------------------- * * --COPYRIGHT--,BSD,BSD * Copyright (c) 2016, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --/COPYRIGHT--*/ /******************************************************************************* * MSP432 CRC32 - CRC32 Calculation * * Description: In this example, the CRC32 module is used to calculate a CRC32 * checksum in CRC32 mode. This value is compared versus a software calculated * checksum. The idea here is to have the user use the debugger to step through * the code and observe the CRC calculation in the debugger. Note that this * code example was made to use the standard CRC32 polynomial value of * 0xCBF43926. * * MSP432P401 * ------------------ * /|\| | * | | | * --|RST | * | | * | | * | | * | | * ******************************************************************************/ #include "driverlib.h" #define CRC32_POLY 0xEDB88320 #define CRC32_INIT 0xFFFFFFFF #define SECTOR_SIZE 0x1000 /*static const uint8_t myData[9] = { 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 };*/ static uint32_t calculateCRC32(uint8_t* data, uint32_t length); uint8_t *flashPtr; int main(void) { volatile uint32_t hwCalculatedCRC, swCalculatedCRC; uint32_t ii; /* Stop WDT */ MAP_WDT_A_holdTimer(); MAP_CRC32_setSeed(CRC32_INIT, CRC32_MODE); /* Calculate CRC from the first sector 0 - 0x0FFF 4KB */ flashPtr = (uint8_t*) 0; for (ii = 0; ii > 1) ^ (CRC32_POLY & mask); } } return ~crc; } I'm only calculating the CRC for the first sector (that's where this code resides) and it worked fine for me. Could you please run this code and let me know if you're still able to reproduce your problem. Thanks, David
↧