A short background:
I have a custom board with two STM32F777 uC on it. The goal is to program one using the other. I'll refer to the one that programs master and the one that being programmed, slave.
The master runs from flash in dual bank/boot mode and has a dedicated jtag connection for debugging.
The slave runs from flash in the default single bank mode, it is supposed to be programmed by the master using the internal bootloader and a UART connection. It also has a jtag connection for debugging.
While being able to program and run code on the master using IAR debugging, J-Link and self programming, I'm having issues running code on the slave using part of the methods:
- When debugging through IAR using a j-link, I'm able to load and run code successfully. Also, after resetting the board, the code on the slave uC runs without any issues.
- When trying to program using J-Flash, It seemingly programs it correctly, but nothing happens when I try to run the GO command or when I power cycle the board.
- When trying to program using the bootloader, I'm able to go through the entire process of programming the slave uC (Connect to the bootloader through UART and receive all the expected Acks/nacks), but when I send the go command/trigger the reset line, the code doesn't run on the slave uC. When I read back the data from the memory using J-Flash, it seems to match the binary exactly, but it doesn't run.
Based on the bootloader flowchart, it seems that protection level 2 should be active for the bootloader to jump to 0x08000000. I wrote a script to lock the slave after programming with J-Flash, but it didn't seem to work, except for locking me out of the uC.
It seems like I'm doing something wrong with the Option Bytes in single bank mode, but I'm not sure what it is.
Has anyone else tried to program the STM32F777 using J-Flash and has issues?