I have a little problem on a LPC4357 running FreeRTOS 8.2.
Problem is that when I execute a SoftReset MCU restart but during EMC SDRAM initialization it stop working, with loss of LPC-Link 2 debugger control. So, no HardFault, olny stop ecxecution.
The function where CPU stop working is this: SystemInit_ExtMemCtl (void). From some research I think it should be a Stack Pointer problem, but not sure about that, FreeRTOS Heap in my application is located in External SDRAM, and if I call the SoftReset routine before FreeRTOS start no problem with EMC init.
If I made a SoftReset after these instruction, system stop working during initialization in the Reset ISR.
The same code work right with a LPC4088 in the same condition (Ext RAM FreeRTOS Heap, same reset routine) with no problem.
I have a little problem on a LPC4357 running FreeRTOS 8.2.
Yikes, why so old? Later versions have a lot of additional error
checking asserts.
Problem is that when I execute a SoftReset MCU restart but during EMC
SDRAM initialization it stop working, with loss of LPC-Link 2 debugger
control. So, no HardFault, olny stop ecxecution.
The function where CPU stop working is this: SystemInit_ExtMemCtl
(void). From some research I think it should be a Stack Pointer problem,
but not sure about that, FreeRTOS Heap in my application is located in
External SDRAM, and if I call the SoftReset routine before FreeRTOS
start no problem with EMC init.
Can you explain what the soft reset does? In particular, what does it
do with interrupt enable/disable registers? What does it do with bus
interfaces used to access external memory?
Richard, thanks for your feedback.
I’m working with 8.2 because is the version already used on the firmware I’m working on. This firmware was developed from another person, and now I should debug problem and implement new function.
Here more informations:
Heap_4.c is used, and Heap is located in External SDRAM
(this code is exactly the same (except for address) that is working on a LPC 4088 with FreeRTOS 7 without problem, same condition, Heap4, Heap in ext SDRAM etc)
during reset PC go to the Reset vector, so every peripheral is re-initialized, also the EMC Bus for external SDRAM