Configuration Option Missing in Master Block

malife
Expert
Posts: 56
Joined: Tue Apr 17, 2007 7:24 am
Location: Santa Cruz, CA
Contact:

Configuration Option Missing in Master Block

Postby malife » Mon May 12, 2008 9:38 pm

Hello Lubin,
I have the following request: Many of the high-end dsPics have more than one PGC/PGD ports and these are used to program and debug. The selection of which to use is set using configuration register FICD (like crystal, PBOR, etc...) but your Master block does not have that option. I would like to request that you add that capability because I just sent to manufacture a board that uses PGC2/PGD2 but I have no way of changing PGC/PGD unless I go into the code :-). I understand that programming will work (most likely) but debugging won't.

Thanks!

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: Configuration Option Missing in Master Block

Postby LubinKerhuel » Mon May 12, 2008 10:05 pm

Hi Mariano,

I understand that you are going to use MPLAB (i.e. no bootloader) to program and debug your microcontroller chip.
You will set-up a project, import c and library files (.a) generated by Matlab/Simulink and the blockset for dsPIC, and compile the whole project using MPLAB. (This will enable advanced debug option of MPLAB). The other solution is to import directly the .hex file generated by Matlab, but debugging will be difficult!

The fastest way to set the PGC/PGD parameter, which is not supported yet by the blockset, is to set up that option using directly the MPLAB menu:
Configure ==> Configuration Bits ; uncheck "Configuration Bits set in code" and set your own options for PGC/PGD.

Let me know if it solves the problem.
Adding the PGC/PGD choice to the blockset is still a piece of work (need to analyze the syntax for all microchip microcontroller, and many times, there is tiny changes that makes it quite annoying)
Lubin

malife
Expert
Posts: 56
Joined: Tue Apr 17, 2007 7:24 am
Location: Santa Cruz, CA
Contact:

Re: Configuration Option Missing in Master Block

Postby malife » Tue May 13, 2008 12:56 am

Ok Lubin,
I will do that. One question... do you know if it will program regardless of which PGC/PGD I connect to?

Thanks for the response :-)

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: Configuration Option Missing in Master Block

Postby LubinKerhuel » Wed May 14, 2008 10:36 am

Hi Mariano,

I have no idea if the chip can be programmed using any PGC/PGD pin.
It may be only for debugging ? If anyone else tried...

I mostly use the very usefull "tinybld" bootloader working with UART1 or 2.
(I add a "reset" mechanism in my simulink model that reset automatically the dsPIC when it receive few instruction from the tinybld PC interface)

malife
Expert
Posts: 56
Joined: Tue Apr 17, 2007 7:24 am
Location: Santa Cruz, CA
Contact:

Re: Configuration Option Missing in Master Block

Postby malife » Wed May 14, 2008 7:55 pm

Hey Lubin,
You had me worried for a while, 'cause my board had already been sent to manufacture and I had only PGC2/PGD2 wired :shock: . Anyways, I found in the dsPIC33F family reference manual Section 24.2.1 that you can use any pin pair to program the device (you can not mix and match i.e. PGC1/PGD2). But I think that dsPIC30s only can be programmed in PGC/PGD and debugged on the others, but I am not sure. I would love to use tinybld but according to its website it is not compatible with the dsPIC33FJ256MC710, if you have any other info regarding this I would love to give it a try :-).

Thanks!

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: Configuration Option Missing in Master Block

Postby LubinKerhuel » Wed May 14, 2008 8:32 pm

Hi Mariano,

You could try sending a mail to Claudiu (mail at the bottom of his webpage : http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm)
It works once for me :)

Thanks for sharing that information about PGC/PGD...


Return to “Request for new functions / Peripheral / Chip support”

Who is online

Users browsing this forum: No registered users and 2 guests