I created a project using the KSDK Project Generator 1.0 for a MKL03 MKL03Z32VFK4. See image below.
I am trying to get the LPUART_DRV working using interrupts, but when the LPUART_DRV_SendData() runs it crashes when LPUART_BWR_CTRL_TIE(base, 1U) is run in function LPUART_DRV_StartSendData(). See attached image of the debug session.
Also, attached is the project.
I am missing something, but cannot figure it out. Any advice as to why it is crashing would be really appreciated. Thank you.
Original Attachment has been moved to: MKL03_Device_Platform_MKL03Z32VFK4.zip
Solved! Go to Solution.
Jorge,
Thank you for the tip!
Turns out in the startup_MKL03Z4.s I had:
/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFF39FE
it ought to be:
/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFF3BFE
Mike
The issue is that there is no project example using processor expert which is very weird!
The problem with processor expert after adding the blocks I need it compiles to around 24K before adding the application code. Adding application puts the compiled code into the 40K range! If I use the above, then the baseline will likely be around 15K which will be enough room for what I need to do.
I will give Carlos_Mendoza solution a try from your thread lpuart issue . At least compare and contrast the two projects.
Hello Mike:
Do you still have this issue? Have you tried in standalone mode without the debugger?
I tested your project from my side with a FRDM-KL03Z and it worked as expected. From your screenshot it seems that the core is using the vector table from the ROM bootloader.
Try adding the next code before any application code is executed (e.g. in SystemInit() or at the beginning of main():
// Disable force ROM.
RCM_BWR_FM_FORCEROM(RCM, 0);
// Clear status register (bits are w1c).
RCM_BWR_MR_BOOTROM(RCM, 3);
Best regards,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Jorge,
Thank you for the tip!
Turns out in the startup_MKL03Z4.s I had:
/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFF39FE
it ought to be:
/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFF3BFE
Mike
Also, the project is referencing the "libksdk_platform.a" library which was compiled using the ksdk_platform_lib_KL03Z4. This is a KSDK 1.3.0 revision.