cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723 embedded bootloader command GO fail

BLeon.2
Associate II

 I use STM32H723VET6. Bootloader ver 9.2. When I can send command GO at FDCAN (PD1, PD0), I receive ACK(0x79), but after that MCU is fail.

My function:

void BootCanGo(uint8_t* answer)

{

           uint32_t Delayer = 0x8FFFFF;

           uint8_t SendedData[4];

           

           CanTxHeader.Identifier = BOOT_CAN_COMMAND_GO;

           SendedData[0] = 0x08;

           SendedData[1] = 0x00;

           SendedData[2] = 0x00;

           SendedData[3] = 0x00;

           /* Start the Transmission process */

           CanTxHeader.DataLength = FDCAN_DLC_BYTES_4;

           HAL_FDCAN_AddMessageToTxFifoQ(&hfdcan, &CanTxHeader, SendedData);

           

           while ((HAL_FDCAN_GetRxFifoFillLevel(&hfdcan, FDCAN_RX_FIFO0) < 1) && --Delayer) {};

           

           HAL_FDCAN_GetRxMessage(&hfdcan, FDCAN_RX_FIFO0, &CanRxHeader, CanRxData);

           *answer = CanRxData[0];

}

Write memory and Erase memory commands run correct. A program in flash memory mode (BOOT0 pin LOW) run correct. There are no limitations in AN2606:

0693W00000FAPgWQAX.jpgI tried to run the debugger on the STM32H723 (device side). I stop the program, and after the command GO I start it again in step mode. After of several steps disconnection occurs:

0693W00000FAQMNQA5.jpgFlash in STM32H723:

0693W00000FAPgbQAH.jpgWhat am I doing wrong?

13 REPLIES 13
BLeon.2
Associate II

Ok.

My knowledge of assembler is not deep.

After reset:

0x1FF11AB2 E8BD4070  POP           {r4-r6,lr}
0x1FF11AB6 F7FFBD38  B.W           0x1FF1152A
0x1FF11ABA E92D4FF8  PUSH          {r3-r11,lr}
0x1FF11ABE 2000      MOVS          r0,#0x00
0x1FF11AC0 F8DF446C  LDR.W         r4,[pc,#1132]  ; @0x1FF11F30

During the execution of the program, I have the following register values:

0x1FF11AB1 BD46      POP           {r1-r2,r6,pc}
0x1FF11AB3 70E8      STRB          r0,[r5,#0x03]
0x1FF11AB5 FF4038F7  DCD           0x38F7FF40
0x1FF11AB9 2DBD      CMP           r5,#0xBD
0x1FF11ABB F8E9004F  STR           r0,[r9,#0x4F]
0x1FF11ABF DF20      SVC           0x20
0x1FF11AC1 6CF8      LDR           r0,[r7,#0x4C]
0x1FF12748 F7FFFF96  BL.W          0x1FF12678
0x1FF1274C E7F2      B             0x1FF12734
0x1FF1274E F7FFF9B4  BL.W          0x1FF11ABA
0x1FF12752 E7EF      B             0x1FF12734

But does it get to your Reset_Handler?

Do you get an ACK related to the GO command?

Trying to determine

a) If it accepts the GO command, and enters your code

b) Does not accept the GO command

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I get an ACK related to the GO command with correct address. If I send a wrong address, I get NACK. In all cases when I receive ACK (for different addresses in the GO command, for example 0x08000000, 0x08000004, ...) a MCU failure occurs.

But the System Memory change happens before the command GO is sent.

BLeon.2
Associate II

I tried the GO command on STM32H743zi via uart. Сonsidering the limitations described in AN2606, the command operates as described in AN3155. I tried to apply these limitations to H723, but to no avail.