This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

About IAP of STR912

Hello,
I have been working on MCBSTR9 kit. Now, i have a problem about in-application programming.
i read the AN2475, and study on the project source. i tried to copy the source to Keil uVision3. i did followings to download and work IAP in bank1:
----------------------------------------------------
- *Boot Bank Size Configuration (BBSR) BBSize: Memory size 32KB BBADDR: Address 0x000000 *Non-boot Bank Size Configuration (BBSR) BBSize: Memory size 512KB BBADDR: Address 0x080000
- Options - ASM - Define, Define: BOOT_BANK1
- CSX (Chip Select Mapping) checked
- options - target: IROM1: Start 0x000000 size 0x8000 (checked the box on right and left) IROM2: Start 0x080000 size 0x80000 (not checked) IRAM1: Start 0x4000000 size 0x8000 (checked the box on left)
- STR91xFxx Flash Bank1 ICP STR91x CFG & Security ICP
----------------------------------------------------
Then it works from bank1 now. The menu (to download or execute) i can see 115200 baud, in hyper terminal.
i hit "1", then i chose the .bin file, i start to send.. everthing goes ok till here.
i take "Verification failed" error, i could not download the bin file.
if anyone can help me ???

Parents Reply Children
  • Hello again,
    i am using ICP flash algorithm and i don't use verify.
    i understood from your reply, the other config. is ok.
    but i have a question, in AN2475 written that, firstly bank1 adress = 0x00, bank0 adress = 0x80000. i config like that, and as you know you have to select the size of each bank.in my config. the size of bank0 = 0x8000
    and bank1 = 0x80000. Is it true also ?

  • I want to add something more.
    I want to see where the code is broken or something else. but I could not debug when use bank1.
    Anyway, I tried to debug by myself. And I see the code
    comes up to "static s32 Receive_Packet" function but it does not pass that function. here is the code. when i comment the "switch" and uncomment "UART_SendData(UART0, c);" I receive Toggling_Led.bin2860E.. (I try to upload the Toggling_Led.bin, and also change to fifo_enable).
    --------------------------------------------------------
    static s32 Receive_Packet (u8 *data, s32 *length, u32 timeout)
    { u16 i, packet_size; u8 c; *length = 0;

    if (Receive_Byte(&c, timeout) != 0) { return -1; }

    // UART_SendData(UART0, c);

    switch (c) { case SOH: packet_size = PACKET_SIZE; break; case STX: packet_size = PACKET_1K_SIZE; break; case EOT: return 0; case CA: if ((Receive_Byte(&c, timeout) == 0) && (c == CA)) { *length = -1; return 0; } else { return -1; } case ABORT1: case ABORT2: return 1; default: return -1; } *data = c; for (i = 1; i < (packet_size + PACKET_OVERHEAD); i ++) { if (Receive_Byte(data + i, timeout) != 0) { return -1; } } if (data[PACKET_SEQNO_INDEX] != ((data[PACKET_SEQNO_COMP_INDEX] ^ 0xff) & 0xff)) { return -1; } *length = packet_size; return 0;

    }
    --------------------------------------------------------