Hello,
I am facing very critical problem. We have developed a bootloader to read a source code file via serial z modem and flash into serial flash memory. Also to take the code from serial flash and place in external RAM, extract the vector table and placed the same in internal RAM and then jump to the vector table and then application. This works fine when our application was running on RTXC and codewarrior compiler. Recently we have shifted to MQX with GNU compiler but strange thing is it throws an error stating "Core Lock Up Event Reset" when bootlaoder tries to jump to the application. Again when I run the MQX application using debugger, it works fine but through bootloader, it fails. can anybody help me to solve this problem.
Hi Pravin Falcao,
Please check the below link and let me know if this helps!!
https://community.freescale.com/thread/110446
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Sol,
The issue is initialization. In bootloader, CPU and peripherals are already initialize so it gives problem in MQX initialization. Is there any register RESET instruction available?
Hello,
I developed a simple example that shows you how to restart MQX. The example set the LED1 waits for 1 second in the TWR-K60N512. Then the MQX is restarted with the softreset. Following you will find the source code:
void Main_task(uint_32 initial_data)
{
LWGPIO_STRUCT led1;
printf("\n Prendiendo LED1 \n");
lwgpio_init(&led1, BSP_LED1, LWGPIO_DIR_OUTPUT, LWGPIO_VALUE_NOCHANGE);
lwgpio_set_functionality(&led1, BSP_LED1_MUX_GPIO);
lwgpio_set_value(&led1, 0);
_time_delay(1000);
SCB_AIRCR = SCB_AIRCR_VECTKEY(0x5FA) | SCB_AIRCR_SYSRESETREQ_MASK;
// while(1)
// {};
// _mqx_exit(0);
}