Other Parts Discussed in Thread: MSPM0G1106
Tool/software:
Hi,
I'm trying to integrate the diagnostic tests provided by TI (mspm0_diag_lib_0_90_00_01). Specifically, I'm using the example project for the LP-MSPM0G3607, as it's the closest match to the microcontroller I'm using, MSPM0G1106, for my project.
Question 1: RAM Test
In the file test_config.c, the macro SAFE_BUFFER_SIZE doesn't appear to be defined anywhere in the project hierarchy. Is it up to the user to define and use this macro, or is it supposed to be defined elsewhere in the code that isn’t included in this file?
Also, is it the programmer's responsibility to create the ".RAMsafeBuff" section via the linker command file of the project in advance for the following code to work?
/* test_config.c */
PLACE_IN_MEMORY(".RAMsafeBuff")
uint32_t safebuffer[MSPM0_DIAG_RAM_SAFE_BUFF_NUM_OF_WORDS_TO_TEST];
Question 2: FLASH Test
Similarly, is it the programmer's responsibility to create the ".FLASHTestCRC" section via the linker command file of the project in advance for the following code to work?
/* test_config.c */
PLACE_IN_MEMORY(".FLASHTestCRC")
const uint32_t FLASHTestgoldenCRC = MSPM0_DIAG_FLASH_EXPECTED_CRC;
Also, according to the following portion of the code, it looks like you are calculating the CRC over the first 16380 words (i.e., 65,520 bytes), leaving the last 4 words (i.e., 16 bytes) unincluded. Is this to store the 4-byte CRC value somewhere in that region? How and when (before flash OR after flash) was the expected CRC value 0x52A05524 calculated?
/* test_config.h */ /******************************************************************************* * FLASH Test configuration ******************************************************************************/ #define MSPM0_DIAG_FLASH_FAULT_INJECTION (MSPM0_DIAG_test_inject_fault_false) #define MSPM0_DIAG_FLASH_START_ADDR ((uint32_t *)0x00000000) #define MSPM0_DIAG_FLASH_NUM_OF_WORDS (16380) #define MSPM0_DIAG_FLASH_GOLDEN_CRC ((uint32_t *)&FLASHTestgoldenCRC) #define MSPM0_DIAG_FLASH_EXPECTED_CRC ((uint32_t)0x52A05524)
I'd appreciate any guidance on this.
Thank you,
Kyungjae Lee