CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Bootloader & PPS
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kmp84



Joined: 02 Feb 2010
Posts: 345

View user's profile Send private message

PostPosted: Sun Dec 06, 2020 4:19 pm     Reply with quote

Now I found correct config.word number. and saw that it changes it's value in output hex file, but bootloader doesn't start with these fuses.
Code:

#include <33EP512MU810.h>
#fuses NOWDT
#fuses RESET_AUX
#fuses NOIOL1WAY
#fuses CKSFSM                   //Clock Switching is enabled, fail Safe clock monitor is enabled
#fuses NOBROWNOUT               //No brownout reset
#fuses NOJTAG                   //JTAG disabled

#fuses 3=0x0022
 

#build (AUX_MEMORY)     //Build code for Auxiliary Memory
#use delay(clock=32MHz, crystal=8MHz)
......
 


Configuration Words
F80004: 00FF0022 00FF0080 00FF0001 00FF007F
F8000C: 00FF0037 00FF00D3 00FF0003
Ttelmah



Joined: 11 Mar 2010
Posts: 19244

View user's profile Send private message

PostPosted: Mon Dec 07, 2020 3:04 am     Reply with quote

OK.

Try with this:
Code:

#fuses 3=0x0031
#fuses 9=0x0033

The compiler behaviour is 'interesting'. It looks as if it misidentifies the
GSS & GWRP bits.

This might not work, since it prevents table read access in the auxiliary
segment.

The code you show does not do any accesses to the program memory
except for reading. Does your 'real' code do anything more?. If it attempts
to erase a row of the program memory, this will not work.
kmp84



Joined: 02 Feb 2010
Posts: 345

View user's profile Send private message

PostPosted: Mon Dec 07, 2020 3:46 am     Reply with quote

Hi,
Code:
    
#fuses 3=0x0031
#fuses 9=0x0033

with above fuses aux_bootloader not start!

To recall my purpose: I want to set all fuses in bootloader program + lock program memory from reading.
Ttelmah



Joined: 11 Mar 2010
Posts: 19244

View user's profile Send private message

PostPosted: Mon Dec 07, 2020 4:08 am     Reply with quote

OK. That makes sense. Got the bits the wrong way round.
Code:

#fuses 3=0x0031
#fuses 9=0x0030

Prevents read and write access to the auxiliary segment. If you don't do this
means somebody could overwrite the bootloader with code that can then
access all the memory.....
kmp84



Joined: 02 Feb 2010
Posts: 345

View user's profile Send private message

PostPosted: Mon Dec 07, 2020 4:32 am     Reply with quote

Quote:


#fuses 3=0x0031
#fuses 9=0x0030

Bummed Out still not starting bootloader. I think this is errata sheet problem?
Ttelmah



Joined: 11 Mar 2010
Posts: 19244

View user's profile Send private message

PostPosted: Mon Dec 07, 2020 6:39 am     Reply with quote

It could be.

I actually think though that the problem is interrupt handling.

The security system has the behaviour that if protection is enabled, and
an interrupt occurs from code in the auxiliary segment, instead of using
the IVT, it'll load a special interrupt vector from 0x7FFFEA. The code here
then has to determine if the interrupt is allowed.
kmp84



Joined: 02 Feb 2010
Posts: 345

View user's profile Send private message

PostPosted: Mon Dec 07, 2020 6:56 am     Reply with quote

I didn't see any #int_xxx using in CCS pcd_aux_bootloader example.
Ttelmah



Joined: 11 Mar 2010
Posts: 19244

View user's profile Send private message

PostPosted: Mon Dec 07, 2020 9:24 am     Reply with quote

It does, but it is using the INT_AUX vector, which should be correct.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group