56F8165 - 0x0200 program address boundary crash (help request)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

56F8165 - 0x0200 program address boundary crash (help request)

跳至解决方案
2,993 次查看
marchesi
Contributor II

(CodeWarrior 7.3 / 56F8165 / WinXP SP2 / PExpert 2.97, in use)

Hello,

When the code downloaded is shorter than 0x200, everything goes fine. With a bigger program the soft crashes.
Using the debugger in mixed view, we can see that where it was expect opcodes, there is now only 0xFF (as the memory was never written...) - screenshot attached.
This happens always and exactly from program memory address 0x0200 and beyond (a page boundary). But it doesn't last forever: if we start the program in higher memory regions, everything runs ok. Other words, there are some specific memory regions where this problem occurs.
First we have tested 2 sample chips, the behaviour was the same. After that, we carried out the test with other 3 'buyed' 8165, and the problem persisted.
When running the code with a 8145 over the same board, everything goes ok.
We have screen shots and test codes to better illustrate the issue, if it's needed.
Thanks,
Marchesi.
p.s. We're having this trouble for a long time, and our project timeline is going to deadline... any tips would help a lot... :smileyhappy:

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,434 次查看
marchesi
Contributor II
The initialization of the program flash was replaced on the 8165 .cfg file.

The test code and the project itself now appears to be both running ok.

Since I've not changed anything in the original file before, it could indicate
a CW bug.

Cheers,
Marchesi

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,435 次查看
marchesi
Contributor II
The initialization of the program flash was replaced on the 8165 .cfg file.

The test code and the project itself now appears to be both running ok.

Since I've not changed anything in the original file before, it could indicate
a CW bug.

Cheers,
Marchesi
0 项奖励
回复
1,434 次查看
marchesi
Contributor II
Hello,

this is a status update to the problem, since its solution has advanced but it´s not
done yet.

When this option is UNchecked,

Debugger > debugger options > stop on application launch

the program runs ok. It can´t be debugged, though, because if we do a 'run to cursor',
for instance, my friend 0xFFFF appears again at 0x0200 and beyond... (This positions
appears red coded, as if they were changed from the first download).

Well, this is the status so far. But I've found another detail.

The hfmclkd parameter in the .cfg file (flash initialization file) is set
to 0x0A and is meant to be fixed. But how is that, since the clock divider depends
upon the crystal frequency, which can change for each design?

In this problem, the FMCLKD generated by the Processor Expert is 61 (0x3d). As you know,
this is a very important gap from 0x0A, because the slim frequency range of the
flash timing control clock (150kHz~200kHz)...

I feel that the solution could be floating around these waters, but I can´t figure it
out yet...

I believe I´m surely missing something. Any help is welcome...


Thanks again,
Marchesi



marchesi wrote:
(CodeWarrior 7.3 / 56F8165 / WinXP SP2 / PExpert 2.97, in use)

Hello,

When the code downloaded is shorter than 0x200, everything goes fine. With a bigger program the soft crashes.
Using the debugger in mixed view, we can see that where it was expect opcodes, there is now only 0xFF (as the memory was never written...) - screenshot attached.
This happens always and exactly from program memory address 0x0200 and beyond (a page boundary). But it doesn't last forever: if we start the program in higher memory regions, everything runs ok. Other words, there are some specific memory regions where this problem occurs.
First we have tested 2 sample chips, the behaviour was the same. After that, we carried out the test with other 3 'buyed' 8165, and the problem persisted.
When running the code with a 8145 over the same board, everything goes ok.
We have screen shots and test codes to better illustrate the issue, if it's needed.
Thanks,
Marchesi.
p.s. We're having this trouble for a long time, and our project timeline is going to deadline... any tips would help a lot... :smileyhappy:

0 项奖励
回复