Hot!PIC18F26K42 Bootloader XC8 --

New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2017/10/20 09:58:53
  • Location: 0
  • Status: offline
2018/01/10 12:31:19 (permalink)

PIC18F26K42 Bootloader XC8 --

I have a low  bootloader (below ox800) and the related application at 0x800 using codeoffset.
I am using the mcc generated bootloader and modified to get it working.
Erasing the program at 0x800 to 0x810 and then resetting to trigger bootloading.
Using the unified PC app 1.8 to then send the update to the bootloader.
The serial bootloading completes and then the bootloader does  reset.
The bootloader then detects the program was loaded since the region 0x800-0x810 is now programmed.
The interrupt was remapped successfully using
org 8
goto 0x808
And then 0x808 in the target application is setup by using 
org 0x808
goto _INTERRUPT_InterruptManager
This seems to be working ok as a LED toggle that uses the TMR0 interrupt is working.
I see the UART2_Transmit_ISR is being called from debugging but nothing is getting shifted out.
The target application works fine by itself and sends out the bytes to the serial hardware as expected.
I also verified that the the same  SYSTEM_Initialize() used by the target was executed.
I used the bootloader config suggestion that results in the target application mcc config being used and see the build messages indicating it was used (and not the bootloader config).
At this point I don't know why the TMR0 and interrupts work but noting out of the serial shift register.
The target mcc config should take care of the PPS via the PIN_MANAGER_Initialize function.
I am out of ideas at this point.
Any suggestions on what it missing would be appreciated.
 Found that PPS1WAY   needed to be disabled... All working now.
post edited by cemerick - 2018/01/10 13:35:58

2 Replies Related Threads

    Just a Member
    • Total Posts : 1131
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: PIC18F26K42 Bootloader XC8 -- 2018/01/10 12:46:11 (permalink)
    4 (1)
    Perhaps config bit PPS1WAY is set, the bootloader cleared and set PPSLOCKED, and now the application can't clear PPSLOCKED to change the PPS configuration. In a bootload environment, it's probably best that PPS1WAY is cleared.
    By the way, the K42 interrupt vectors are so easy to use and remap to where you want them. Why bother with all that legacy jumping around on interrupts? I just deleted that whole section of the bootloader.

    Go Navy! Beat Army!
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2017/10/20 09:58:53
    • Location: 0
    • Status: offline
    Re: PIC18F26K42 Bootloader XC8 -- 2018/01/12 18:44:35 (permalink)
    it was related to the PPS lock in a way. When I checked the mcc code for the pin manager function, it did not have the unlock sequence right. When I fixed that, the outputs worked fine. 
    Thanks for the suggestions and help.
    Jump to:
    © 2018 APG vNext Commercial Version 4.5