I have news.
I had done some changes:
RCW: RCWLR a4040000 - RCWHR a4606c00
Software: 8313RDB_init.c
Swap config register:
Origin:
// WINDOW 0 - NOR FLASH
lis r5, 0xfe00
ori r5, r5, 0x0000
lis r4, 0xe0000020@ha
stw r5, 0xe0000020@l(r4)
lis r5, 0x8000
ori r5, r5, 0x0018
lis r4, 0xe0000024@ha
stw r5, 0xe0000024@l(r4)
Dest:
// WINDOW 0 - NOR FLASH
lis r5, 0x8000
ori r5, r5, 0x0018
lis r4, 0xe0000024@ha
stw r5, 0xe0000024@l(r4)
lis r5, 0xfe00
ori r5, r5, 0x0000
lis r4, 0xe0000020@ha
stw r5, 0xe0000020@l(r4)
Comment 2 configuration register (If necesary)
// CS0 - NOR FLASH
/*
lis r5, 0x0000 //fe00
ori r5, r5, 0x1001
lis r4, 0xe0005000@ha
stw r5, 0xe0005000@l(r4)
lis r5, 0xfe00
ori r5, r5, 0x6ff7
lis r4, 0xe0005004@ha
stw r5, 0xe0005004@l(r4)
*/
With this changes the program runs OK.
It is a bug of codewarrior?
The commented registers have to be changed but the micro can´t do it.