• AVR Freaks

Hot![Resolved] EZBL ex_boot_app_blink_dual_partition read-back verification error

Author
craigjbradley
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2013/09/12 15:30:37
  • Location: 0
  • Status: offline
2018/10/29 11:33:55 (permalink)
0

[Resolved] EZBL ex_boot_app_blink_dual_partition read-back verification error

Hi All,
I am trying to get up to speed on the EZBL for a PIC24FJ1024GA610 project.  I have an Explorer 16 (original version) with the PIC24FJ1024GB610 PIM installed, a Real ICE and I am using a USB to Serial dongle to interface to the Explorer 16 serial port.  I have EZBL 2.11, MPLAB X IDE v4.05 and XC16 v1.32.  I have been able to successfully build and run the examples in the EZBL Hands-on Bootloading Exercises document up through Exercise 3 with no problems.  I can load all of the projects at 230.4 Kbaud with the default settings.
 
I would like to use the dual partition mode in my project because I have an Ethernet interface and need to adapt the bootloader to Ethernet once I get it running on serial.  However, I cannot get the dual partition BL2 file to load.  I have not found any instructions for the ex_boot_app_blink_dual_partition project so I have tried to use the same approach as with the other examples.  I get a read-back verification error.  I have tried dropping the baud rate down to 115.2 Kbaud (and it still works with the other example projects) but still no luck.
 
I am probably doing something wrong.  Has anyone else been able to make this example work with an Explorer 16?  I have attached the log file also.
 
Thanks,
- Craig 
post edited by craigjbradley - 2018/10/31 12:46:50
#1

4 Replies Related Threads

    craigjbradley
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2013/09/12 15:30:37
    • Location: 0
    • Status: offline
    Re: EZBL ex_boot_app_blink_dual_partition read-back verification error 2018/10/29 13:28:39 (permalink)
    0
    More info...
    First I built the project "as is" and programmed the part with "Make and Program" as is done in example 1.
    Then I ran "Build" to try the bootloader with no luck.
    Then I modified the BOOTID_xxx and APPID_VER_xxx parameters in the ezbl_dual_partition.mk file following the guildelines in Example 1 and repeated the procedure.  Still no luck.
    Does the bootloader need to be built separately as is done in example 1?
     
    I am attaching the .mk file also, I had to zip it to get it to upload.
     
    Thanks,
       - Craig
    #2
    craigjbradley
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2013/09/12 15:30:37
    • Location: 0
    • Status: offline
    Re: EZBL ex_boot_app_blink_dual_partition read-back verification error 2018/10/30 12:22:48 (permalink)
    0
    UPDATE:
    MPLAB was running very slow and it was taking over 6 minutes to build the project (this started after the first couple of  exercises), so I rebooted the computer.  I then did a Clean and Build, the project built much faster and then it loaded about 60% of the code before declaring a "COM read error".  I moved the USB to serial device (generic) to another USB port directly on the computer (it was on a USB hub), same result after that.  Then I dropped the baud rate to 115.2K and increased the timeout to 2200 and tried again.  Save result - COM read error.
     
    So it appears that the dual partition bootloader is running but for some reason I get communication error with the dual partition code.  I do not get these errors with the other examples.  I have ordered an Explorer 16/32 and a MCP2200EV module for further testing, they should be here today.
     
    I am attaching the latest log file at 115.2K baud.
     
    Thanks,
        - Craig
    #3
    craigjbradley
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2013/09/12 15:30:37
    • Location: 0
    • Status: offline
    Re: EZBL ex_boot_app_blink_dual_partition read-back verification error 2018/10/30 18:11:35 (permalink)
    0
    UPDATE 2:
    I received my MCP2200EV module today and tested with the Explorer 16 (original version).  I still get errors when trying to load the dual partition program at 230.4K baud, but it works OK at 115.2K baud.
     
    Then I tried the Explorer 16/32 board and had the same results, I can load at 115.2K baud but not at 230.4K.  There must be more delays in the programming of a second partition than in programming one partition as the other example programs load OK at 230.4K.
     
    I also tried using the Prolific USB to serial at 57.6K but no luck there, even though it did work with the other examples.  The MCP2200 is the way to go for dual partitions.
     
    My project's target board has a PIC24FJ1024GA610 chip and a MCP2200 on UART 3 (the example code is built for UART 2).  I do have an RS232 port on UART 2, so I connected the MCP2200EV module to the board's UART 2 port and re-compiled for the GA610 part.  I loaded the program with the Real ICE and it ran.  Then I tried loading via the serial port at 115.2K baud and that worked OK too!
     
    BTW: I discovered that if you open up a terminal program on the serial port 230.4K 8N1, you will see the boot up messages, showing which partition is active.  However, you need to be careful to close the terminal program when tying to load new code. I use RealTerm which has a convenient Open/Close button.
     
    My next step is to figure out how to change the bootloader's serial port to UART 3 so I can use the on-board MCP2200 USB interface.  I have poked around in the code and it does appear that there is some hard coding of the UART and it's pins in the InitializeBoard() function.  If anyone can help point me to the proper area of the code where I need to make changes, that would be great.  I know how to setup the UARTs, pins and ISRs, but finding all of the places to change will be the challenge.  I have not found the ISR code yet, it must be somewhere in the library functions.
     
    These kind of changes would be good to add to the tutorial as I suspect that others will need to change UARTs also.
     
    Once I get this running the next step will be to see if I can load code via Ethernet using the WIZnet chip on my board.
     
    - Craig
    #4
    craigjbradley
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2013/09/12 15:30:37
    • Location: 0
    • Status: offline
    Re: EZBL ex_boot_app_blink_dual_partition read-back verification error 2018/10/31 13:00:02 (permalink)
    0
    I have figured out how to change the UART assignments.  However, I can still only load at rates up to 115.2K baud.
     
    I have changed the STD I/O to UART 4 and the EZBL port to UART 3 where my MCP2200 is connected on my board .
    Changing the ports was easy once I found the right area to do it.  I made the changes in the InitializeBoard() function in pic24fj1024gb610_explorer_16.c.  It is just a matter of mapping the correct pins to the UARTs and changing the UART_Reset calls to specify the desired UART.  The STD I/O code was commented out originally.
     
    Now the next step is to incorporated EZBL into my very large application program.  Then figure out how to connect it to the Ethernet code.
     
    I hope this is helpful to someone.
     
    I really think that the Tutorial needs additional sections for dual partitions and maybe there needs to be some changes to get it to load dual partitions at baud rates higher than 115.2K.
     
      - Craig
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5