Example MPC5744P 1b+2b_PERRAM_ECC_error_injection GHS614

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example MPC5744P 1b+2b_PERRAM_ECC_error_injection GHS614

Example MPC5744P 1b+2b_PERRAM_ECC_error_injection GHS614

********************************************************************************
* Detailed Description:
* Purpose of the example is to show how to simulate Multi-bit or Single-bit ECC
* error in internal DMA TCD RAM (user must choose it in the option at the end of
* main function).
* EIM (Error Injection Module) is used to simulate a multi-bit or single-bit
* ECC error in DMA TCD RAM (Peripheral RAM).
* When corrupted data is accessed the IVOR1 exception handler is called in case
* of multi-bit ECC error (IVOR1 exception occurs) and FCCU_Alarm_Interrupt
* handler is called in case of single-bit ECC error (FCCU interrupt occurs).
* Both function calls MEMU handler.
* The example displays notices in the terminal window (connector J19 on
* MPC57xx_Motherboard)(19200-8-no parity-1 stop bit-no flow control on eSCI_A).
* No other external connection is required.
* ------------------------------------------------------------------------------
* Test HW:         MPC57xx_Motherboard + MPC5744P-144DC
* MCU:             PPC5744PFMLQ8,0N15P,QQAA1515N, Rev2.1B
* Fsys:            200 MHz PLL with 40 MHz crystal reference
* Debugger:        Lauterbach Trace32
* Target:          internal_FLASH, RAM
* Terminal:        19200-8-no parity-1 stop bit-no flow control
* EVB connection:  default
********************************************************************************

Attachments
Comments

Hello, I encountered a problem in the process of testing 5744: MEMU_PERIPH_RAM_CERR,MEMU_PERIPH_RAM_UNCERR injection failed to make the MEMU_ERR_FLAG register PR_CE,PR_UCE set, the test code is downloaded from the NXP website. At the end of the main function injection, the code is as follows:

#define EIM_EICHEN_DMA_memory_0 0x80000000u
// must be somewhere in DMA TCD area i.e. 0xFC0A1000-0xFC0A13FE
#define Injected_ECC_error_address 0xFC0A1000u
void Generate_1b_ECC_error_in_DMA_TCD(void)
{
register vuint32_t test_read = 0u;

//printf("ECC 1b error injected into RAM\r\n");

/* invert 1 LSB bits to create non-correctable data error */
EIM.EICHD_Word1.R = 0x00000001u;

/* PRAMC_0 channel error injection enable */
EIM.EICHEN.R = EIM_EICHEN_DMA_memory_0;

/* global error injection enable */
EIM.EIMCR.R = 1u;

/* error caused by read (it should set MCSR[MAV, LD, BUS_DRERR]) */
test_read = *(unsigned int*) Injected_ECC_error_address;

}

void Generate_2b_ECC_error_in_DMA_TCD_duplicate(void)
{
register vuint32_t test_read = 0u;

//printf("ECC 2b error injected into RAM\r\n");

/* invert 2 LSB bits to create non-correctable data error */
EIM.EICHD_Word1.R = 0x00000003u;

/* PRAMC_0 channel error injection enable */
EIM.EICHEN.R = EIM_EICHEN_DMA_memory_0;

/* global error injection enable */
EIM.EIMCR.R = 1u;

/* error caused by read (it should set MCSR[MAV, LD, BUS_DRERR]) */
test_read = *(unsigned int*) Injected_ECC_error_address;

}

note: FLASH_RAM,SYS_RAM can use NXP Web site code to implement error_injection.

Thank you very much for your help!

I am sorry but I don't understand you. Could you clarify what exactly does not work for you? Thanks

Hello David ,

      1b+2b_PERRAM_ECC_error_injection doesn't work in my main function,PR_CE and PR_UCE of MEMU_ERR_FLAG register are always zero,my chip is SPC5744PFK1AMLQ9,the 1b+2b_PERRAM_ECC_error_injection code that injected into the main function is as the follows pictures:

      Thanks for your help!!

peritheral_1bit.png

peritheral_2bit.png

%3CLINGO-SUB%20id%3D%22lingo-sub-1112573%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20MPC5744P%201b%2B2b_PERRAM_ECC_error_injection%20GHS614%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112573%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20Detailed%20Description%3A%3CBR%20%2F%3E*%20Purpose%20of%20the%20example%20is%20to%20show%20how%20to%20simulate%20Multi-bit%20or%20Single-bit%20ECC%3CBR%20%2F%3E*%20error%20in%20internal%20DMA%20TCD%20RAM%20(user%20must%20choose%20it%20in%20the%20option%20at%20the%20end%20of%3CBR%20%2F%3E*%20main%20function).%3CBR%20%2F%3E*%20EIM%20(Error%20Injection%20Module)%20is%20used%20to%20simulate%20a%20multi-bit%20or%20single-bit%3CBR%20%2F%3E*%20ECC%20error%20in%20DMA%20TCD%20RAM%20(Peripheral%20RAM).%20%3CBR%20%2F%3E*%20When%20corrupted%20data%20is%20accessed%20the%20IVOR1%20exception%20handler%20is%20called%20in%20case%3CBR%20%2F%3E*%20of%20multi-bit%20ECC%20error%20(IVOR1%20exception%20occurs)%20and%20FCCU_Alarm_Interrupt%3CBR%20%2F%3E*%20handler%20is%20called%20in%20case%20of%20single-bit%20ECC%20error%20(FCCU%20interrupt%20occurs).%3CBR%20%2F%3E*%20Both%20function%20calls%20MEMU%20handler.%3CBR%20%2F%3E*%20The%20example%20displays%20notices%20in%20the%20terminal%20window%20(connector%20J19%20on%3CBR%20%2F%3E*%20MPC57xx_Motherboard)(19200-8-no%20parity-1%20stop%20bit-no%20flow%20control%20on%20eSCI_A).%3CBR%20%2F%3E*%20No%20other%20external%20connection%20is%20required.%3CBR%20%2F%3E*%20------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20MPC57xx_Motherboard%20%2B%20MPC5744P-144DC%3CBR%20%2F%3E*%20MCU%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PPC5744PFMLQ8%2C0N15P%2CQQAA1515N%2C%20Rev2.1B%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20200%20MHz%20PLL%20with%2040%20MHz%20crystal%20reference%3CBR%20%2F%3E*%20Debugger%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Lauterbach%20Trace32%3CBR%20%2F%3E*%20Target%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal_FLASH%2C%20RAM%3CBR%20%2F%3E*%20Terminal%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2019200-8-no%20parity-1%20stop%20bit-no%20flow%20control%3CBR%20%2F%3E*%20EVB%20connection%3A%26nbsp%3B%20default%3CBR%20%2F%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1112573%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20Detailed%20Description%3A%3CBR%20%2F%3E*%20Purpose%20of%20the%20example%20is%20to%20show%20how%20to%20simulate%20Multi-bit%20or%20Single-bit%20ECC%3CBR%20%2F%3E*%20error%20in%20internal%20DMA%20TCD%20RAM%20(user%20must%20choose%20it%20in%20the%20option%20at%20the%20end%20of%3CBR%20%2F%3E*%20main%20function).%3CBR%20%2F%3E*%20EIM%20(Error%20Injection%20Module)%20is%20used%20to%20simulate%20a%20multi-bit%20or%20single-bit%3CBR%20%2F%3E*%20ECC%20error%20in%20DMA%20TCD%20RAM%20(Peripheral%20RAM).%20%3CBR%20%2F%3E*%20When%20corrupted%20data%20is%20accessed%20the%20IVOR1%20exception%20handler%20is%20called%20in%20case%3CBR%20%2F%3E*%20of%20multi-bit%20ECC%20error%20(IVOR1%20exception%20occurs)%20and%20FCCU_Alarm_Interrupt%3CBR%20%2F%3E*%20handler%20is%20called%20in%20case%20of%20single-bit%20ECC%20error%20(FCCU%20interrupt%20occurs).%3CBR%20%2F%3E*%20Both%20function%20calls%20MEMU%20handler.%3CBR%20%2F%3E*%20The%20example%20displays%20notices%20in%20the%20terminal%20window%20(connector%20J19%20on%3CBR%20%2F%3E*%20MPC57xx_Motherboard)(19200-8-no%20parity-1%20stop%20bit-no%20flow%20control%20on%20eSCI_A).%3CBR%20%2F%3E*%20No%20other%20external%20connection%20is%20required.%3CBR%20%2F%3E*%20------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20MPC57xx_Motherboard%20%2B%20MPC5744P-144DC%3CBR%20%2F%3E*%20MCU%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PPC5744PFMLQ8%2C0N15P%2CQQAA1515N%2C%20Rev2.1B%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20200%20MHz%20PLL%20with%2040%20MHz%20crystal%20reference%3CBR%20%2F%3E*%20Debugger%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Lauterbach%20Trace32%3CBR%20%2F%3E*%20Target%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal_FLASH%2C%20RAM%3CBR%20%2F%3E*%20Terminal%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2019200-8-no%20parity-1%20stop%20bit-no%20flow%20control%3CBR%20%2F%3E*%20EVB%20connection%3A%26nbsp%3B%20default%3CBR%20%2F%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1112576%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5744P%201b%2B2b_PERRAM_ECC_error_injection%20GHS614%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112576%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20David%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B1b%2B2b_PERRAM_ECC_error_injection%20doesn't%20work%20in%20my%20main%20function%2CPR_CE%20and%20PR_UCE%20of%20MEMU_ERR_FLAG%20register%20are%20always%20zero%2Cmy%20chip%20is%20SPC5744PFK1AMLQ9%2Cthe%201b%2B2b_PERRAM_ECC_error_injection%20code%20that%20injected%20into%20the%20main%20function%20is%20as%20the%20follows%20pictures%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BThanks%20for%20your%20help!!%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peritheral_1bit.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peritheral_1bit.png%22%20style%3D%22width%3A%20724px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F71051i7F2120467680072D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22peritheral_1bit.png%22%20alt%3D%22peritheral_1bit.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peritheral_2bit.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peritheral_2bit.png%22%20style%3D%22width%3A%20738px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F71124i0B783AD6157C23DA%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22peritheral_2bit.png%22%20alt%3D%22peritheral_2bit.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1112575%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5744P%201b%2B2b_PERRAM_ECC_error_injection%20GHS614%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112575%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20sorry%20but%20I%20don't%20understand%20you.%20Could%20you%20clarify%20what%20exactly%20does%20not%20work%20for%20you%3F%20Thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1112574%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5744P%201b%2B2b_PERRAM_ECC_error_injection%20GHS614%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112574%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%20I%20encountered%20a%20problem%20in%20the%20process%20of%20testing%205744%3A%20MEMU_PERIPH_RAM_CERR%2CMEMU_PERIPH_RAM_UNCERR%20injection%20failed%20to%20make%20the%20MEMU_ERR_FLAG%20register%20PR_CE%2CPR_UCE%20set%2C%20the%20test%20code%20is%20downloaded%20from%20the%20NXP%20website.%20At%20the%20end%20of%20the%20main%20function%20injection%2C%20the%20code%20is%20as%20follows%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%23define%20EIM_EICHEN_DMA_memory_0%200x80000000u%3CBR%20%2F%3E%2F%2F%20must%20be%20somewhere%20in%20DMA%20TCD%20area%20i.e.%200xFC0A1000-0xFC0A13FE%3CBR%20%2F%3E%23define%20Injected_ECC_error_address%200xFC0A1000u%3CBR%20%2F%3Evoid%20Generate_1b_ECC_error_in_DMA_TCD(void)%3CBR%20%2F%3E%7B%3CBR%20%2F%3Eregister%20vuint32_t%20test_read%20%3D%200u%3B%3C%2FP%3E%3CP%3E%2F%2Fprintf(%22ECC%201b%20error%20injected%20into%20RAM%5Cr%5Cn%22)%3B%3C%2FP%3E%3CP%3E%2F*%20invert%201%20LSB%20bits%20to%20create%20non-correctable%20data%20error%20*%2F%3CBR%20%2F%3EEIM.EICHD_Word1.R%20%3D%200x00000001u%3B%3C%2FP%3E%3CP%3E%2F*%20PRAMC_0%20channel%20error%20injection%20enable%20*%2F%3CBR%20%2F%3EEIM.EICHEN.R%20%3D%20EIM_EICHEN_DMA_memory_0%3B%3C%2FP%3E%3CP%3E%2F*%20global%20error%20injection%20enable%20*%2F%3CBR%20%2F%3EEIM.EIMCR.R%20%3D%201u%3B%3C%2FP%3E%3CP%3E%2F*%20error%20caused%20by%20read%20(it%20should%20set%20MCSR%5BMAV%2C%20LD%2C%20BUS_DRERR%5D)%20*%2F%3CBR%20%2F%3Etest_read%20%3D%20*(unsigned%20int*)%20Injected_ECC_error_address%3B%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3Evoid%20Generate_2b_ECC_error_in_DMA_TCD_duplicate(void)%3CBR%20%2F%3E%7B%3CBR%20%2F%3Eregister%20vuint32_t%20test_read%20%3D%200u%3B%3C%2FP%3E%3CP%3E%2F%2Fprintf(%22ECC%202b%20error%20injected%20into%20RAM%5Cr%5Cn%22)%3B%3C%2FP%3E%3CP%3E%2F*%20invert%202%20LSB%20bits%20to%20create%20non-correctable%20data%20error%20*%2F%3CBR%20%2F%3EEIM.EICHD_Word1.R%20%3D%200x00000003u%3B%3C%2FP%3E%3CP%3E%2F*%20PRAMC_0%20channel%20error%20injection%20enable%20*%2F%3CBR%20%2F%3EEIM.EICHEN.R%20%3D%20EIM_EICHEN_DMA_memory_0%3B%3C%2FP%3E%3CP%3E%2F*%20global%20error%20injection%20enable%20*%2F%3CBR%20%2F%3EEIM.EIMCR.R%20%3D%201u%3B%3C%2FP%3E%3CP%3E%2F*%20error%20caused%20by%20read%20(it%20should%20set%20MCSR%5BMAV%2C%20LD%2C%20BUS_DRERR%5D)%20*%2F%3CBR%20%2F%3Etest_read%20%3D%20*(unsigned%20int*)%20Injected_ECC_error_address%3B%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3Enote%3A%20FLASH_RAM%2CSYS_RAM%20can%20use%20NXP%20Web%20site%20code%20to%20implement%20error_injection.%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎02-20-2021 06:37 AM
Updated by: