---

** [tickets:#227] Latest STM32F7 chip causes flash probe assertion**

**Status:** new
**Milestone:** 0.9.0
**Created:** Thu Feb 21, 2019 05:19 PM UTC by Robert Campbell
**Last Updated:** Thu Feb 21, 2019 05:19 PM UTC
**Owner:** nobody


I just built a board with an STM32F730Z8.  This new chip has 64kB flash.

In the function stm32x_probe the chip is defined with max_flash_size_in_kb of 
512 and max_sector_size_in_kb of 128.

This line is used to calculate the number of pages:

~~~
int num_pages = flash_size_in_kb / max_sector_size_in_kb
                + (stm32x_info->has_large_mem ? 8 : 4);
~~~

With this new chip it results in the division 64kB/128kB = 0 +4 pages  instead 
of 1+4 pages.  This results in an assertion failure in setup_sector after 
calling setup_bank.  I was able to fix the assertion issue by setting the 
correct max sector size in the switch statement in stm32x_probe:

~~~
        case 0x452:     /* F72x/73x */
                max_flash_size_in_kb = 512;
                max_sector_size_in_kb = 64; //my temp fix
....

~~~

I suspect this is the wrong way to fix it but it solved my specific chip 
problem today.  Hopefully this is enough info for the maintainer to know 
exactly what to do.


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to