• AVR Freaks

PIC18 app firmware execution issue after firmware upgrade

Author
premji
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2019/07/20 06:35:55
  • Location: 0
  • Status: offline
2019/09/17 01:55:48 (permalink)
0

PIC18 app firmware execution issue after firmware upgrade

Hi All,
 
Setup info:
=========
PIC18F27K40
ICD4
MPLAB-X v5.15 IDE
XC8 v2.05
 
Problem: After firmware flashed using on-chip bootloader (0x0000 - 0x07FF flash area), it seems that loaded app firmware doesn't work.
 
We have made first bootloader which contains I2C slave functionality to get app hex file from host based I2C master, and loaded first into PIC flash memory boot block. Then just made very small sample app to blink RA5 output, loaded this hex file successfully uisng i2c communication and at last reset it using RESET statement. But when we verify using DMM at RA5, no toggle occurs as we implement in app code like 3 sec high and 3 sec low in while(1) loop.
 
We are flashing bootcode in 0x0000 - 0x07FF area of flash memory.
For app firmware, we have given code offset as 0x0800 and ROM range as 800-1FFFF, in linker options.
 
Since PIC18F27k40 has 128 bytes write-block needed, we have modified application hex file to make full (16 bytes) line data and to align with 128 bytes block write. We added some padded data. Finally, by reading back flashed app code, we could verify that original hex file data is correctly written. But somehow after reset, app firmware doesn't seem to work. For this simple app, we are not flashing config word since it is same as what is flashed while bootloader flashed. Also let me attach our app hex file ( actual and padded) for let you know that how we padded extra bytes and lines to make 128 bytes block wise writing.
 
If anyone has idea, what could be wrong, please let me know.
 
Thanks,
Premji 
 
 
 

Attached Image(s)

#1

1 Reply Related Threads

    katela
    Super Member
    • Total Posts : 1412
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: offline
    Re: PIC18 app firmware execution issue after firmware upgrade 2019/09/17 19:14:47 (permalink)

    Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
    YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
    #2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5