TC367: disable PFlash ECC Trap

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
zhouyi_NJ
Level 3
Level 3
50 sign-ins 10 questions asked 10 replies posted

Hi,  dear friends:

I found a post on the community about how to disable TC297 ECC , like below:

But no MARP.TRAPDIS is found in Aurix_TC3xx_UserManual

TC297_DisableEcc.PNG

When I try to read an Erased PFlash address, the SW runs into bus trap as below:

Tc367_BusTrap.PNG

Could you please tell me how to disable PFlash ECC wih SW, then also enable it with SW?

Disable in UBAB is not appreciated.

thanks and BR

ZHouYi

 

0 Likes
1 Solution
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

see UM TC3xx V2.0 part1 pdf page 327, there is the description of CPU_FLASHCON1 register. You must change the bitfield MASKUECC in this register from 0x2 to 0x1 to disable reporting ECC error.

CPUx_FLASHCON1 is used for PFx, e.g. CPU0_FLASHCON1 for PF0 and CPU1_FLASHCON1 for PF1

View solution in original post

5 Replies
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

see UM TC3xx V2.0 part1 pdf page 327, there is the description of CPU_FLASHCON1 register. You must change the bitfield MASKUECC in this register from 0x2 to 0x1 to disable reporting ECC error.

CPUx_FLASHCON1 is used for PFx, e.g. CPU0_FLASHCON1 for PF0 and CPU1_FLASHCON1 for PF1

lock attach
Attachments are accessible only for community members.
zhouyi_NJ
Level 3
Level 3
50 sign-ins 10 questions asked 10 replies posted

Hello MoD,

thanks a lot for your quick response.

The MASKUECC is set to 1 with folowing code (Cpu0_main.c line 63), but there is still bus-trap:

uint16 passwd = IfxScuWdt_getCpuWatchdogPassword();
IfxScuWdt_clearCpuEndinit(passwd);
MODULE_CPU0.FLASHCON1.B.MASKUECC = 1;
MODULE_CPU1.FLASHCON1.B.MASKUECC = 1;
IfxScuWdt_setCpuEndinit(passwd);

I've attached the whole project as zip file for your reference. 

Flash_Programming.c is copied from GitHub, the PFlash address 0xA0080000 is written with data,

SW tried to read PFlash 0xA009E0000, then run into trap.

thanks and BR

zhouYi

0 Likes

PS: the building environment is ADS V1.5, TC367 5V_TFT evaluation board

0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

Check with a debugger that the values are really written.

0 Likes
zhouyi_NJ
Level 3
Level 3
50 sign-ins 10 questions asked 10 replies posted

Hello MoD:

The problem is resolved, thank you very much!

BR

ZHouYi

0 Likes