WIZnet Developer Forum

W7500 IAP and max clock speed

Hi,

I've made a small bootloader to allow W7500 update on a custom board without SWD or external probe.

Sometimes, i have deadlock into IAP (never return from a call). I've made many tests, and finally try to re-write IAP and execute it into SRAM (to avoid delay into cpu fetch). Result is the same, CPU sometimes 'stop' when bit 16 of FACCR is set (0x00010000). During test, i've seen that when i reduce system frequency, i can drasticly reduce the number of errors (from 10% @ 20MHz to ~0% @ 8MHz)

Is the Flash controller can work on the same frequency range than CPU ? Or, if there is a limit, what is the maximum frequency ?

Best regards,

I have the same problem on W7500P. I have tried a 8 Mhz clock after my original 48Mhz with no observable difference. I am trying to load a large range of flash memory, single address at a time, and it crashes in the DO_IAP() after a few thousand calls. This is a critical problem that will prevent my company from using this mcu. I am using the WIZwiki-W7500P dev board. The provided “\W7500x_Library_Examples\Projects\Peripheral_Examples\Flash” example will also crash occasionally.

Hi kralcllib,

I have never found the reason of this issue, but after many tests i’ve found a workaround. At 8MHz i works for me on a custom board (not tested with official dev kit).

At the begining i’ve see some cases where the IAP functions locks at 8MHz too but this was caused by reset (not clock speed). I have replaced the R/C used for reset by a NCP303 [1] to create a long and clean reset pulse.
For me, it now works with :

  • Calling IAP only when CPU runs at 8MHz,
  • Using a clean reset pulse

Using this configuration i have made a lot of IAP calls, on many boards, without any error.

Hi Hooligan0,

Thanks for the input.

I wonder if this is a brown-out condition. I will forward your results to my EE. And, I will let you know if we come up with any new explanation.

Thanks,
Bill

I haven’t completely verified this solution, but to use IAP function to program flash, you must use the internal clock, not an external clock. I worked with an engineer at Wiznet, trading code back and forth, and was finally informed of this solution.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.