PIC32MX795F512L Bootloader Problem
Posted: 26 Jan 2012 17:03
Hello,
i have some code that worked very well for me, but when i upload this code with ME HID Bootloader i get an issue with PORTB.RB5 pin, which is always off. I even tried to turn on all 16 ports, and they all are working when the HEX is loaded without Bootloader. When MCU is programmed using Bootloader again RB5 is not working.
The code that worked for me is:
Are there some limitations regarding to some IO pins, because i have initialized all TRISs to outputs and Analog pins as digital
Regards,
Dalibor
_______________________
I have just figered out that i missed forum. This post should be in Mikroc for PIC32 General forum. I hope that moderators will move this topic to that forum.
i have some code that worked very well for me, but when i upload this code with ME HID Bootloader i get an issue with PORTB.RB5 pin, which is always off. I even tried to turn on all 16 ports, and they all are working when the HEX is loaded without Bootloader. When MCU is programmed using Bootloader again RB5 is not working.
The code that worked for me is:
Code: Select all
//Ekvivalentna C sintaksa
/*
while(1==1)
{
phaseAcumulator+=increment;
PORTB=*(addressLT+(phaseAcumulator>>17));
}
} */
asm{
LUI R15,0xBF88
LUI R15, 0xA000
LW R19,0xC8(R15)
LW R18,0x10(R15)
LUI R16, 0xBF88
//WDT SETUP
LUI R30, 49024
LBU R14, 0(R30)
ORI R14, R14, 1
LUI R30, 49024
}
loop1:
// WDTCONbits.WDTCLR=1;
asm{
SB R14, 0(R30) //WDTCLR
LW R20,0xC4(R15)
SRL R3, R19, 17
SLL R3,R3,1
ADDU R2, R18, R3
LHU R2, 0(R2)
SW R2, 0x6050(R16)
ADDU R19,R20,R19
}
goto loop1;
}
Regards,
Dalibor
_______________________
I have just figered out that i missed forum. This post should be in Mikroc for PIC32 General forum. I hope that moderators will move this topic to that forum.