W7100A ISP code entry

Hi, Wiznet

I use WIZ107SR for implement my own network application and I want to upgrade the firmware via Ethernet…
I encountered a problem when I try write bytes to code memory. In Application Note “How to program Code Flash Memory” says, that “The ISP code is defined at 0x0003” and we make userclass with one empty function (codeflash_callFunc) and call it when need to goto ISP code. But real address codeflash_callFunc may not be 0x0003. For example, in Code Flash Application Note codeflash_callFunc placed at 0x000A (CodeFlash.MAP file):

                      • C O D E M E M O R Y * * * * * * * * * * * * *
                        000000H 000002H 000003H — OFFS… CODE ?CO?STARTUP?3
                        000003H 000005H 000003H — OFFS… CODE ?CO?STARTUP?4
                        000006H 000009H 000004H BYTE UNIT CODE ?PR?CHIP_INIT?TCPIPCORE
                        00000BH 00000DH 000003H — OFFS… CODE ?CO?STARTUP?5

So, we need jump to 0x000A to call the ISP code? I tried different addresses. When I goto 0x0003 address to call ISP, program hangs. If goto 0x000A address, all works untill recv function calls. Looks like from 0x0006 it works right.
Thus, to change data flash we goto 0x07FD, and what is real address of ISP entry for code?
And why we make userclass CODE_PRO and empty function instead b();[/b] instruction to perform LCALL?

Regards, Vitaly

Hi, setime.

What use ((void(code*)(void))ADDR)() is not wrong.
But our test environment is use user class so if not work, follow our recommendation, but if work, use your own method.

And address of ISP code is 0x000A. I think you didn’t handle interrupt or didn’t set WCONF.

[code]EA = 0; // Disable EA
WCONF &= ~(0x40); // Enable ISP Entry

ISPADDR16 = isp_addr;
codeflash_callFunc();		// Call ISP Entry
ret = ISPDATA;

WCONF |= 0x40;        	// Disable ISP Entry
EA =1;					// Enable EA


Please, check one more and try but if not work, reply one more.

Best regards.