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.
Tool/software:
Hi Team,
we need to check the RAM Test in MSPM0L1305.Can any one Please suggest how to implement it in MSPM0L1305.ASAP
Hi,
For MSPM0L1305, there also be ECC for Flash and parity checked SRAM.
Please refer to 1.3.2 of this document MSPM0 L-Series 32-MHz Microcontrollers Technical Reference Manual (Rev. D) (ti.com)
To test this function, you can write the data into unchecked SRAM, and read from parity checked SRAM, and then parity error will generate.
Regards,
Zoey
Hi Zoey,
Thank you so much for the reply,
Could you please share any example code for the RAM Test
Hi,
Sorry we do not have RAM test demo code.
You can write from your side. If you have problems while writing code, you can start a new post or continue this thread to ask.
Thanks,
Zoey
Hi Zoey,
Thank you so much for the reply,I am not able to edit the startup file in CCS.can you Please help regarding this
Hi Zoey,
Sorry I am not clear about which old startup file you are mentioning.
Hi,
sorry for unclear information.
1. Please copy startup file from SDK: ...\ti\mspm0_sdk_2_00_01_00\source\ti\devices\msp\m0p\startup_system_files\ticlang into your self project. For example:
2. Then, uncheck in sysconfig
3. Build the project.
Regards,
Zoey
Hi Zoey,
Thank you so much for the reply
void Reset_Handler(void)
{
__asm(
"ldr r1, =0x20000000\n" // Start address of SRAM
"ldr r2, =0x20001000\n" // End address of SRAM
"mov r3, #0x0A\n\t" // Test pattern
"sram_test_loop:\n"
"cmp r1, r2\n" // Compare current address with end address
"bge sram_test_done\n" // Exit loop if end address reached
"str r3, [r1]\n" // Write test pattern to SRAM address pointed by r1
"ldr r4, [r1]\n" // Read back from SRAM address pointed by r1
"cmp r4, r3\n" // Compare read value with test pattern
"bne sram_test_failed\n"// Branch if mismatch
"add r1, r1, #4\n" // Increment address for next iteration
"b sram_test_loop\n" // Repeat loop
"sram_test_done:\n"
".global _c_int00\n"
"b _c_int00\n" // Jump to C initialization routine
"sram_test_failed:\n"
"b sram_test_failed\n"// Infinite loop or error handling for failed test
);
}
it is showing an invalid instruction in this two section.can you please help me regarding this
Hi,
Are you choose the right startup file?
Here is the demo project that I succeed to self write for startup file, you can base on that to develop your code.1323.empty_LP_MSPM0L1306_nortos_ticlang.zip
Regards,
Zoey
Hi Zoey,
Thank you for the reply
I am facing this issue, I'm not sure what I am doing wrong ,can you please help e regarding this.
Hi,
Please use "movs" instead of "mov"
and "adds" instead of "add".
Regards,
Zoey
Hi Zoey,
Thank you so much for the reply,
It is working now, but I want to know how to clear (clear assembly language)
Hi,
Please refer to below code:
/* Erase SRAM completely before jumping to BSL */ __asm( #if defined(__GNUC__) ".syntax unified\n" /* Load SRAMFLASH register*/ #endif "ldr r4, = 0x41C40018\n" /* Load SRAMFLASH register*/ "ldr r4, [r4]\n" "ldr r1, = 0x03FF0000\n" /* SRAMFLASH.SRAM_SZ mask */ "ands r4, r1\n" /* Get SRAMFLASH.SRAM_SZ */ "lsrs r4, r4, #6\n" /* SRAMFLASH.SRAM_SZ to kB */ "ldr r1, = 0x20300000\n" /* Start of ECC-code */ "adds r2, r4, r1\n" /* End of ECC-code */ "movs r3, #0\n" "init_ecc_loop: \n" /* Loop to clear ECC-code */ "str r3, [r1]\n" "adds r1, r1, #4\n" "cmp r1, r2\n" "blo init_ecc_loop\n" "ldr r1, = 0x20200000\n" /* Start of NON-ECC-data */ "adds r2, r4, r1\n" /* End of NON-ECC-data */ "movs r3, #0\n" "init_data_loop:\n" /* Loop to clear ECC-data */ "str r3, [r1]\n" "adds r1, r1, #4\n" "cmp r1, r2\n" "blo init_data_loop\n" );
Regards,
Zoey
Hi Zoey,
Thank you so much for the reply,It was very helpful for us
How to call a function in assembly
Hi,
Please refer to below code:
void Reset_Handler(void) { /* Jump to the ticlang C Initialization Routine. */ __asm( " .global _c_int00\n" " b _c_int00"); }
Hi Zoey,
Thank you so much for the reply
we are trying to call toggle function, which has led blinking but led is not blinking. if i implement like this can you please help me regarding this ASAP
Hi,
Our Target is to call a function and blink the led from startup file. Can anyone Please help regarding this
Hi,
If you just want to blink LED in startup file. Just use C language in reset_handler function(like Blink_LED()function)
Hi Zoey,
Thank you so much for the reply, for me it is not working. I have attached code for your reference
Hi,
You GPIO has not been initialized.
Please add SYSCFG_DL_init(); into your toggle() funtion;
Regards,
Zoey
No, please use below code:
void toggle(void) { SYSCFG_DL_init(); DL_GPIO_setPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN | GPIO_LEDS_USER_LED_3_PIN | GPIO_LEDS_USER_TEST_PIN); while(1){} }
If you not use while(1)
the code will run into main function, and GPIO will be initialized again.
Hi Zoey,
Thank you so for the reply,it is working from my side but I am not able to debug I have attached code for your reference,can you Please help me regarding this
Hi,
If you want to debug step by step of assembly language, please change your code to:
For example:
from:
__asm( "ldr r1, =0x20000000\n" // Start address of SRAM "ldr r2, =0x20001000\n" // End address of SRAM );
to:
__asm("ldr r1, =0x20000000\n"); // Start address of SRAM __asm(""ldr r2, =0x20001000\n"); // End address of SRAM
Regards,
Zoey
As I said before, please write assembly language separately for step-by-step debugging.
__asm("sram_test_done:\n"); __asm("b toggle()\n"); __asm("sram_test_failed:\n");
Hi Zoey,
We are in final stage of RAM Test Part, But small issue we are facing I am not able to debug even after following your instruction
I have attached the code for your reference
I am facing this issue, could you please help me regarding this
Hi,
Can you tell me which step or code line will cause you into this issue?
Thanks,
Zoey
Hi,
It is because once your CPU run into this toggle and finish that, you didn't have next function to run.
If you want to after this function and to run your main code, you can add
__asm(
" .global _c_int00\n"
" b _c_int00\n"
);
into your toggle function, and then PC and changed to main function. But be sure you might need while(1); to end your function, or after you finish your main code, it will still run into Default_Handler