Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use... [solved]
#1
Is there any kind of documentation on how to get this bootloader into my device in the first place?

I have made a program for a dsPIC30F6014A and I'd like to add in a bootloader so that I can upgrade it without using the ICD3. I am just unsure of how to begin. Any help would be appreciated.
Reply
#2
Hello,

Here it is : [broken link]

You can download it on the homepage (bottom right) ; also available in the package.

Lotusx
Reply
#3
(2011-02-01, 00:52:03)Lotusx Wrote: Hello,
Here it is :  [broken link]
You can download it on the homepage (bottom right) ; also available in the package.
Lotusx

Thank you!
Reply
#4
(2011-02-01, 00:52:03)Lotusx Wrote: Hello,
Here it is :  [broken link]
You can download it on the homepage (bottom right) ; also available in the package.
Lotusx

I've been reading through the firmware manual and I believe that I have set everything up correctly.  I am using the dsPIC30F6014A.  I set my device name:

.equ __30F6014A, 1

I set my FCY and Baudrate:

.equ FCY, 1842500
.equ BAUDRATE, 115200

I uncommented the line to use UART2:

.equ USE_UART2, 1

I seem to be having problems setting the tris register.  Is this the tris register for the output that is also tied to the UART?  I don't think I understand what the "tris register of tx enable pin" is.  I don't understand what information the firmware is asking for.  The enable pin for UART2 is in the U2MODE register and the bits are UARTEN (bit 15), and UTXEN (bit 10).  I don't think this is the information it is looking for.  Am I way off?

I have tried to build the program but I get the following errors:
ds30loader.s: Assembler messages:
ds30loader.s:335: Error: Invalid operands specified ('bset LATE,#LED0').
ds30loader.s:335:        Check operand #2. Operand must be between 0 and 15, inclusive.
ds30loader.s:339: Error: Invalid operands specified ('bset LATE,#LED1').
ds30loader.s:339:        Check operand #2. Operand must be between 0 and 15, inclusive.
ds30loader.s:343: Error: Invalid operands specified ('bset LATE,#LED2').
ds30loader.s:343:        Check operand #2. Operand must be between 0 and 15, inclusive.
ds30loader.s:347: Error: Invalid operands specified ('bset LATE,#LED3').
ds30loader.s:347:        Check operand #2. Operand must be between 0 and 15, inclusive.

Any tips or help would be appreciated.
Reply
#5
I suspect you missed this line:
.equ DEV_MODE, 1 ;xxx comment or delete this line

Delete it and let us know if it didn't work out.
Reply
#6
(2011-02-15, 00:02:59)Mikael Gustafsson Wrote: I suspect you missed this line:
.equ DEV_MODE, 1 ;xxx comment or delete this line

Delete it and let us know if it didn't work out.

Whoops! You were right. Thanks for the help
Reply
#7
(2011-02-15, 00:02:59)Mikael Gustafsson Wrote: I suspect you missed this line:
.equ DEV_MODE, 1 ;xxx comment or delete this line

Delete it and let us know if it didn't work out.

Mikael,

I'm sorry to bother you with such basic questions but I am still learning and I am a little unsure on some of the directions. I have built the bootloader and programmed it to my chip but the GUI has been unable to find it when I attempt to download a hex file.

I believe that it is because I do not have the TRIS/LAT register set up correctly. As I mentioned before I am not quite sure what you are asking for in the TRIS/LAT register section. Can you help me by explaining what the firmware is looking for?

Is it looking for the I/O port that the UART is on (for the dsPIC30F6014A this is TRISF Bit5)? Is it looking for the U2MODE register and the UARTEN and UTXEN bits? If it is looking for the U2MODE register what would the LAT register be?

Thanks for all the help,
Greg
Reply
#8
Unless told otherwise, all settings you need to do are located in settings.inc.

What do you mean TRIS/LAT register section?
Reply
#9
(2011-02-19, 01:15:06)Mikael Gustafsson Wrote: Unless told otherwise, all settings you need to do are located in settings.inc.

What do you mean TRIS/LAT register section?

Hi Mikael,

I am looking in the settings.inc file. Specifically I am looking at the TRISR_TXE, LATR_TXE, TRISB_TXE, and LATB_TXE settings.
Reply
#10
Those are only if you wish to use tx enable pin, do you?
Reply
#11
(2011-02-22, 19:58:45)Mikael Gustafsson Wrote: Those are only if you wish to use tx enable pin, do you?

I thought I had to because the GUI has been unable to find the bootloader. It always times out and never receives anything back from my chip. I am using the same UART/serial port with my main program and I haven't had any problems with it. Is there something else I need to do in order for the GUI to find the bootloader?

I have built and programmed my chip with your bootloader after changing the following in settings.inc:

Device name: _30F6014A
FCY, 1842500
Comment out DEV_MODE
BAUDRATE 115200 (also tried 9600)
USE_UART2 (commented out USE_UART1)

I also used the following Configuration bits (which I copied/pasted from my code that I want to load with the bootloader):
__FOSC CSW_FSCM_OFF & FRC
__FWDT, WDT_OFF
__FBORPOR, PBOR_ON & BORV_27 & PWRT_64 & MCLR_EN
__FGS, CODE_PROT_OFF
__FICD, ICS_NONE
Reply
#12
firmware version?
gui version?
do you reset the device and press download within 3 seconds?
Reply
#13
(2011-02-23, 20:36:39)Mikael Gustafsson Wrote: firmware version?
gui version?
do you reset the device and press download within 3 seconds?

Firmware: 3.0.0
Gui: 1.3.14
I have tried it at 3 seconds and also by changing the timer to 9000 and waiting for a 4 count and then attempting. No luck either time. Thanks for helping me trouble shoot this.
Reply
#14
Please verify that configs in the code are used and the ones in MPLAB IDE, there's a checkbox in menu Configure->Configuration bits...

Have you commented/removed USE_ABAUD?
Reply
#15
(2011-02-27, 22:10:56)Mikael Gustafsson Wrote: Please verify that configs in the code are used and the ones in MPLAB IDE, there's a checkbox in menu Configure->Configuration bits...

Have you commented/removed USE_ABAUD?

The USE_ABAUD was commented out but the Configuration Bits Set in Code box was unchecked. Checked it off and found the bootloader. Thanks for all the help this will be a huge addition for my micro!
Reply
#16
Great! Good luck with your projects.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)