The MPC5744P goes to IVOR1 vector when the function called in the MPC5744P sample program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now, I am studying the MPC5744P programing with DEVKIT-MPC5744P.
And I have a problem that MPC5744P goes to the IVOR1 vector when the other function call this function in the sample program.
I don't understand why it is occuured ?
Does someone teach me how to solve this problem ?
<< The below is conditions when the problem is occured >>
1. Board: DEVKIT-MPC5744P ( Rev.E )
2. Sample program : LINFlexD_UART_MPC5744P
Note: This sample program is for Flash.
And I was changed from LINFlexD_1(Rev.B) to LINFlexD_0( for Rev.E).
3. Build configuration : Debug_RAM
4. Design Environment : S32 Design Studio for Power Archtecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I assume you are using example project "LINFlexD_UART_MPC5744P"
Have you done any modifications to this project?
I've just tested this example project with DEVKIT board and it works just fine.
Could you test "Debug" build target which is FLASH based? Do you observe the same problem?
I'd guess this happens due to uninitialized LMEM (ECC error) but I checked the example startup code and it looks ok to me:
startup.s
;# Base Address of the Local SRAM
e_lis r5, __LOCAL_DMEM_BASE_ADDR@h
e_or2i r5, __LOCAL_DMEM_BASE_ADDR@l
;# Fill Local SRAM with writes of 32GPRs
ldmem_loop:
e_stmw r0,0(r5) # Write all 32 registers to SRAM
e_addi r5,r5,128 # Increment the RAM pointer to next 128bytes
e_bdnz ldmem_loop # Loop for all of SRAM
Could you attach your project if it does not help?
Thanks.
Stan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply.
And, are there the concerning points ?
Please teach me them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
sorry for delay. I can reproduce your issue. Thanks a lot for report. I find out that PE Micro .mac script doesn't init RAM for stack. As workaround you can use your part of code. Or you can use modified .mac script from attachment and left the original startup code. In normal way this init should be done by debug probe.
PE Micro .mac script is located (with default install path) in c:\NXP\S32DS_Power_v2.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.9.9.201907200403\win32\gdi\P&E\ folder. You can replace existing one with attached file. the only difference is this additional row at the end of script:
meminit.l 0x50800000 0x5080FFFF
Jiri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very thank you for your reply and confirmation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
( I think that my stress and the stress for MPC5744P's flash-memory are less than 'Under Debug/Flash mode'. )
Could you teach me how to avoid the ECC error if it is correct ?
1. Under the Debug mode(It is not the Debug_RAM mode),
I have confirmed that MPC5744P did not go to IVOR1 vector such as the below Figure-1.
I have confirmed that MPC5744P operated correctly according to the software.
( Note : I can not confirm it on step by step because it is under Flash mode. )
I could not find the difference because I did not modified it. ( It was created at Example program only.)
There is no workaround code in here.
(Note 2) My modified parts are shown in the below figures.(See the Filgure-3-1 & 3-2)