ds30 Loader free edition forums
Unable to change application frequency - Printable Version

+- ds30 Loader free edition forums (https://picbootloader.com/forum)
+-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3)
+--- Forum: 16-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=6)
+--- Thread: Unable to change application frequency (/showthread.php?tid=536)



Unable to change application frequency - rogerb - 2012-12-03

Hi,

If I use a dsPIC30F6014A with an FTDI USB/RS232 module, with no bootloader my application runs withs a 10MHz crystal/and PLL8 thus 80Mhz and works well. If I change the clock to 40Mhz/PLL4 in order to lower the battery drain of our application it also works correctly.

HOWEVER
When I do the same thing using the ds30 bootloader v1.5.5 I have problems. Using the PLL8 setting on the bootloader with FCY set at 10MHz the application downloads and runs OK.

If I now change the application to 40MHZ/PLL4 it fails to communicate with the bootloader.

For the PLL8 setting the bootloader is configured with FCY of 10000000 and config __FOSC, CSW_FSCM_OFF & XT_PLL8

For the PLL4 setting the bootloader is configured with FCY of 10000000 and config __FOSC, CSW_FSCM_OFF & XT_PLL4

This gives an error in the bootloader window:
Quote:Initiating write...
Sending auto baudrate sync character . unknown response from auto baudrate detection(0xE5), aborting
Tx 1 byte / Rx 1 byte / 3.3s
Write failed
So what should the setting for FCY be?

All help appreciated

Roger B

Hmm . . actually it does communicate but only if the baudrate is set to 57600 or less in the loader window! If I try to change FCY to above 10MHz there is a limit imposed - I'm confused!


RE: Unable to change application frequency - rogerb - 2012-12-05

Well, I re-read the documentation and with the set up I'm using: dsPIC30F6014A with an FTDI USB/RS232 module, a 10MHz crystal/and PLL8 thus 80Mhz.
the instruction cycle is therefore 80MHz/4 = 20,000,000
If I use this value for FCY the bootloader will not compile with the error:
Quote:ds30loader.s:539: Error: Fcy specified is out of range
Can anyone enlighten me as to whats happening?


RE: Unable to change application frequency - Mikael Gustavsson - 2012-12-05

If you take a look at line 539 you should be able to figure out what is going on.
Code:
        .ifdef IS_30F
            .if FCY > 30000000
                .error "Fcy specified is out of range"
            .endif    
        .endif